@SW_MINIMIZE und @SW_MAXIMIZE

  • Wenn ich das Programm starte mit @SW_MAXIMIZE dann ist es minimiert, und wenn ich es mit @SW_MINIMIZE starte ist es maximiert!
    Gut habe nichts dagegen das die logik genau andersrum ist, aber! es ist nur in den meisten fällen der fall das es maximiert ist, ich brauche aber eine 100%ige sicherheit das es maximiert gestartet wird und im vordergrund.
    Hoffe ihr könnt mir helfen.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <ProgressConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #NoTrayIcon

    [/autoit] [autoit][/autoit] [autoit]

    $Form2 = GUICreate("Please wait...", 501, 120, -1, -1,0)
    $Progress1 = GUICtrlCreateProgress(39, 45, 422, 17, BitOR($PBS_SMOOTH,$PBS_MARQUEE))
    $Label1 = GUICtrlCreateLabel("starting database...", 39, 20, 124, 17)
    GUICtrlSendMsg($progress1, 0x040A, 1, 0)
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    Run(@ComSpec & " /c " & 'net start OracleServiceXXX', "", @SW_HIDE)
    ProcessWait("Oradim.exe")
    ProcessWaitClose ("Oradim.exe")
    sleep(1000)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlDelete($Label1)
    $Label1 = GUICtrlCreateLabel("starting xxx...", 39, 20, 124, 17)

    [/autoit] [autoit][/autoit] [autoit]

    Run(StringFormat('"%s" "%s" "%s"', @ProgramFilesDir &"\xxx\Sys\xxx.exe", @ProgramFilesDir &"\xxx" , @ProgramFilesDir &"\xxx\Sys\xxx.ini"),"",@SW_MINIMIZE)

    [/autoit] [autoit][/autoit] [autoit]

    $title = 0
    While $title == 0
    $title = WinGetState("[xxx] xxx")
    sleep(500)
    ;MsgBox(0,"abc",$title)
    WEnd

    [/autoit]

    edit: das alles passiert in einer VirtualBOX, ich weiß ja nicht wie weit das auswirkungen hat. VB hat WinXP 32bit

    edit2: gerade nochmal auf dem wirts pc probiert mit win7 64bit, da ist es das selbe problem. Also denk ich man kann die vermutung ausschließen das es an der VirtualBOX liegt.

    3 Mal editiert, zuletzt von cashmoney (2. Mai 2011 um 09:23)

  • Versuch es mal statt mit ShellExecute statt Run.

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.