POP Up window question 
Author Message
 POP Up window question

How do you make a window pop up on top of ALL windows currently
showing (i.e. interupting.
example my program runs in the background, but at givin times (via a
timer) i would like the reminder window to pop up)

from1.show  just blinks in the taskbar.
BringWindowToTop (frmPopUp.hwnd) doesnt work(still blinks in the task
bar)

any suggestions.



Sun, 05 Oct 2003 07:06:50 GMT  
 POP Up window question
Try this :-

Option Explicit

Private Declare Function BringWindowToTop& _
                Lib "user32" _
                (ByVal hwnd As Long)

Private Declare Function SetWindowPos _
                Lib "user32.dll" _
                (ByVal hwnd As Long, _
                 ByVal hWndInsertAfter As Long, _
                 ByVal x As Long, _
                 ByVal y As Long, _
                 ByVal cx As Long, _
                 ByVal cy As Long, _
                 ByVal uFlags As Long) _
                 As Boolean

Private Const HWND_TOP As Long = 0
Private Const HWND_BOTTOM As Long = 1
Private Const HWND_TOPMOST As Long = -1
Private Const HWND_NOTOPMOST As Long = -2
Private Const WS_EX_TOPMOST As Long = &H8

Private Const SWP_NOSIZE As Long = 1
Private Const SWP_NOMOVE As Long = 2
Dim mbTopMost As Boolean

Private Sub Command1_Click()
    Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
    SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE +
SWP_NOMOVE
End Sub



Quote:
>How do you make a window pop up on top of ALL windows currently
>showing (i.e. interupting.
>example my program runs in the background, but at givin times (via a
>timer) i would like the reminder window to pop up)

>from1.show  just blinks in the taskbar.
>BringWindowToTop (frmPopUp.hwnd) doesnt work(still blinks in the task
>bar)

>any suggestions.



Sun, 05 Oct 2003 18:00:05 GMT  
 POP Up window question
Hi jerry!
thanx !
your method is a little shorter than the one i used..
i'll try it and see how it works out

thankx again.

skip



Quote:
>Try this :-

>Option Explicit

>Private Declare Function BringWindowToTop& _
>                Lib "user32" _
>                (ByVal hwnd As Long)

>Private Declare Function SetWindowPos _
>                Lib "user32.dll" _
>                (ByVal hwnd As Long, _
>                 ByVal hWndInsertAfter As Long, _
>                 ByVal x As Long, _
>                 ByVal y As Long, _
>                 ByVal cx As Long, _
>                 ByVal cy As Long, _
>                 ByVal uFlags As Long) _
>                 As Boolean

>Private Const HWND_TOP As Long = 0
>Private Const HWND_BOTTOM As Long = 1
>Private Const HWND_TOPMOST As Long = -1
>Private Const HWND_NOTOPMOST As Long = -2
>Private Const WS_EX_TOPMOST As Long = &H8

>Private Const SWP_NOSIZE As Long = 1
>Private Const SWP_NOMOVE As Long = 2
>Dim mbTopMost As Boolean

>Private Sub Command1_Click()
>    Timer1.Enabled = True
>End Sub

>Private Sub Timer1_Timer()
>    SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE +
>SWP_NOMOVE
>End Sub



>>How do you make a window pop up on top of ALL windows currently
>>showing (i.e. interupting.
>>example my program runs in the background, but at givin times (via a
>>timer) i would like the reminder window to pop up)

>>from1.show  just blinks in the taskbar.
>>BringWindowToTop (frmPopUp.hwnd) doesnt work(still blinks in the task
>>bar)

>>any suggestions.



Mon, 06 Oct 2003 20:35:24 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Pop-ups in MS Office

2. pop-ups

3. Pop-ups in TreeView

4. downloading file without pop-ups

5. Pop-ups

6. Pop ups

7. control enumeration pop-ups at design time

8. Pop Ups

9. Pass values to pop-up window....still having question

10. test question for the vb suck-ups out there

11. Pop Up Menu Not Popping

 

 
Powered by phpBB® Forum Software