Adblock breaks this site

Need help minimizing/maximising

Discussion in 'Archives' started by hailmatt69, May 15, 2007.

  1. hailmatt69

    hailmatt69 Member

    Joined:
    Mar 10, 2007
    Posts:
    85
    Referrals:
    0
    Sythe Gold:
    0
    Need help minimizing/maximising

    Ok I'm a complete noob to VB6 and I'm just making a simple exe file to go on my WoW install DVD, to organize all the other exe's on there.

    I have most of it done, but I'm trying to get the file to minimize when another exe is brought up, and return when that exe closes.

    This is what I have so far (on my command button):
    Code:
    Private Sub Command1_Click()
    Dim RetVal
    
    Form1.WindowState = 1  'Minimize window
    
    If Option1.Value = True Then
    RetVal = Shell("Installer.exe", 1)
    End If
    
    If Option2.Value = True Then
    RetVal = Shell("WoW-2.0.3-enUS-patch.exe", 1)
    End If
    
    If Option3.Value = True Then
    RetVal = Shell("wow-2.0.3.6299-to-2.0.12.6546-enus-patch.exe", 1)
    End If
    
    If Option4.Value = True Then
    RetVal = Shell("WoW-FE 0.63.exe", 1)
    End If
    
    End Sub
    What do I need to put in so the window comes back up after the selected exe, is finished with?
     
  2. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Need help minimizing/maximising

    in the shell command you have there replace the "1" with "vbNormalFocus"
     
  3. joewnn

    joewnn Guru
    Banned

    Joined:
    Apr 21, 2005
    Posts:
    1,500
    Referrals:
    0
    Sythe Gold:
    0
    Need help minimizing/maximising

    Covey, it doesn't really matter if I remember right..

    Also, you would have to like monitor the windows for changes or whatever. I haven't really done any of that, so I couldn't help you. I know cruel has experimented with stuff like that though, so maybe he will be of some help.
     
  4. hailmatt69

    hailmatt69 Member

    Joined:
    Mar 10, 2007
    Posts:
    85
    Referrals:
    0
    Sythe Gold:
    0
    Need help minimizing/maximising

    That doesn't work because I need it to wait for the other app to close, before my program pops back up.
     
  5. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Need help minimizing/maximising

    oo i see, i thought u wanted that window when executed to pop up IN FRONT of this program.

    you could use the findwindowtitle api, and keep it looping to see if it exists and when it doesn't pop your app up.
    although looping with an api may take a pretty big drain on RAM
     
< how eat banned ? (died999 had no proff) | SELLIN LVL 96 LOOOk!!!!!!!!!!!!!!!!!! >


 
 
Adblock breaks this site