100 likes | 105 Vues
Chapter 2. Application Design Flow. Development Cycle. Problem Analysis Algorithm Design Coding Verification. Windows Programming with BCB. Graphic user interface design Choose VCL components Set up their prosperities Implement event handlers Implement desired functionalities
E N D
Chapter 2 Application Design Flow Windows Programming, C.-S. Shieh, KUAS EC, 2005
Development Cycle • Problem Analysis • Algorithm Design • Coding • Verification Windows Programming, C.-S. Shieh, KUAS EC, 2005
Windows Programming with BCB • Graphic user interface design • Choose VCL components • Set up their prosperities • Implement event handlers • Implement desired functionalities • Modify VCL components’ prosperities Windows Programming, C.-S. Shieh, KUAS EC, 2005
What You Should Do • Get acquainted with VCL components. • Make good use of online help. Windows Programming, C.-S. Shieh, KUAS EC, 2005
TForm • Container of other VCL components, appeared as a window at run-time. • Properties • Name (AnsiString) • Caption (AnsiString) • Width (int), Height (int), Left (int), Top (int) • Color (TColor), Cursor (TCursor), Icon (TIcon) • Visible (bool) • BorderIcons (TBorderIcon), BorderStyle (TFormBorderStyle), BorderWidth TFormBorderStyle), FormStyle (TFormBorderStyle) Windows Programming, C.-S. Shieh, KUAS EC, 2005
TForm (cont) • Events • OnCreate, OnClose • Methods • Close() • Show(), Hide() Windows Programming, C.-S. Shieh, KUAS EC, 2005
TLabel • Non-windowed control that displays text on a form. • Properties • Caption (AnsiString), Font (TFont) Windows Programming, C.-S. Shieh, KUAS EC, 2005
TEdit • Used to retrieve text that users type. • Properties • Text (AnsiString) • Enabled (bool) • Events • OnChange, OnKeyDown • Methods • Clear() Windows Programming, C.-S. Shieh, KUAS EC, 2005
TButton • Creates a pushbutton control that users choose to initiate actions. • Properties • Caption (AnsiString), Font (TFont) • Enabled (bool) • Events • OnClick • Methods • Click() Windows Programming, C.-S. Shieh, KUAS EC, 2005
What You Should Do • Walk through the following sections in our textbook • 2.1-2.4, 2.6-2.7 Windows Programming, C.-S. Shieh, KUAS EC, 2005