C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




plz urgent help me, in winform


Posted Date: 18 Jul 2008      Total Responses: 2

Posted By: sunil       Member Level: Silver     Points: 1



hi all

i have 2 forms , when ever execute program that time Main form is open after we click button then open child form in this child form we click button that time open Main form , but i want open that mail form open but two Main forms are opning i want only one Mail form open





Responses

Author: UltimateRengan    18 Jul 2008Member Level: DiamondRating:     Points: 1

Hi

Form 1:---

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim second As New Form2
second.Show()
Me.Hide()
End Sub
End Class


Form2:----

Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim first As New Form1
first.Show()
End Sub
End Class

i hope this may help u

UltimateRengan
nathan.rengan@gmail.com
Trichy-Rider Group



Author: Abhijeet Kumar    18 Jul 2008Member Level: GoldRating:     Points: 4

As per my undertsanding you do not want to open a new instance of the Main form, but open the same instance as opened before.

For this, when you open second form, do not close the Main form but just hide it.
and when you want to open it again, jus make it visible again, or call show, do not create any instance of it.



Post Reply
You must Sign In to post a response.
Next : Please help me soon
Previous : Dynamically adding empty rows to DataGridView
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use