viper2843 Posted September 26, 2004 Posted September 26, 2004 I have an old game that uses the fill screen to run. This would be fine and good if I still had a 640x480 screen resolution. Now, in the modern era there is a ton of wasted space. What I want to do is (for my own personal use so don't worry) is create a .NET app (VB or C#) to create a window to house this game. That way, I could play it without taking the full screen. Does anyone know how to wrap .NET around another program, effectively created a windowed app. Another way to put it is I want to launch this program inside of my .NET application. Thanks for you help. Quote
Joe Mamma Posted September 27, 2004 Posted September 27, 2004 Process Class Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
viper2843 Posted September 27, 2004 Author Posted September 27, 2004 I'm sorry, I am not sure what you mean. Could you be a bit more specific. Thanks. Quote
Joe Mamma Posted September 27, 2004 Posted September 27, 2004 Visual Studio. . . Help. . . Index. . . Process Class I imagine you want to stat the process. . Grab its window handle. . . interop the user32.dll, post a message to the handle controlling the size. Im not sure if this will work though. the controlled app might still override your posted message. Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
viper2843 Posted September 27, 2004 Author Posted September 27, 2004 Do you happen to know where I could find some documentation on grabbing the window handle. I have never done that before. I am sort of new to all of this. Quote
Joe Mamma Posted September 27, 2004 Posted September 27, 2004 Process is a class can executes a command line that is specified in a ProcessStartInfo object assigned the Process' StartInfo property. In this case it would be the Command line of your game. the Process class has a MainWindowHandleproperty that is the Window Handle of the running application. now. . . you can declare a p/invoke to interface the user32.dll api. in that DLL are the sendmessage and postmessage functions. Do you have the Windows SQK??? well in theory you can send messages to the handle to specify the various display aspecs of the the associated window. Read the sdk. Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.