0% found this document useful (0 votes)
8 views20 pages

Megha VB

Uploaded by

Raman Ghorpade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views20 pages

Megha VB

Uploaded by

Raman Ghorpade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Private Sub cmdConcat_Click()

lblDisplay.Caption = txtInput1 + txtInput2

lblDisplay.FontBold = True

lblDisplay.FontSize = 14

lblDisplay.Alignment = 2

End Sub

Output:-

Megha

Pusadkar

Megha Pusadkar
Private Sub cmdSubmit_Click()

If txtPass.Text = "User" Or txtPass.Text = "Admin" Then

MsgBox "Password Correct"

Else

MsgBox "Password Incorrect"

End If

End Sub

Output:-

Megha18
Private Sub cmdSubmit_Click()

If txtPass.Text = "User" Or txtPass.Text = "Admin" Then

MsgBox "Password Correct"

End If

End Sub

Output:-

Megha18
Private Sub cmdSubmit_Click()

Select Case Val(txtInput)

Case 1

lblOutput.Caption = " you have won a adventure book"

Case 2

lblOutput.Caption = "you have won quiz book"

Case 3

lblOutput.Caption = "you have won a oxford dictionary"

Case 4

lblOutput.Caption = "you have won a food chart"

Case 5

lblOutput.Caption = "you have won a Atlas book"

End Select

End Sub

Output:-
Private Sub Option1_Click()

If Option1.Value = True Then

Shape1.Shape = 0

End If

End Sub

Private Sub Option2_Click()

If Option2.Value = True Then

Shape1.Shape = 1

End If

End Sub

Private Sub Option3_Click()

If Option3.Value = True Then

Shape1.Shape = 2

End If

End Sub

Private Sub Option4_Click()

If Option4.Value = True Then

Shape1.Shape = 3

End If

End Sub

Private Sub Option5_Click()

If Option5.Value = True Then

Shape1.Shape = 4
End If

End Sub

Private Sub Option6_Click()

If Option6.Value = True Then

Shape1.Shape = 5

End If

End Sub

Output:-
Private Sub Command1_Click()

a=a+1

If a = 1 Then

Label1.Caption = "To remember your friends Birthday maintain diary"

ElseIf a = 2 Then

Label1.Caption = " While studying create key notes.It helps in remembering the topic later."

ElseIf a = 3 Then

Label1.Caption = "while buying things,judge the market price."

ElseIf a = 4 Then

Label1.Caption = "Before you start a work keep the things ready required to completethe work."

ElseIf a = 5 Then

Label1.Caption = "Avoid tension by hearing music."

ElseIf a = 6 Then

Label1.Caption = "Think before you start a work."

ElseIf a = 7 Then

Label1.Caption = "Don't be upset if you fall. remember failure is the pillar of success."

ElseIf a = 8 Then

Label1.Caption = "Don't shout if you have done mistake. say sorry and accept your mistake."

ElseIf a = 9 Then

Label1.Caption = "Nothing is stable in this world,but your good work is stable."

ElseIf a = 10 Then

Label1.Caption = "Remember majority wins so live ans work together."

ElseIf a = 11 Then

Label1.Caption = "tips ends here thankyou."

End

End If

End Sub
Private Sub Form_Load()

limit = 2

sc = 2 * 60

Timer1.Enabled = True

End Sub

Private Sub Timer1_Timer()

Label2.Caption = Format(Time, "hh:mm:ss AM/PM")

Static seconds

seconds = seconds + 1

If seconds = sc Then

MsgBox " your time is over"

Timer1.Enabled = False

End

End If

End Sub

Output :-
Private Sub HScroll1_Change()

Label1.FontSize = HScroll1.Value

End Sub

Output :-
Private Sub Combo1_Change()

If Combo1.Text = "World publisher" Then

Text1.Text = "Teach office XP in 24 hrs,oracle 9i,window XP,visual Basic Projects"

End If

If Combo1.Text = " Prime publisher" Then

Text1.Text = "internet and web desighning,SQL,perl,XML,VC++,mastering java,text yourself VB"

End If

If Combo1.Text = "Image Publisher" Then

Text1.Text = "Flash,photoshop 7.0,corel draw 9.0,page maker,3D max,2D max"

End If

If Combo1.Text = " Dream publisher" Then

Text1.Text = "internet C++ projects,visual basic.Net,java script,learning visual foxpro 6.0"

End If

End Sub

Output :-
Private Sub Command1_Click()

If List1.ListIndex = 0 Then

MsgBox "1200 copies"

End If

If List1.ListIndex = 1 Then

MsgBox "1950 copies"

End If

If List1.ListIndex = 2 Then

MsgBox "400 copies"

End If

If List1.ListIndex = 3 Then

MsgBox "1000 copies"

End If

If List1.ListIndex = 4 Then

MsgBox "760 copies"

End If

If List1.ListIndex = 5 Then

MsgBox "2200 copies"

End If

If List1.ListIndex = 6 Then

MsgBox "1150 copies"

End If

If List1.ListIndex = 7 Then

MsgBox "800 copies"

End If

If List1.ListIndex = 8 Then

MsgBox "1000 copies"


End If

End Sub

Private Sub Form_Load()

End Sub

Output:-

Private Sub Command1_Click()


label1.Caption = "visual basic6.0"

label1.ForeColor = &HFF&

label1.BackColor = &HFFFFFF

label1.FontBold = True

Command1.Enabled = False

End Sub

Private Sub Check1_Click()


If Check1.Value = 1 Then

Text1.FontBold = True

Else

Text1.FontBold = False

End If

End Sub

Private Sub Check2_Click()

If Check2.Value = 1 Then

Text1.FontItalic = True

Else

Text1.FontItalic = False

End If

End Sub

Private Sub Check3_Click()

If Check3.Value = 1 Then

Text1.FontUnderline = True

Else

Text1.FontUnderline = False

End If

End Sub

Private Sub Check4_Click()

If Check4.Value = 1 Then

Text1.ForeColor = &HFF&

Else
Text1.ForeColor = &H0&

End If

End Sub

Private Sub Check5_Click()

If Check5.Value = 1 Then

Text1.ForeColor = &HC00000

Else

Text1.ForeColor = &H0&

End If

End Sub

Private Sub Check6_Click()

If Check6.Value = 1 Then

Text1.ForeColor = &HC00000

Else

Text1.ForeColor = &H0&

End If

End Sub

\
Private Sub Option1_Click()

If Option1.Value = True Then

Label1.Caption = " sorry better luck next time "

Command1.Enabled = False

ElseIf Option2.Value = True Then

Label1.Caption = " congratulation! you have won rs.50/-"

Command1.Enabled = False

ElseIf Option3.Value = True Then

Label1.Caption = " congratulation! you have won rs.25/-"

Command1.Enabled = False

ElseIf Option4.Value = True Then

Label1.Caption = " HaHa! you have won the jackpot "

Command1.Enabled = False

End If

End Sub

Private Sub Form_Load()

Option1.Value = False

Option2.Value = False

Option3.Value = False

Option4.Value = False

End Sub
s
Private Sub Command1_Click()

Text3.Text = Val(Text1.Text) + Val(Text2.Text)

End Sub

Private Sub Command2_Click()

Text3.Text = Val(Text1.Text) - Val(Text2.Text)

End Sub

Private Sub Command3_Click()

Text1.Text = ""

Text2.Text = ""

Text3.Text = ""

End Sub

Private Sub Command1_Click()

Text3.Text = Val(Text1.Text) + Val(Text2.Text)

End Sub

You might also like