|
-
Sep 24th, 2001, 10:48 AM
#1
Thread Starter
Need-a-life Member
-
Sep 24th, 2001, 11:28 AM
#2
Fanatic Member
Use this code,
put this in a module:
VB Code:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Public Const WM_CLOSE = &H10
and put this under a command button
VB Code:
sdf = FindWindow(vbNullString, "AppNameHere") 'find the window
If sdf = 0 Then
MsgBox "Couldn't find App"
Else
retval = ShowWindow(sdf, SW_HIDE) ' the command to hide the window
End If
I think that should work, if you get any errors tell me
-
Sep 24th, 2001, 11:31 AM
#3
Fanatic Member
oh and you can show it using this code
VB Code:
sdf = FindWindow(vbNullString, "AppNameHere") 'find the window
If sdf = 0 Then
MsgBox "Couldn't find App"
Else
retval = ShowWindow(sdf, SW_SHOW) ' the command to show the window
End If
-
Sep 24th, 2001, 11:37 AM
#4
Thread Starter
Need-a-life Member
Thanks a lot, Kings. I've already figured out the "show" way, with your first message ;-)
That DID hide and show the outlook.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
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
|