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:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Showing Form without vbModal in VB? For the programmers out there... :D
quote:
Originally posted by raceprouk
quote:
Originally posted by CookieRevised
in VB a created form in your project always exist...
You sure?
yes... although I maybe didn't explained it well...

quote:
Originally posted by raceprouk
I would have thought the form was loaded on the first .Show line.
The normal command for loading a form is "Load", but this will not show the form yet.

The "Show" method itself, also automatically loads the form if it wasn't loaded already and then shows the form. This is the same as its counterpart method "Hide", it also automatically loads the form if it wasn't loaded already and then hides the form.

But a form is not only automatically loaded when used with methods or commands, it is also loads automatically whenever you use a property of the form itself, hence when using .hWnd the forms gets loaded.

quote:
Originally posted by raceprouk
I suppose if that's the case, you can use 'Load Form1'. Probably wouldn't make any difference whether the form was loaded or not when that line is executed: it just makes certain.
in this case, yep.


you can check this yourself:
code:
'To make sure the form is "unloaded":
Unload Form1

'show the handle
MsgBox Form1.hWnd
You'll see it is a valid handle again because the form was loaded again


But note that DestroyWindow will effectivly destroy the form in memory!! After DestroyWindow you wont be able to show the form again; it's like it never existed, everything will be cleared. Hence I said in my first reply to this thread that a form always exists in memory in VB.

This post was edited on 05-21-2005 at 03:13 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-21-2005 02:47 PM
Profile 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