Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2004

Tip: Looking for answers? Try searching our database.

Show&Hide (VB to .NET migration problem)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Radith Silva - 18 Jul 2004 03:47 GMT
Hi all;

Private Sub cmdShow_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdShow.Click
       frmAbout.Show()
End Sub

Private Sub cmdHide_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdHide.Click
       frmAbout.Hide()
End Sub

In VB 6.0 that would enable me to show and hide my second frame; what
would i need to do in .NET.

All help appreciated.

Cheers. Radith Silva
Ken Tucker [MVP] - 18 Jul 2004 11:58 GMT
Hi,

Dim frm As frmAbout

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click

Try

frm.Show()

Catch

' frm does not exist make it equal to a new frmAbout

frm = New frmAbout

frm.Show()

End Try

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click

frm.Hide()

End Sub

Ken

-------------------------

> Hi all;
>
[quoted text clipped - 14 lines]
>
> Cheers. Radith Silva
Herfried K. Wagner [MVP] - 18 Jul 2004 12:24 GMT
*     Radith Silva <radith@xtra.co.nz> scripsit:
> Private Sub cmdShow_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles cmdShow.Click
[quoted text clipped - 8 lines]
> In VB 6.0 that would enable me to show and hide my second frame; what
> would i need to do in .NET.

\\\
Private m_AboutForm As New AboutForm()
.
.
.
m_AboutForm.Show()
.
.
.
m_AboutForm.Hide()
///

Signature

Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.