borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (check if FOLDER exist and if its EMPTY OR NOT?)Next Topic (SQL Server quest) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Can you for loop a whole form?
Poster Message
jonwiper
Level: Big Cheese

Registered: 30-03-2005
Posts: 19

icon Can you for loop a whole form?

Heh,

Is it possible on a form for the user to click a button which reloads the form but resets it also, and does this via a for loop?

Thanks.

09-04-2005 at 02:40 PM
View Profile Send Email to User Show All Posts | Quote Reply
yronium
Level: Moderator


Registered: 14-04-2002
Posts: 907
icon Re: Can you for loop a whole form?

What do you mean by "reset"?

____________________________
Real Programmer can count up to 1024 on his fingers

09-04-2005 at 04:17 PM
View Profile Send Email to User Show All Posts | Quote Reply
jonwiper
Level: Big Cheese

Registered: 30-03-2005
Posts: 19
icon Re: Can you for loop a whole form?

I mean that I want the form to be loaded as if for the first time. I.e. load a form, someone click a button and the same form loads again, then repeat this action several times.

I'll need a for loop I know that, I just wanted to know if I can 'for' loop whole forms.

Thanks.

09-04-2005 at 11:12 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Can you for loop a whole form?

Normally you'd just clear all the controls from text... then call the routine that loads the stuff...

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

10-04-2005 at 06:17 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: Can you for loop a whole form?

Hi

Have a read of this topic, it should give you some ideas


Steve  

http://www.andreavb.com/forum/viewtopic_1610.html

11-04-2005 at 10:12 AM
View Profile Send Email to User Show All Posts | Quote Reply
yronium
Level: Moderator


Registered: 14-04-2002
Posts: 907
icon Re: Can you for loop a whole form?

quote:
jonwiper wrote:
I mean that I want the form to be loaded as if for the first time.
...so, why not unload and load it again?
I'd place an external routine in a module, and call it by the button click. This routine should accept a form as a parameter, in order to unload it and load it again.
If you need to reload the starting form, you can start the project from a Sub Main routine instead.
Don't forget to reset all the global variables that affect form's behaviour.
Hope it helps.


____________________________
Real Programmer can count up to 1024 on his fingers
11-04-2005 at 10:47 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Can you for loop a whole form?
Previous Topic (check if FOLDER exist and if its EMPTY OR NOT?)Next Topic (SQL Server quest) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder