To create Visual Basic .Net Form, MainForm.vb.
 
 
 
          
      The Form design, Mainform.vb
 



   
Rename  the Form  Form1.vb created and add new controls to it

 
Classes used in this Form:
          MainMenu, Timer, PictureBox, Label and StausBar

 

Rename the Form - Form1.vb and Modify the Properties corresponding ...
 1- Rename the Form
  • On the View menu , click  Solution Explorer
  • In Solution Explorer, expand the APP-VBNet project node  and select Form1.vb
  • In Properties windows, Type the new File Name
      Old New
    Filename : Form1.vb MainForm.vb

 
2- Add  Folder and two picture files ..
 
  • Create new Folder
     
    • On the View menu , click  Solution Explorer
    • In Solution Explorer, expand the APP-VBNet project node, click Right mouse Button, click Add of the Popup menu, and the click New Folder
    • New Folder appears in the Solution Explorer. Rename it - Pic
  • Add Picture Files
     
    • From the CD-Rom - Teach_VNet, copy  the bmp file ingraphic1.bmp (\\APP-VBNet\Pic\ingraphic1.bmp) to the folder-
      c:\APP-VBNet\Pic
    • From the CD-Rom - Teach_VNet, copy  the icon  file App-VBNet.ico (\\APP-VBNet\Pic\App-VBNet.ico) to the folder -
      c:\APP-VBNet\Pic
    •  On the Projet menu , click Add Existing Item ..., Add Existing Item - APP-VBNet dialog box appears, select the files ingraphic1.bmp and App-VBNet.ico of the folder c:\APP-VBNet\Pic, and then click Open.

 3- Modify the Form Properties ...
  • On the View menu , click  Solution Explorer
  • In Solution Explorer, expand the APP-VBNet project node
  • Right click the MainForm.vb and click View Designer on the shortcut menu to open the  Properties Windows.
  • In Properties windows, modify ...
     
      Old New
    Name:
    FormBorderStyle
    Icon:
    Menu:
    Size:
    Text:
    Window State:
    Form1
    Sizable
    Icon
    (none)
    300,300
    Form1
    Normal
    MainForm
    FixedSingle
    Icon
    mainMenu1
    504,485
    Main Form ...
    Maximized

 

 Modify the Startup Object ...
  • On the Project menu , click  APP-VBNet Properties ..., the APP-VBNet Property Pages dialog box appears
  • In the Startup object combo box, choose and  select MainForm
  • Click OK
 

 

 Add the following controls to ...

 

 The codes  corresponding ...

 

 


 


Previous Home
3
Next