Hey, i want to know how to start a program (or a file) and set the program's windows startup parameters. For example, i want to start a program and set it to a certain place on my screen when it loads, this has to eb any program. I also want to be able to keep it either normal or minimized. I don't want the program to be able to make it self full screen (that's not maximized). Unless i let it while it starts up. What i'm trying to do it prevent a game from going full screen, so that i can do other things while i'm playing it. But i'm making a program that does a wide range of games, not just for this 1 in paticular.
I have tried to get the window handler by:
ProgramLst is a list box with saved program paths.VB Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Sub mExecuteProgram_Click() If ProgramLst.ListIndex = -1 Then Exit Sub Const SW_SHOW = 5 hWndLst(ProgramLst.ListIndex) = ShellExecute(Me.hwnd, "open", ProgramLst.Text, vbNullString, vbNullString, SW_SHOW) End Sub
I've read that this is how to get the window handler from a program you'e executed... But it keeps returning 2.
Also i need to know how to manipulate the window once i get the handler sorted out.
Thank you.




Reply With Quote