What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Showing Form without vbModal in VB? For the programmers out there... :D

Showing Form without vbModal in VB? For the programmers out there... :D
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Showing Form without vbModal in VB? For the programmers out there... :D
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 post was edited on 05-21-2005 at 04:19 AM by matty.
05-21-2005 04:05 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Showing Form without vbModal in VB? For the programmers out there... :D - by (CyBeRDuDe) on 05-20-2005 at 08:00 PM
RE: Showing Form without vbModal in VB? For the programmers out there... :D - by matty on 05-21-2005 at 04:05 AM
RE: Showing Form without vbModal in VB? For the programmers out there... :D - by Mike on 05-21-2005 at 11:46 AM
RE: Showing Form without vbModal in VB? For the programmers out there... :D - by CookieRevised on 05-21-2005 at 01:11 PM
RE: Showing Form without vbModal in VB? For the programmers out there... :D - by RaceProUK on 05-21-2005 at 01:56 PM
RE: RE: Showing Form without vbModal in VB? For the programmers out there... :D - by CookieRevised on 05-21-2005 at 02:47 PM
RE: Showing Form without vbModal in VB? For the programmers out there... :D - by (CyBeRDuDe) on 05-21-2005 at 02:50 PM
RE: Showing Form without vbModal in VB? For the programmers out there... :D - by CookieRevised on 05-21-2005 at 03:10 PM
RE: Showing Form without vbModal in VB? For the programmers out there... :D - by DeVill on 07-03-2005 at 12:20 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On