Minggu, 25 Desember 2011

Formulir dasar untuk menciptakan antarmuka aplikasi. Anda dapat menggunakan formulir untuk menambahkan jendela dan kotak dialog untuk aplikasi Anda. Anda juga dapat menggunakannya sebagai wadah untuk barang-barang yang bukan merupakan bagian terlihat dari antarmuka aplikasi.

Sebagai contoh, Anda mungkin memiliki bentuk dalam aplikasi Anda yang berfungsi sebagai wadah untuk grafis yang Anda berencana untuk menampilkan dalam bentuk lain. Langkah pertama dalam membangun sebuah aplikasi Visual Basic adalah untuk menciptakan bentuk-bentuk yang akan menjadi dasar untuk antarmuka aplikasi Anda. Kemudian Anda menarik benda-benda yang membentuk antarmuka pada bentuk yang Anda buat.

Toolbox:

Toolbox berisi sekumpulan kontrol yang digunakan untuk menempatkan pada Formulir pada waktu desain sehingga menciptakan area antarmuka pengguna. Kontrol tambahan dapat dimasukkan dalam toolbox dengan menggunakan item menu pada Komponen menu Project. Toolbox Sebuah ditampilkan di bawah.

Control>Description

Pointer >Provides a way to move and resize the controls form
PictureBox>Displays icons/bitmaps and metafiles. It displays text or acts as a visual container for other controls.
TextBox >Used to display message and enter text.
Frame S>erves as a visual and functional container for controls
CommandButton >Used to carry out the specified action when the user chooses it.
CheckBox >Displays a True/False or Yes/No option.
OptionButton >OptionButton control which is a part of an option group allows the user to select only one option even it displays mulitiple choices.
ListBox Displays a list of items from which a user can select one.
ComboBox >Contains a TextBox and a ListBox. This allows the user to select an ietm from the dropdown ListBox, or to type in a selection in the TextBox.
HScrollBar and VScrollBar >These controls allow the user to select a value within the specified range of values
Timer >Executes the timer events at specified intervals of time
DriveListBox >Displays the valid disk drives and allows the user to select one of them.
DirListBox >Allows the user to select the directories and paths, which are displayed.
FileListBox >Displays a set of files from which a user can select the desired one.
Shape >Used to add shape (rectangle, square or circle) to a Form
Line >Used to draw straight line to the Form
Image >used to display images such as icons, bitmaps and metafiles. But less capability than the PictureBox
Data >Enables the use to connect to an existing and display information from it.
OLE >Used to link or embed an object, display and manipulate data from other windows based applications.
Label >Displays a text that the user cannot modify or interact with.


For this "Hello, world!" application, you'll use two controls from the Toolbox.

1.Text box
2.Command Button


To draw a control using the Toolbox

1. Click the tool for the control you choose to draw - in this case, the text box .

2. Move the pointer onto your form. The pointer becomes a cross hair.

3. Place the cross hair where you want the upper-left corner of the control.

4. Drag the cross hair until the control is the size you want.

5. Release the mouse button. The control appears on the form .



Cara lain sederhana untuk menambahkan kontrol untuk membentuk adalah untuk double-klik tombol untuk yang kontrol di Toolbox. Hal ini menciptakan kontrol standar ukuran yang terletak di tengah bentuk, maka Anda dapat memindahkan kontrol ke lokasi lain pada formulir.

Klik halaman berikutnya untuk melihat bagaimana untuk mengubah ukuran, Pemindahan, dan Mengunci Kontrol...

Tidak ada komentar:

Posting Komentar

Daftar Blog Saya

Total Tayangan Halaman