Skip to main content


Showing posts from February, 2011

XI IT Assignments - Controls: Events & Properties

Hello Programmers, Run through this tutorial cum assignment to get a hang of various controls, their properties and the most used events associated with these controls. Try the following and send me the answers or the codes (zip all files - frm & vbp - and send) on the mail id: Form This is the most basic control. You have already seen some events on this object. What is the sequence in which the events Activate, Load & Open occur? To find out, write a simple code for each of these events to display a msgbox saying that the event has occured. Now run the program. One by one the messages will popup showing you what happens and in which order. What does the KeyPress event do? To find out trap this event, i.e. write a small code at this event, say like - MsgBox "Hello". Now run the program and try pressing a key ... What do the MouseUp and MouseDown events do? Trap these events like described above and find out the difference between the two state

Online lecture assignments for XI Sc

Hello Programmers, To use this medium effectively, refresh this page every 10 min or so for as long as the lecture is in session, since I will update this post time and again. You can also try coming in on NetMeeting (if that works) by reading the instructions on our web . Here you go: Given three numbers a, b & c you can find out which is the largest of them by comparing each number with the others in turn. Can you do this in a program? The logic goes like this: 1. Take a, b, c from the user 2. Is a > b and c ... then a is largest 3. Is b > a and c ... then b is largest 4. If none of the above, then c is largest Now what will you do if you need to find the largest among say a 100 numbers??? Can the same logic work? Using arrays makes life better while computing large data. So try this logic Take the numbers as inputs into an array having an appropriate size, say 'n' define an arbitrary high value - max - maybe 0 Run loop from 0 to n In each iteration, check if the i

Assignments for XI Sc - IT

1. Simple Controls A. Write a program to take the price of raw materials A & B from the user and hence compute the cost price. Show the same to the user in a box and then calculate the selling price with 20% profit added to the cost price. Show the same in a separate box. Use four text boxes and name them properly B. Now add a button to the earlier program so that you can run the calculations when the button is clicked and not at Form_Load or Form_Click. If you dont know about buttons ... look below C. Now add a check box (called AddProfit) to the earlier code / form. Hence change your code so that, it will add the profit to the cost price, only it the AddProfit box is checked (i.e. there is a tick mark in it) else, it should simply show the cost price as selling price About Buttons: Use the toolbox you see on the left, OR open the same from the spanner & hammer icon on the top. Click on the plain rectangle below the "A" icon and to its right. Then drag and drop on