Chat on IRC |
Newbie VB 6 - need help
Posted by simcity [send private reply] at June 23, 2002, 01:46:50 PM
i am an absolute newbie so this quest is probably going to sound stupid. Anyhow.
I understand that mean you click buttons etc new windows open. But how do you make it so when you click on a button no new window open just the contents of the window. i am trying to make a history learning programme. So i wot to be able to click on buttons and it takes you to different time periods but i want it in the same window. you must get tired of people like me but can you please reply. sim
Posted by Psion [send private reply] at June 23, 2002, 04:18:41 PM
I haven't used VB in a long time, but in VB 5 it was definitely not true that "when you click buttons new windows open" unless you explicitly coded it yourself. I would recommend reading a general VB tutorial.
Posted by buzgub [send private reply] at June 24, 2002, 01:30:47 AM
Psion is correct.
How I'd do it is put each "window" into a frame, then just twiddle visibility of the frames.
Posted by simcity [send private reply] at June 24, 2002, 01:32:37 PM
cheers @buzgub
p.s i know you need to write the code i was just using that as an example
Posted by jbman [send private reply] at June 25, 2002, 01:12:47 AM
The answer to showing forms in VB is pretty simple. Other people may have suggest using visibility, but thats a lot more work that you need to do. To have a form show, (lets say frmOptions), you would add the following to a command button (we'll say its named cmdOpenOps) Private Sub cmdOpenOps () frmOptions.Show End Sub ' SIMPLE as that! You can use the "Show" method on any form! For more help, just email me! I'm actually a new VB user but i read a good book on it and have learned all the basics. I suggest get a good book (Like VB in 24 hours) You learn tons and Visual Basic is a great place to start your programming! Its simple, and you can expand on it! Well, hope i helped!
Posted by buzgub [send private reply] at June 25, 2002, 04:11:27 AM
However, jbman, the task was not to show a new form. It was to change the contents of the form without opening a new one. In this case, your suggestion is useless.
Posted by jbman [send private reply] at June 25, 2002, 11:24:20 AM
opps i read that wrong - well you can have them click a button, then change the text to whatver by assigning it under the click() as:
txtTextbox.text = "Whatever you want here" It was late - I was sleepy
Register as a new user | |||||||||