Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
Windows Forms
Show and close forms
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="mrtutorial08, post: 86829, member: 18503"] Try this... [CODE] Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim fr2 As New Form2 Me.Hide() Fr2.Show() End Sub End Class [/CODE] What I did was that I had 2 Forms...(Form1 is the main form... Form 2 is the one which loads) I added a button(button1) control on to form1.....When a user Clicks that button(you can see in the click events) Form1(or Me as I have referred to it in the code) [B]HIDES[/B] and Form2 shows.... I don't think that closing the form1 would be a good idea since that would just end the application because we have form1 as the main form and I don't think we can let that close.... Well That was all I could Help... I am not like a pro at VB like other people here =/...But that's the most I could Help =D EDIT: Correct me if I am wrong =D...also to answer your question I really don't know why your form won't close...But I don't think it should close because then since your form1 is the MAIN form it shouldn't close....I guess...I am not sure though....Try out Different Things your Self =D EDIT #2: Its Fun to play around with VB...I attached a fun demo file...hehe... [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
Windows Forms
Show and close forms
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom