Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Short version:
New to writing code.
Need to have every window that is restored or opened to go full screen.
What functions do this? Don't need it fully coded out just the functions and syntax.
Long version for those that want more information:
Ok this is my first post so small bit of background. I am new to coding. The last time I was in a coding class they were showing me Visual Basic 6, and it was new. When I was taking that class I never thought I would need to use it. Now I find myself in a place were I need to learn, so I am learning by doing. I have been using code pieces people post up; then modifying them to do what I want and then deconstructing them to make them work. Because of that I have found out how to make a simple register application for me to use at an art table I setup every few months, and even force the numlock to stay on even if someone turns it off.
I now have a new problem, and this is where I need the help. I need to create a program that runs in the background that will force all windows that are opened after it starts up and all windows that are restored from the task bar to open in full screen.
I have found a power shell script that was posted up to cause all windows to restore in a previous state and I got it to restore to full screen.
I need to know how can I see what application was just opened and then have it force it to open as full.
If you can point me to example of the various pieces I can slap them together and modify them to work for what I need.
I am working in Microsoft Visual Studio 2015.
Hope this is better for you than the first post.
As far as I know, this functionality isn't directly exposed in the .net libraries. You'll have to use these 3 (at least) pinvoke functions: EnumDesktopWindows, IsWindowVisible, and ShowWindow. You need the IsWindowVisible function because there are lots of Windows API hwnds that aren't what you normally think of as windows.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last month.
Improve this question
I am building an application in WPF using .NetFramework. It can record full or partial desktop along with Audio to an mp4 file. Right now I am using ffmpeg for that which works fine but has certain issues.
I want to give a try to Desktop Duplication API. Most of the related repositories I find on github are several years old. Why there's very little latest information available on this topic, especially for C#? Can you share any starting points that meet my requirements?
As one of the comments mention Desktop Duplication API is a native low-level API, check this repo https://github.com/bmharper/WindowsDesktopDuplicationSample.
I read also your comment regarding "stick to WPF", there are 2 options in my opinion.
The first one is a very simple RecordBook-Screen-Recorder, it is made in WinForms, and the UI is not in English but very easy to understand, I share it for inspiration: https://github.com/iEmreM/RecordBook-Screen-Recorder.
That said, I have previously played with Captura open source recording in .net and WPF, it can capture video and sound.
here is the repo, the latest updated 2 years. https://github.com/MathewSachin/Captura.
It is feature-rich software as well.
With that said, you might search and find something more, but you won't find complete software that has everything without issues.
In addition, check this article does not cover what you need but gives inspiration to your comment regards Windows Graphic Capture API.
https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am a mechanical engineer and only have basic understanding of programming so I am looking for somebody to guide me in the right direction. My question is that I have a bunch of flow meters that connect to the computer via RS232 connection. The flowmeters came with an application software(an executable file) that is used to display the flow going through it. Anyhow, when I am using multiple flowmeters at the same time, I have to open multiple instances of the same application.
I know I can create a batch file and specify the path to open all the executables in one shot but I was wondering if there is a way I can create some kind of desktop app or a user interface which I could link to the already existing .exe files and have them open and display everything in one window.
I will appreciate any help regarding where I can start to look or find resources to do such a thing.
Thanks
It would be non-trivial programming-wise to have a bunch of instances of an EXE all display their output in the window of another program.
What would be much easier would be to create a script to start all the instances of the EXE and position and size each window to achieve the look you want. The main difference between this and all EXEs within a Window is that they won't all go to foreground/background when you click a flow app or another (non-flow app). If you can live with that difference then...
I suggest using Powershell (PS) if you don't know a suitable scripting language already. Here is a PS script that set the size/position of a window. Another possibility is WASP which has a lot more GUI automation capabilities (which might make it more daunting).
After selecting and learning how to use one of the scripts above you'd then write a script that starts each instance of the flow app, using the right serial port, and other other appropriate command line arguments. Then you'd position and size the window of the flow instance you just created. You'd do that once for each instance. So the script you write is just a straight list of instructions: no loops, no data structures, etc. Which means you'd have a minimal amount of PS to learn.
You can create another script to terminate all the instances of the flow app, if you want. Similarly you could create a third script to minimize the windows of each instance. And another to restore the windows. Etc. In essence your controller app is a set of PS scripts. Which, if you got ambitious, could be turned into a GUI app, again using PS.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a small simple project on building a clickable interactive map of our school.
The challenge is to create a clickable parcel of map and add an animation
directing the user from point A to B using the given roads/hallways on the map. Moreover, I would like to create a database that allows the user to view the information for that specific parcel of map when clicked.
I'm using C# to program this one. My application is Visual Studio 2010
Example Links:
https://www.youtube.com/watch?v=tbinL2pg5Hs
http://www.wayfinderkiosk.com/
QUESTIONS:
What are the processes(step-by-step) on creating this project?
What applications should I need for programming, database, animating, drawing etc.?
Decide on the platform you will be using: WinForms, WPF, WinRT, ASP... If your project description includes the platform then you know; if not keep the question in mind!
Get your resources. Get the map and a list of all the places you will work with. Also all the extras like the descriptions and photos etc. Get this chore out of the way now. It'll help you to get a feeling for the amount of things you will put into the project.
Know your clients. An older kiosk system runs only only a few kiosks. Today maybe you need/want to have it run on the web and on portable devices. This will make a difference in not just for screen sizes but also in the number of possible routes..
Define user input controls. Keyboard? Mouse? Touch? Which buttons? You need a complete list!
Define the user interactions. Completely. Try to make tables of states the system can go through.
Try to decide on how the path finding should work. This anything but trivial, as soon as you want to include more than a few points.. You can have a set of ready made paths or try to find them or build them from a list of partial paths. This may well be the toughest part of it. Some folks believe in 'Hardest First' other in 'Hardest Last'. I believe that the first thing is to understand the hard parts well enough to get a feeling for them and to decide then.
Well that is really just a start, off the top of my head.
Good luck and have fun!!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I use notepad for writing daily notes.some times when system gets restarted by accidentally, I loose my content.
So my question is"can I write an auto-save plugin for notepad" ?
Please let me know if I can write an auto-save plugin for Notepad using C#.NET.
I know about Notepad++ but I want to use notepad only.
Thanks in Advance.
There is no direct way of doing this because NotePad is a separate application and you don't have its code. Even if you did have the code, I'm highly sure it wouldn't be in a .NET-based language.
There is an alternate though. You could recreate entire NotePad from scratch in .NET. Believe me it won't take more than a couple hours for a guy who knows his tools (someone out there might already have done that). Then you can add any new features at your choice.
Yet another way would be hooking into NotePad's low-level messages through Platform calls and trying to somehow inject your features into it, but that's something I'm not an expert at and that would probably take more effort/expertise than writing your own NotePad from scratch.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How can I make an interface for console applications to make them look like edit.com under Microsoft's operating systems. Target languages are C, C++ and C#.NET.
Have a look at curses:
e.g.:
http://sourceforge.net/projects/curses-sharp/
That would be based on a very simple framework which writes directly to the video to draw the underlying shadows, drop down menus, etc, not alone that, since 'Edit.com` would be written in assembler for speed in relation to drawing, this is quite ancient by today's standards, you can however take a look at PDCurses which will enable you to do this kind of thing.
The neat beauty is, PDCurses is compatible with the unix equivalent of Curses.
But, really, today, it is all about GUI and Windows....
What kind of application are you trying to do?
IIRC, from my old days, there was an object orientated framework for this using TurboVision, which has a port available with open source now, see this wikipedia entry on this TurboVision.
Today, console applications are either old DOS applications emulated more and less in Windows, or command-line interpreters.
Anyway, if you really want to do an editor, use the System.Console class in the System NameSpace and use the SetCursorPosition method to write what you want where you want
The edit.com window you are showing appear to be developed with Turbo Vision, an old console gui library written by Borland many years ago.
Borland put the software in public domain and release its C++ sources. There is also a porting to Pascal, developed by the community, called Free Vision.
Unfortunately ,I don't think there is a porting or a wrapper to dot.net, so you have to write your own. Or, at least, you can look at the sources to get inspired...