quote:
Originally posted by Matty
code:
Public Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Declare Function DestroyWindow Lib "user32" Alias "DestroyWindow" (ByVal hwnd As Long) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const SW_SHOW = 5
Public Const SW_HIDE = 0
Public Const WM_CLOSE = &H10
'Usage: Show Window
ShowWindow Form1.hWnd, SW_SHOW
'Usage: Hide Window
ShowWindow Form1.hWnd, SW_HIDE
'Usage: Close Window #1
SendMessage Form1.hWnd, 0&, 0&, WM_CLOSE
'Usage: Close Window #2
DestroyWindow Form1.hWnd
Hope that helps.
They all go into a module. Change them from Public to Private if you want to just put them in the Class.
This is SO NICE!!!
..
Works perfectly.. Well.. At least until now..
..
Well.. I have some problems with my odl code.. just need to rewrite eveyrthing I think... But thanks.... I just didn't think you could use the ShowWindow api like that.. but It works brilliant, showing forms without putting Messenger on hold... Nice matty...
..
Well.. I gues thread is kinda closed now..
..