Tally PGRM
Tally PGRM
DESIGN:
CODING:
Private Sub Command1_Click()
End
End Sub
Private Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As
Single)
If Button = 1 Then
Option1.Value = True
MsgBox "Left Button is clicked"
Else
Option1.Value = False
End If
If Button = 2 Then
Option2.Value = True
MsgBox "Right Button is clicked"
Else
Option2.Value = False
End If
End Sub
OUTPUT:
DESIGN:
CODING:
Private Sub Command1_Click()
End
End Sub
Private Sub MSFlexGrid1_MouseMove (Button As Integer, Shift As Integer, x As Single, y
As Single)
For i = 0 To 20
If MSFlexGrid1.MouseCol = i Then
MSFlexGrid1.MousePointer = i + 2
End If
If MSFlexGrid1.MouseRow = i Then
MSFlexGrid1.MousePointer = i + 8
End If
Next
End Sub
OUTPUT:
DESIGN:
CODING:
OUTPUT:
4. Students Information
****************************
DESIGN:
CODING:
OUTPUT:
DESIGN:
CODING:
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Load()
Label2.Caption = "Have a Wonderful day"
Label2.Font = 100
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
OUTPUT:
6. Mini calculator
********************
DESIGN:
CODING:
Dim fn As Double
Dim sn As Double
Dim op As String
Private Sub Command1_Click(Index As Integer)
If Val(Text1.Text) = 0 Then
Text1.Text = Command1(Index).Caption
Else
Text1.Text = Text1.Text + Command1(Index).Caption
End If
End Sub
Private Sub Command2_Click(Index As Integer)
fn = Val(Text1.Text)
op = Command2(Index).Caption
Text1.Text = ""
End Sub
Private Sub Command3_Click()
sn = Val(Text1.Text)
Text1.Text = ""
Select Case (op)
Case "+"
Text1.Text = fn + sn
Case "-"
Text1.Text = fn - sn
Case "*"
Text1.Text = fn * sn
Case "/"
Text1.Text = fn / sn
End Select
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Command5_Click()
Text1.Text = ""
End Sub
Private Sub Form_Load()
Text1.Text = "0"
End Sub
OUTPUT:
7. Develop a Notepad
************************
DESIGN:
CODING:
OUTPUT:
CODING
End
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.Move First
End Sub
Private Sub Command5_Click()
Adodc1.Recordset.Move previous
If Adodc1.Recordset.BOF Then
MsgBox "this is the first record"
Adodc1.Recordset.Move First
End If
End Sub
Private Sub Command6_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
MsgBox "this is the last record"
Adodc1.Recordset.Move Last
End If
End Sub
Private Sub Command7_Click()
Adodc1.Recordset.MoveLast
End Sub
Private Sub Command8_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End Sub
SQL> Create table pr8(register_number varchar(10),name varchar(10), course varchar
(5),batch number(5) );
Table created
SQL> Insert into pr8 values(1u14bb041,sadhana,bba ca,2014);
1 row created
SQL> Insert into pr8 values (1u14bb040,ruba, bba ca,2014);
1 row created
SQL>Insert into pr8 values (1u14bb054,viji,bba ca,2014);
1 row created
SQL> select * from pr8;
REGISTER_NUMBER NAME
COURSE
BATCH
1U14BB041
SADHANA
BBA CA
2014
1U14BB040
RUBA
BBA CA
2014
1U14BB054
VIJI
BBA CA
2014
NAME
SADHANA
RUBA
VIJI
RAMA
PARAMESH
COURSE
BBA CA
BBA CA
BBA CA
BBA CA
BBA CA
BATCH
2014
2014
2014
2014
2014
OUTPUT
CODING:
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
MsgBox "The Record is added"
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.Delete
MsgBox "The Record is deleted"
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command4_Click()
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
End Sub
SQL>Create table a (name varchar(9),emp_no varchar(9), department
varchar(9) , designation varchar(5),salary number(5));
Table is created
SQL>Insert into a values(sadhana, 1001 , sales,20000);
1 row created
SQL> Insert into a values(ramasree,1002, production,25000);
1 row created
SQL> Insert into a values(ruba,1003,sales,10000);
1 row created
SQL> select * from a;
NAME
SADHANA
RAMA
RUBA
VIJI
EMP_NO
1001
1002
1003
1004
DEPARTMENT
SALES
PRODUCTION
SALES
SALES
DESIGNATION
MANAGER
MANAGER
SUPERVISOR
SUPERVISOR
SALARY
20000
20000
7000
5000
OUTPUT:
SQL>select * from a;
NAME
SADHANA
RAMA
RUBA
VIJI
JINITHA
SHILPA
EMP_NO
1001
1002
1003
1004
1005
1006
DEPARTMENT
SALES
PRODUCTION
SALES
SALES
SALES
PRODUCTION
DESIGNATION
MANAGER
MANAGER
HR
SUPERVISOR
MANAGER
CLERK
SALARY
20000
20000
70000
5000
10000
2500
10.ADVERTISEMENT BANNER
*******************************************
DESIGN:
CODING:
End Sub
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Load()
Slider1.Max = 100
Slider1.Min = 1
Slider1.Value = 1
Timer1.Enabled = False
Timer1.Interval = Slider1.Value
Timer1.Enabled = False
End Sub
Private Sub Slider1_vcClick()
Timer1.Interval = Slider1.Value
End Sub
Private Sub Timer1_Timer()
Static count As Integer
If (Picture1.Left + Picture1.Width) <= 0 Then
Picture1.Left = Form1.Width
count = count + 1
End If
Picture1.Left = Picture1.Left - 100
End Sub
OUTPUT:
EMP_NAME
-----------------
DEP
SALARY
-------
------------
001
Alex
HR
15,000
002
Boopa
System
20,000
003
Abi
Sales
22,000
004
Gopal
Purchase 15,000
005
Vicky
Finance
16,000
NAME
CIA EOS
TOT RESULT
------------
---------
------ ------
------- -------------
1U14BB001 Aarthi
33b
RMM
15
30
45
FAIL
1U14BB001 Bala
55g
CMA
15
44
69
PASS
1U14BB001 Eniyavan 4
99v
VB
20
60
80
PASS
1U14BB001 Arun
67c
COP
15
50
65
PASS
1U14BB001 Rama
54f
BANKING
18
48
66
PASS
NAME
------------ ------------
EXT_MRK
TOT
1234
Paramesh
44h
RMM
14
40
54
1342
Sadhana
78k
CMA
20
60
80
1765
Viji
21c
COP
18
58
76
1005
Ruba
56y
Banking
19
55
74
1006
Jinitha
34l
VB
20
60
80
SUB_NAME
TOT
-------------
-----------------
--------
Paramesh
RMM
54
NAME
VB
EDC TOT
-----------
----------
6785
Maheh
80
65
78
57
45
325
65
6879
Karthi
76
56
87
75
54
348
69
6785
Prabhu
56
57
40
57
60
270
54
6978
Rooban
65
46
67
45
70
293
59
6543
Surya
75
68
90
50
80
363
73
NAME
------------ ----------6543
Surya
6879
Karthi
6785
Mahesh
PERCENTAGE
9 rows updated
SQL> update pass set net_pay = grss_pay-pf
9 rows updated
SQL> commit;
Commit complete
DSNGTN
ID
BASIC
DA HRA PF
PAY
GRSS NET
PAY
PAY
1H1
Shilpa
HR
14500
200
600
1U2
Rama
Sales
Supervisor 11000
400
400
1O1
Sadhana
Office
Manager
14000
200
500
Clerk
10500
400
500
Manager
13500
400
450
Asst-Mangr 11000
200
500
Manager
1O2
Viji
Office
1F1
Ruba
Finance
1F2
Jinitha
Finance
1P1
Jasmine
Production
Manager
13000
300
400
1P2
Sujitha
Production
Supervisor 10000
400
300
1U1
Aarthi
Sales
Manager
200
300
12500