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 / April 2005

Tip: Looking for answers? Try searching our database.

Close a Instance of a Class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gv - 25 Apr 2005 17:31 GMT
Hi all,

How do I close a instance of a class created like this:

I call this class in my project like this
           StatMess.Show("Testing")
this shows a status form

         ...I do some things here

         now here is where I want to close the status form?

Class code:

Imports System.Drawing.Drawing2D, System.Drawing, System.Windows.Forms
Public Class StatMess
   Inherits Form

   Private foreCol As Color = SystemColors.ControlText
   Private backCol As Color = SystemColors.Control
   Private fnt As Font = New Font("Arial", 8)

   Public Overloads Shared Sub show(ByVal message As String)
       Dim frmMess As New StatMess
       frmMess.StatusMessage(message)

   End Sub

   Private Sub StatusMessage(ByVal message As String)
       Me.SuspendLayout()
        etc........

   End Sub

End Class
Chris Dunaway - 26 Apr 2005 15:03 GMT
Since it inherits from Form, you should be able to just call its .Close
method.

Rate this thread:







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.