Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
beginner, help in vb.net[solved]
#1
I want to write my first program it has basically a button, a label and a listbox and you can choose from the list what option you want and it will take you to that page(by clicking the button).

Problem is I'm not sure about how to make the next 'page', should i make all the labels, buttons etc invisible and that would look like it changed.

for example if the user selects 'length conversion' from the list how do i make it change forms(hide everything on the main page or create a new form??)
Reply
#2
You have more ways to do this....

Every element has method "Visible"
Code:
Text1.Visible = False

Will hide the Text1 element

Then you can also create a new form for every page you need and then load it once the button is pressed and unload the main one

edit: I'm sorry I somehow did notice the .net so I don't know if that was helpful.
Reply
#3
Yes I'm currently using the visible=false method but that gets very messy as i need to add more labels etc... how would i go about loading and unloading new forms?

thanks
Reply
#4
(10-12-2009, 02:50 AM)k1ll3r Wrote: Yes I'm currently using the visible=false method but that gets very messy as i need to add more labels etc... how would i go about loading and unloading new forms?

thanks

You can create new forms and add them to your project, I assume you know how to do that

Now in the Button_Click sub, you insert
Code:
Dim newForm as frmPage2
newForm.show

where frmPage2 is the name of the form you want to show

with if checks you can load different forms then
Reply
#5
(10-12-2009, 02:55 AM)NinjaGeek Wrote: You can create new forms and add them to your project, I assume you know how to do that

Now in the Button_Click sub, you insert
Code:
Dim newForm as frmPage2
newForm.show

where frmPage2 is the name of the form you want to show

with if checks you can load different forms then
I did that and it displays an error saying "type form2 is not defined"
Reply
#6
(10-12-2009, 03:09 AM)k1ll3r Wrote: I did that and it displays an error saying "type form2 is not defined"

Well I'm sorry but my Knowledge in .NET is very limited you'll need to wait for the gurus to get online
until then check this out
http://www.devcity.net/Articles/94/1/.aspx
Reply
#7
nvm solved
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Solved by Me][lol] How to hide/show desktop icons, click to see example... Resistance 7 1,836 12-12-2010, 04:20 PM
Last Post: NathanE
  [Beginner] Simple Function for retrieving Local Computer IP AceInfinity 11 2,623 10-06-2010, 12:05 PM
Last Post: CATMAN
  [Tut] How to make an auto text spammer in vb 2008. [Beginner] DeMeR 4 3,911 10-04-2010, 07:57 AM
Last Post: Jordan L.
  [C#] DNS to IP [Beginner] Mike 5 1,059 09-09-2010, 06:08 PM
Last Post: pers2981
  [C#] Random Integers [Beginner] Mike 0 593 08-31-2010, 12:57 PM
Last Post: Mike

Forum Jump:


Users browsing this thread: 1 Guest(s)