Hi i use borland c++ builder as my c++ compiler. As a default option you can use a form defined as below

__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}

does anyone know how to get a handle on this form, ive tried always but none with success

thanks

There is a form property called 'handle'. It is the HWND of your form.

is it in the object inspector under the properties tab for the form? Ive had alook there but i can't find a 'handle'

is it in the object inspector under the properties tab for the form? Ive had alook there but i can't find a 'handle'

It is a read-only property so it will not be listed in the Object Inspector.

You can read the docs by placing the cursor over the word "TForm1" and pressing F1.

hi, ive done what you suggested and i think ive come across the code below

Form1->Handle;

is it really as easy as that?

hi, ive done what you suggested and i think ive come across the code below

Form1->Handle;

is it really as easy as that?

Yes. Try it out. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.