|
-
Oct 3rd, 2000, 09:58 AM
#1
Thread Starter
Junior Member
Hi there,
Anyone knows how to make an application take focus?
Thanks!
Chicho
-
Oct 3rd, 2000, 10:05 AM
#2
Frenzied Member
do you mean another application?
if so, try appactivate()
here's what the help file says:
This example illustrates various uses of the AppActivate statement to activate an application window. The Shell statements assume the applications are in the paths specified.
Dim MyAppID, ReturnValue
AppActivate "Microsoft Word" ' Activate Microsoft
' Word.
' AppActivate can also use the return value of the Shell function.
MyAppID = Shell("C:\WORD\WINWORD.EXE", 1) ' Run Microsoft Word.
AppActivate MyAppID ' Activate Microsoft
' Word.
' You can also use the return value of the Shell function.
ReturnValue = Shell("c:\EXCEL\EXCEL.EXE",1) ' Run Microsoft Excel.
AppActivate ReturnValue ' Activate Microsoft
' Excel.
-
Oct 3rd, 2000, 10:19 AM
#3
Thread Starter
Junior Member
Mark,
I meant my application.
I used appActivate and the application will start blinking
on the TaskBar is there any way I can make it show? Ive tried me.show but it wont worked;
Thanks!
Chicho
-
Oct 3rd, 2000, 10:22 AM
#4
Member
Try maximizing your application.
something like applicationname.maximize
-
Oct 3rd, 2000, 03:14 PM
#5
Try using the SetForegroundWindow api function.
Code:
Public Declare Function SetForegroundWindow _
Lib "user32" (ByVal hwnd As Long) As Long
Usage:
SetForegroundWindow Me.hwnd
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
|