Make One Form Parent of Another

Make One Form Parent of Another

Prior to VB5, when you wanted to make a form appear on top of another form, you either made it modal or used an MDIForm with children. If you wanted to go beyond that, you had to use API calls. Starting with VB5, you can use the Show method’s optional ownerform parameter to set one form as the parent of another. This means you always place the child form-not an MDI child-on top of the parent form, even though the parent form remains active. You can also use the style vbModal parameter to force modality, but that defeats any reason to use ownerform. Here’s how you invoke the ownerform parameter, making a form a nonmodal child of a non-MDIForm:

 Private Sub Command1_Click()	Form2.Show , MeEnd Sub
Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular