LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need User32.dll Messagebox To Be The Active Window

I am having a bit of trouble.  How do I make the "Move Window to Top" routine select the window I after it has appeared?

 

What is happening now is that the dialog box is pausing further execution until I select the OK button.  But during that pause, "Move Window to Top" is unable to activate because it is in waiting.  Ugh.  What do I need to do to make it wait for the dialog box to appear, and afterward "Move Window to Top"? 

0 Kudos
Message 31 of 34
(902 Views)

I finally had a chance to sit down and play with your example.

 

Use the GetForegroundWindow to get the Window handle to pass into MessageBox.  The window will be active.  Also change your 0x20040 to 0x40.

0 Kudos
Message 32 of 34
(882 Views)

I sincerely appreciate your efforts.  I just got back from vacation. 

 

I suppose I'll have to figure out how to use the GetForegroundWindow functon.  I shall keep you posted.

0 Kudos
Message 33 of 34
(867 Views)

I am taking way too long with this issue, and so I decided to not make the message box window active.  I really do need to get my change released and it's just taking much too long.  Thanks for all the help.

0 Kudos
Message 34 of 34
(852 Views)