griffyboy0 Posted January 1, 2004 Posted January 1, 2004 (edited) Well, I am creating a multi form application in Visual Basic .Net, and I am having some issues... I created 2 forms. FormMain, and FormWiz I then ran the application after placing controls on the forms, and programming them a bit. My second form didn't show up! At first, i was thinking that this would be like visual basic 6.0, and you just set the visible property to true when you wanted to show the form. I was stunned when there wasn't a visible property... Then I went on to MSDN. They told me that this should work: Dim MyNewForm As New FormWiz MyNewForm.Show() So I tried it, and wouldn't you know it, it doesn't work... Then when I was scrolling through all the options after the dot after MyNewForm, I found the visible property. I set it to true: MyNewForm.Visible = True And ran the application... Still nothing... I'm confused as to how I can set the visible property to true and false when it isn't in the properties page on the design state. I'm also confused as how to show my form... I'm very confused... Please Help Me... ~Griffyboy0~ Edited January 1, 2004 by griffyboy0 Quote
Administrators PlausiblyDamp Posted January 1, 2004 Administrators Posted January 1, 2004 the Dim MyNewForm As New FormWiz MyNewForm.Show() should have worked - what happened when you tried this? Where did you call this code from(button click etc)? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
griffyboy0 Posted January 1, 2004 Author Posted January 1, 2004 I called it from a button click... When I ran the program, and clicked the button, my new form didn't show up... I don't know what to do... ~Griffyboy0~ Quote
*Experts* Bucky Posted January 1, 2004 *Experts* Posted January 1, 2004 If that's the case, then the button click event handler probably isn't being called. Make sure that the event handler has the correct signature and it has the Handles statement. For example, if the button was called Button1, it'd look like this: Private Sub Button1_Click(Sender As Object, e As EventArgs) Handles Button1.Click Dim MyNewForm As New FormWiz MyNewForm.Show() End Sub Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
ThePentiumGuy Posted January 2, 2004 Posted January 2, 2004 this happened to me too i have no idea why .net does this - just create a new project and do the same thing and it'll work Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
griffyboy0 Posted January 3, 2004 Author Posted January 3, 2004 I'll try what bucky said... I'm too far into the program to go and start a new project... ~Griffyboy0~ Edit: Still not working... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.