PDA

View Full Version : Reloading a form in VB?



anhedonia
August 1st, 2002, 07:22
Okay, I'm making a game in VB (school assignment) and I want a restart button which reloads the form. I think I'm probably just stupid, but I can't figure out the code to do it. Little help? :)

nitroboy
August 1st, 2002, 09:28
so the form needs to be blank again?
if it's that then make a button that writes nothng in the form = ""
sorry but i forgot the VB code to write the button :biggrin2:

anhedonia
August 2nd, 2002, 03:37
No, I mean, you click a button and it 'refreshes' the form, not makes it blank. You know, just like when you hit refresh in your browser... If the form fields or anything like that has changed, they go back to default.

I tried to set it to unloading the form and then loading it again, but that didn't seem to work.

nitroboy
August 2nd, 2002, 07:02
can you plz give me an example, I still don't get it :classic2:

anhedonia
August 3rd, 2002, 03:41
I just gave you an example??? I don't get what's so difficult to understand. You hit restart, the form reloads to its original, saved format. :p

nitroboy
August 3rd, 2002, 13:02
:confused:
if form <> default then
form = default
end if

anhedonia
August 6th, 2002, 02:24
Nah, that didn't work, any other suggestions???

This is really annoying me, maybe I should just ditch the 'Restart' option. :devious2:

nitroboy
August 6th, 2002, 03:49
don't forget to declare the variables

ashben
August 6th, 2002, 04:38
Me.Refresh

.. or ..

Load Me