Jump to content

Recommended Posts

Posted

I have a nice script that manipulates a bunch of data... moving among Excel files and other programs.

The main program is, and needs to be, Maximized, while it's crunching data

It works

But it takes a LONG time to complete a run (Up to 4 hours...)

So, human nature, the users want me to show them what's going on...

A little GUI window with

Record currently being processed (out of x total)

Current Step

Any error conditions

I dunno.... an animated .GIF of "Men-At-Work" (Yeah, cheezy...)

but

How do I put this GUI up on the screen, visible (on top of the main file) while the main part of my script is working on the main window "below" the gui.....(and I don't want the main body of the script to accidently attempt to interact with the GUI, thinking it is the main program)

Everseeker

Posted (edited)

How bout this?

$TitleP is the title of the window you WANT parent'd.

$TitleC is the window you want below it basically. The child.

Func _SetParent($TitleP, $TitleC)
    If WinExists($TitleP) Then
        If WinExists($TitleC) Then
            $HwndP = WinGetHandle($TitleP)
            $HwndC = WinGetHandle($TitleC)
            $user32 = DllOpen("user32.dll")
            DllCall($user32, "str", "SetParent", "HWnd", $HwndP, "HWnd", $HwndC)
            DllClose($user32)
            Return 1
        Else
            Return -1
        EndIf
    Else
        Return -1
    EndIf
EndFunc ;==>_SetParent

Or Many Use The: GUISetState(@SW_DISABLE, $Hwnd)

Edited by GunsAndRoses

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...