Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
Posted
Process Class

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.

Posted

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.

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.

Posted

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.

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...