Unscruffed
Programmer
Hi everyone. Firstly, Merry Christmas and a prosperous and safe New Year to all.
I'm working on a VB6 app that will take control of the printing operations for a DOS application. The DOS app runs in fullscreen, and my VB app will need to display a preview window.
In short, what I need to achieve is:
1. Get the DisplayMode of the DOS app
2. If the DisplayMode is Fullscreen, change it to Windowed
3. Let the VB app do it's stuff
4. Restore the DOS app to Fullscreen if applicable.
I did achieve this a long time ago, but the source code was long lost after a drive failure. From memory I used OpenProcess or some kind of Pipe, but I can't remember which, or how I got the handle. The DisplayMode updating was done using GetConsoleDisplayMode and SetConsoleDisplayMode.
I have found plenty of C code, but every example seems to be (the same) code within the Console application itself. I can't find anything in VB, or anything that shows how to obtain the correct handle to use when targeting an external application.
Any help appreciated.
Cheers,
Scruff.
Heaven doesn't want me, and Hell's afraid I'll take over!
I'm working on a VB6 app that will take control of the printing operations for a DOS application. The DOS app runs in fullscreen, and my VB app will need to display a preview window.
In short, what I need to achieve is:
1. Get the DisplayMode of the DOS app
2. If the DisplayMode is Fullscreen, change it to Windowed
3. Let the VB app do it's stuff
4. Restore the DOS app to Fullscreen if applicable.
I did achieve this a long time ago, but the source code was long lost after a drive failure. From memory I used OpenProcess or some kind of Pipe, but I can't remember which, or how I got the handle. The DisplayMode updating was done using GetConsoleDisplayMode and SetConsoleDisplayMode.
I have found plenty of C code, but every example seems to be (the same) code within the Console application itself. I can't find anything in VB, or anything that shows how to obtain the correct handle to use when targeting an external application.
Any help appreciated.
Cheers,
Scruff.
Heaven doesn't want me, and Hell's afraid I'll take over!