Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

starting with borland c++

Status
Not open for further replies.

newapocalipsis

Programmer
Aug 10, 2001
48
0
0
MX
i have borlan c++ builder professional, i know c++, but i dont know how to start, and the help it´s only on opp basics and ide, but i dont know what can i do in a form, with the buttons and the controls, any help appreciated.


Dark Dragon Golden Dragon Is Coming Soon...
 
BCB (Borland C++ Builder) is a bit intimidating for those not familar with RAD (Rapid Application Developement). Essentially, you will drag and drop components on a form then go to the properties and put your code there. Once you get the hang of components and how to modify their properties, it starts to be more natural.

Look at the FAQ in this forum for some links that might get you on your way. For starters try this.
On a new form, drop a Button component onto the form.

Change the Caption (on the left hand side of the form in the Object Inspector) of the button to "Hi".

Scroll down the Object Inspector to Name and change that to "HiButton". Save this form as "HiUnit.cpp".

Click on the Events tabs in the Object Inspector. Double click on the OnClick event and put in the following code
Code:
 Application->MessageBox("Hello, World!", "Hi", MB_OK);
and click save.

Finally click the Run arrow in the tool bar.

If everything goes right you will get a window with a button labeled "Hi". When you press the button, you will get a message box with an OK button. James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that they think I am now
qualified to do anything with nothing.
 
Drag ojects from the component pallete. set designtime properties in the object inspecter, program event handlers,

the second tabsheet in the object inspecter is the events that are available for coding. basically this is event handler coding. in the event handlers you insert your code.
such as

void __fastcall TForm::Button1Click(TObject *Sender)
{
Application->Terminate ();
}

When you select an event in the object inspecter the empty function is generated in the editor.

look up TForm in the help, this might be a place to start.
each class (object) has properties, metods and events. It took me a month or to but I eventually got the hang of it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top