|
-
Jan 1st, 2005, 04:53 PM
#1
Thread Starter
Frenzied Member
Form Blinks when Showing Up
I know this has been discussed already in the following threads:
Pop Up Program
Bring window to front..
I have tried their solutions (the first one just addressed to the second one) and none worked for me.
I have a program that is something like an Advanced Search in NotePad, so I want it to appear on top of NotePad after I make a hot key combination (All of this I already have it)
The problem is that the first time I do it the Form will Blink in the TaskBar and NotePad will still have focus.
The same happens when I change the focus from NotePad to somewhere else, I return to NotePad and display the Form again (After that the Form will show over NotePad)
Could anyone please help me? I am going crazy with this... I have searched in the forums but I can't get an answer that will work for me.
Thank you!
Last edited by Tec-Nico; Jan 1st, 2005 at 05:20 PM.
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
Jan 1st, 2005, 05:09 PM
#2
Addicted Member
Re: Form Blinks when Showing Up
Is it a Form or an exe what starts unfocussed up?
for a program:
VB Code:
shell "C:/blabla.exe" vbmodal
But for a Form:
Hope this helps
-
Jan 1st, 2005, 05:19 PM
#3
Thread Starter
Frenzied Member
Re: Form Blinks when Showing Up
Thanks, Roger. But your first answer cannot be applied to my case and I have already tried the second one... For hours.
Anyway, I found a way to do it. I will post it for future reference:
VB Code:
'API Function Needed:
Private Declare Function Putfocus Lib "user32" Alias "SetFocus" (ByVal hwnd As Long) As Long
'This Procedure will force any form given to show and get the Focus
'(It won't blink)
Private Sub forceShowUp(frmGiven As Form)
frmGiven.Show
Putfocus frmGiven.hwnd
End Sub
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
Jan 1st, 2005, 05:20 PM
#4
Addicted Member
Re: Form Blinks when Showing Up
OK.
I'm just a beginner.........so I never know who I can help
-
Jan 1st, 2005, 06:24 PM
#5
Thread Starter
Frenzied Member
Re: Form Blinks when Showing Up
Don't worry at all. Trying to help people is really admirable, no matter the level of your skills.
So keep at it, you never know who you are going to help with a fresh view of the problem. Also, it means more than people who know a lot and don't share it at all.
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
Jan 3rd, 2005, 05:25 PM
#6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|