- What is the sequence for the events given below and when do they occur for the given object?
a) Textbox - Change, KeyPress, KeyDown, Validate
b) Command button - Click, GotFocus, LostFocus, KeyPress
c) Combo Box - Change, Click, DblClick, DropDown, Scroll - Draw an equilateral triangle (should actually look like it) whose one vertex is the point at which the user clicks on the form.
- Make a simple calculator which has buttons for different numbers & operations (+, -, *, /, ^) and a box to display the result of each operation as well as each number being typed.
This is for students & teachers of Abhinav to interact, discuss doubts, projects, assignments, etc. Please maintain decency at all times. Do not put personal information here or use this space for promoting anything. Also, Do not copy & paste from the net but paste only the link to the content.
Wednesday, March 3, 2010
Trapping events - IT assignment for Std XI
Perform these tasks on your PC and give yor answers as comments to this post or as an email to my ID - director@abhinav.ac.in.
Subscribe to:
Post Comments (Atom)
answer to Q.1
ReplyDelete1)Keydown,keypress,change and validate
2)got focus,lost focus,click,keypress
1)a) ans.KeyDown,Keypress,Change & Validate.
ReplyDeleteb)gotfocus,click,keypress,lostfocus.
OR
gotfocus,keypress,click,lostfocus
1)a) ans.KeyDown,Keypress,Change & Validate.
ReplyDeleteb)gotfocus,click,keypress,lostfocus.
OR
gotfocus,keypress,click,lostfocus
1)a) ans.KeyDown,Keypress,Change & Validate.
ReplyDeleteb)gotfocus,click,keypress,lostfocus.
OR
gotfocus,keypress,click,lostfocus
Sir i had a doubt about events in command button
ReplyDeleteBetween click and keypress the order depends on the user,he would first click or press any key.
1 TextBox
ReplyDeletei)Key Down
ii) Key Press (every time a key is pressed , computer records that the key is pressed down, so key down is activated first and key press isnt activated until the key down event ends)
iii) Change (After any of the above events are completed, the computer records that a change has taken place, thus change event activates)
iv) Validate
II Command Button
i) Got Focus
ii) Click / Key Press (Depends on which is pressed first...Mouse/Key)
iii) Lost Focus
Posted By:Omkar,Saarang,
Athang,Kshitij &
Shraddha
1.a)KeyDown, Change, Keypress, Validate
ReplyDeleteb)Gotfocus, Click, KeyPress, Lost Focus
3.Option Explicit
Dim a As Single
Dim b As Single
Private Sub Command1_Click()
a = InputBox("enter your 1st number")
b = InputBox("enter your 2nd number")
End Sub
Private Sub Command2_Click()
MsgBox a + b
End Sub
Private Sub Command3_Click()
MsgBox a - b
End Sub
Private Sub Command4_Click()
MsgBox a * b
End Sub
Private Sub Command5_Click()
MsgBox a / b
End Sub
Private Sub Command6_Click()
MsgBox a ^ b
End Sub
1.a)KeyDown, Change, Keypress, Validate.
ReplyDeleteb)Gotfocus, Click, KeyPress, Lost Focus.
3.Option Explicit
Dim a As Single
Dim b As Single
Private Sub Command1_Click()
a = InputBox("enter your 1st number")
b = InputBox("enter your 2nd number")
End Sub
Private Sub Command2_Click()
MsgBox a + b
End Sub
Private Sub Command3_Click()
MsgBox a - b
End Sub
Private Sub Command4_Click()
MsgBox a * b
End Sub
Private Sub Command5_Click()
MsgBox a / b
End Sub
Private Sub Command6_Click()
MsgBox a ^ b
End Sub
Why did Sameer, Amar and Akshay copy Elloit and his group's program code?Didn't they understand when sir thought in the class?I request Kedar sir to take some action about this, or else everyone will start copying the programs.In that case what is the use of the assignment?
ReplyDeleteSIR , can u give me some hint for eqilateral triangle.....me working for hours but not getting the logic behind it......:|
ReplyDelete