VB 11
VB 11
====================x====================
Pointer
Move, Resize Etc...
Picture
Properties = Picture, AutoSize
Format (.jpg, bmp, mpeg, gif, wmf, ico)
Label
Proerties = (Caption, AutoSize, WordWrap)
Textbox
Properties =(Text, Locked, MaxLength, MultiLine, Password)
Frame
Minimum use
Command Button
Properties = (Caption, Font)
CheckBox
Properties = (Value)
========== code ==========
Private Sub Check1_Click()
If Check1.Value = 1 Then
Label1.Caption = "MIIT"
Else
Label1.Caption = "#name"
End If
End Sub
Combo Box
Style = (DropDown, Simple, Dropdown List)
Properties= (Style, Text, List, Sorted)
Method = Add Item, Remove Item, Access Item
End Sub
========================
EXAMPLE OF WHILE......... WEND
=========================
EXAMPLE OF DO.......... WHILE ...... LOOP
================================================
SPLASH SCREEN
- Project => Add Form => SplashScreen => Open
- Delete all the Existing Code
- Add a Timer Control => Properties => Interval = 3000
- Code ------------
Private Sub Timer1_Timer()
Load frmLogin
frmLogin.Show
Unload Me
End Sub
==========================
- PASSWORD SCREEN
- Project => Add Form => Login Dialog => Open
- Delete all the Existing Code
--------- Code -----------
Private Sub cmdOK_Click()
If txtUserName = "saroj" And txtPassword = "miit" Then
Load MDIForm1
MDIForm1.Show
unload frmlogin
Else
MsgBox ("Invalid User")
End If
End Sub
=====================
SETUP THE STARTUP OBJECT
- Project => Project1 Properties => Startup Object => FrmSplash => Ok
==================x==============
PROJECT CALCULATOR
- Create a New Project
- Resize like an Calculator
- Design all suitable Menu
- Add Text1 => Resize Text1 => Text1=Font Face= Arial, Size = 24
- Text1 => Properties => Alignment => Right
- Text1 => Properties => Text => 0
- Assign Command1 => Resize=> Copy & Paste 11times
- Command1(0)=> Caption => .
- Command1(1)=> Caption => 0
- Command1(2)=> Caption => 00
- Command1(3)=> Caption => 1
- Command1(4)=> Caption => 2
- Command1(5)=> Caption => 3
- Command1(6)=> Caption => 4
- Command1(7)=> Caption => 5
- Command1(8)=> Caption => 6
- Command1(9)=> Caption => 7
- Command1(10)=> Caption => 8
- Command1(11)=> Caption => 9
- Add Command2 = Caption = =
- Add Command3 = Caption = +
- Add Command4 = Caption = -
- Add Command5 = Caption = x
- Add Command6 = Caption = /
- Add Command7 = Caption = %
- Add Command8 = Caption = 1/x
- Add Command9 = Caption = M+
- Add Command10 = Caption = M-
- Add Command11 = Caption = MC
- Add Command12 = Caption = MR
- Add Command13 = Caption = C
- Add Command14 = Caption = CE
- Form1 => Caption => Calculator
========= CODE ===============
Dim op As String
Dim a, b, c As Double
Private Sub Command1_Click(Index As Integer)
Text1.Text = Text1.Text & Command1(Index).Caption
End Sub
File
... New
... Open
... Save
... Save As
Edit
... Cut
... Copy
... Paste
Format
... Font
... WordWrap
==========================x==================
Adding Adodc Control