What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Visual Basic 2008 - Reloading/Refreshing Same form

Visual Basic 2008 - Reloading/Refreshing Same form
Author: Message:
andrewdodd13
Senior Member
****

Avatar
Oh so retro

Posts: 870
Reputation: 16
34 / Male / Flag
Joined: Jan 2005
RE: RE: Visual Basic 2008 - Reloading/Refreshing Same form
quote:
Originally posted by pillowmurder
very simple to reload a form.

use another form, in it have this code execute either by load or another objects method.

form1.close() 'form you want reloaded closes
form1.visible = true  'form you want reloaded opens
form2.close() 'form that did the reload closes



yours,
PM
This shouldn't work in VB 2008, because forms are now stored as classes rather than objects, so form1 is the class.

What you would be better off doing, is making a module, and using Sub Main and having a global in the module called form1Instance, code like this:

Visual Basic code:
Dim form1Instance As Form1
 
Sub Main
  form1Instance = new Form1
  form1Instance.Show()
End Sub
 
Sub Reset
  form1Instance.close()
  form1Instance.show()
End Sub

To Reset the form, call Module1.Reset. At least... it should work. :P
[Image: AndrewsStyle.png]
01-10-2009 11:48 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Visual Basic 2008 - Reloading/Refreshing Same form - by Quantum on 12-14-2008 at 06:31 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Stigmata on 12-14-2008 at 07:33 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Quantum on 12-14-2008 at 08:27 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by vaccination on 12-14-2008 at 08:44 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Quantum on 12-14-2008 at 08:50 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Stigmata on 12-14-2008 at 08:54 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by vaccination on 12-14-2008 at 09:06 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Quantum on 12-14-2008 at 09:59 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Stigmata on 12-14-2008 at 10:01 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Quantum on 12-14-2008 at 10:17 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Stigmata on 12-14-2008 at 10:20 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Quantum on 12-14-2008 at 10:21 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Stigmata on 12-14-2008 at 10:26 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Quantum on 12-14-2008 at 10:30 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by vaccination on 12-15-2008 at 10:06 AM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Quantum on 12-15-2008 at 05:56 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by Ezra on 12-15-2008 at 07:14 PM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by pillowmurder on 01-10-2009 at 03:43 AM
RE: RE: Visual Basic 2008 - Reloading/Refreshing Same form - by andrewdodd13 on 01-10-2009 at 11:48 AM
RE: Visual Basic 2008 - Reloading/Refreshing Same form - by BV on 02-08-2013 at 08:59 AM


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