This procedure demonstrates how to construct a simple “Hello world” VCL Forms application using either Delphi or C++. Though simple, the Windows Forms "Hello world" application demonstrates the essential steps for creating a VCL Forms application. The application uses a VCL Form, a control, an event, and displays a dialog in response to a user action.
Creating the "Hello world" application consists of the following steps:
New
Other
Delphi Projects or C++Builder Projects and double-click the VCL Forms Application icon. The VCL Forms Designer is displayed.
var s: string;
For C++, enter the following code:
AnsiString s;
s:= 'Hello world!'; ShowMessage(s);
For C++, enter the following code:
s = “Hello world!”; ShowMessage( s );
Run to build and run the application. The form displays with a button called Button1. |
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
|
What do you think about this topic? Send feedback!
|