Creating forms!

A

Atmapuri

Hi!

How can I create a custom Form() within a component
and have it create a proper handle? Currently i can call
CreateControl but there is no effect. Should I assign a parent?

Where do I get the parent from, (hopefully without the explicit
reference to the main form).

Thanks!
Atmapuri
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Can you be more especific, I did nt understand your question.
 
N

Nicholas Paldino [.NET/C# MVP]

Atmapuri,

From the documentation for the Handle property on the Control class
(which Form derives from and does not override):

The value of the Handle property is a Windows HWND. If the handle has not
yet been created, referencing this property will force the handle to be
created.

So, just access the Handle property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top