Skip to main content

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.
  1. 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
  2. Draw an equilateral triangle (should actually look like it) whose one vertex is the point at which the user clicks on the form.
  3. 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.

Comments

Anonymous said…
answer to Q.1
1)Keydown,keypress,change and validate

2)got focus,lost focus,click,keypress
nisarg said…
1)a) ans.KeyDown,Keypress,Change & Validate.

b)gotfocus,click,keypress,lostfocus.
OR
gotfocus,keypress,click,lostfocus
mahesh said…
1)a) ans.KeyDown,Keypress,Change & Validate.

b)gotfocus,click,keypress,lostfocus.
OR
gotfocus,keypress,click,lostfocus
Unknown said…
1)a) ans.KeyDown,Keypress,Change & Validate.

b)gotfocus,click,keypress,lostfocus.
OR
gotfocus,keypress,click,lostfocus
Unknown said…
Sir i had a doubt about events in command button
Between click and keypress the order depends on the user,he would first click or press any key.
Omkar said…
1 TextBox
i)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
Elloit, Siddhesh, Siby, Ameya D, Tushar K, Ajinkya said…
1.a)KeyDown, Change, Keypress, Validate
b)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
Amar , Sameer , Akshay said…
1.a)KeyDown, Change, Keypress, Validate.
b)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
Anonymous said…
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?
Siddhesh said…
SIR , can u give me some hint for eqilateral triangle.....me working for hours but not getting the logic behind it......:|

All Time Popular Posts

Annual Day 2023

 After a long hiatus due to covid we finally got most activities on track. The Annual Day function is always a big deal for everyone at Abhinav. It has been a tradition my mother started that the Annual Day will be not a Teacher-managed event, but a Student Initiative. Since when I was a teenager, I was part of this and today 10 years after she passed, I still strive to make it work as she would have. After some hesitation, we began working in early January. I wanted to use an outside choreographer just so that teachers will not be burdened. (They are already struggling with post-covid learning difficulties) But then, an outside guy could never do justice to the Abhinav style of doing things. We always keep in mind that the cultural program should be enjoyable to everyone in the audience and at the same time should display as many of the diverse talents that our students have, as possible.  It was a great relief that my G3 students came to the rescue. Almost all of std 9 and m...

Are Self-Driving Cars Taking Over Humans?

- Arya Dharmadhikari(Std X, Abhinav Vidyalay) The 21st century has played an important role in the advancement of technologies. This development has even revolutionized the Automobile industry. We have developed from fuel-efficient vehicles to Hybrids and EVs and now we are enhancing self-driving vehicles. Tesla, Waymo, Volvo, GM, BMW, Mercedes are among the few companies that have started testing self-driving cars. The leading among them is Waymo, which has developed level 4 autonomy which we will discuss in the next section. So before reaching levels of autonomy we should understand what self-driving cars are and why we require them. What is a self-driving car? A self-driving car (also called an autonomous vehicle) is a car that is competent in driving itself without any human intervention. The car has sensors, cameras, lasers, radars, GPS, LIDAR through which the Artificial Intelligence senses the surrounding environment, this helps the car to navigate on its path and to detect sig...

Dark Matter

  ~Anvi Patil(X th A Abhinav Vidyalay) In the universe, there is about 25% of dark matter and 70% of dark energy but only 5% of it is visible. What is Dark Matter? It is a non-luminous material, which holds two galaxies. This cannot be called a black hole because it does not bend light. Then the question arrives, as it is non-luminous, how did we detect it? As it is not visible, scientists have found indirect methods to find more about it. One such method is by using the Fermi Gamma-Ray Space Telescope . Gamma rays are released when two particles of dark matter collide, Fermi telescope can be used to detect this collision. This topic was discovered by Fritz Zwicky in the 1930s, he discovered that galaxies were rotating at a faster rate than usual. A dark region seen in the foreground of a star field. This dark region could be a dark cloud of gases like hydrogen, left over from the formation of our galaxy Dark matter is called ‘dark’ not because it is ‘black’ but because it does...