Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Working with owned forms

Total Hit ( 3278)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


If a form owns another form, the owned form will be always displayed in front of its owner form, no matter which is the active form. This makes owned forms ideal for implementing tool and palette windows. Another feature of owned forms: when the user closes or minimizes the owner form, all the owned forms are also closed or minimized. When minimized, the owner forms and all its owned forms count as one icon in the Windows taskbar.

In Visual Basic 6, you can display a form as an owned form by passing Me as the second argument of the Show method, as in:

Click here to copy the following block
' The Visual Basic 6 way for creating an owned form
Dim frm As New CalleeForm
frm.Show , Me

You can't pass any argument to the Show method under Visual Basic .NET, but you declare that the callee form is owned by the caller form by invoking the AddOwnedForm method:

Click here to copy the following block
' The Visual Basic .NET way for creating an owned form
Dim frm As New CalleeForm()
' Add this form to the list of owned form.
Me.AddOwnedForm(frm)
frm.Show()

A form can detect whether it is being owned by another form using the Owner property; a form can enumerate its owned forms by iterating over the collection returned by the OwnedForms property.


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.