If You Are From The 09 Batch Then Read This >>

This Site is created for the Bharati Vidyapeeth's BCA 09 Batch..and hence everyone from you are requested to send your email ID at abhilash238650@gmail.com..Owner will send you a request to your Email-ID and after accepting it even you can post your views, day to day experiences and class works on this blog.
Visit owner's blog at
www.bloggerabhilash.info

Thursday, April 21, 2011

Visual Basic Practicals

Practical 1 : Listbox and Combo Box

Private Sub Command1_Click()
List1.AddItem Text1.Text
Text1.SetFocus
Command1.Enabled = False
Label1.Caption = List1.ListCount
End Sub

Private Sub Command2_Click()
Dim Remove As Integer
Remove = List1.ListIndex
List1.RemoveItem Remove
Label1.Caption = List1.ListCount
End Sub

Private Sub Command3_Click()
List1.Clear
Label1.Caption = List1.ListCount
End Sub

Private Sub Text1_Change()
If (Len(Text1.Text) > 0) Then
Command1.Enabled = True
End If
End Sub



Horizontal Scroll Bar

Private Sub Command1_Click()
Dim I As Integer
Dim J As Integer
I = 1
Do While I < HScroll1.Value
J = J + I
I = I + 1
Loop
Text1.Text = Str(J)
End Sub

Check Box and Option button Font and Color

Private Sub chkBold_Click()
If chkBold.Value = 1 Then
Text1.FontBold = True
Else
Text1.FontBold = False
End If
End Sub

Private Sub chkitalic_Click()
If chkitalic.Value = 1 Then
Text1.FontItalic = True
Else
Text1.FontItalic = False
End If
End Sub

Private Sub chkunderline_Click()
If chkunderline.Value = 1 Then
Text1.FontUnderline = True
Else
Text1.FontUnderline = False
End If
End Sub

Private Sub optblue_Click()
Text1.ForeColor = vbBlue
End Sub

Private Sub optgreen_Click()
Text1.ForeColor = vbGreen
End Sub

Private Sub optred_Click()
Text1.ForeColor = vbRed
End Sub

 Timer Control

Practical no. 5 : TIMER CONTROL

set timer at enable=false interval=250

Start a new VB project and put 2 command buttons and a timer control on the form. set the properties of the controls as follows:
Command button - property - Name: cmdStart Caption: start timer

Command button - name: cmdStop Caption: StopTimer

Timer: Name: tmr Test Enabled:False Interval:250

In General declaration:
Private mintcount as integer

Code the click event for the 2 command button and the timer event for the timer control as follows:
Private sub cmdstart_click()
mint count=0
timer1. enable =true
end sub

Private sub cmdstop_click()
timer1.enable=false
end sub

Private sub Timer1_timer()
mint count+1
Print "timer fine origin count =" & mint count
end sub

Shipment Cost: Checkbox and option button

Private Sub CmdCalcost_Click()
Dim unitorder As Integer
Dim cost As Currency
unitorder = Val(txtbox1.Text)
If optWholesaler.Value = 1 Then
Select Case unitorder
Case 1 To 15
cost = unitorder * 50
Case 16 To 20
cost = unitorder * 45
Case 21 To 30
cost = unitorder * 40
Case 31 To 50
cost = unitorder * 35
Case Is > 50
cost = unitorder * 30
End Select
Else
Select Case unitorder
Case 1 To 15
cost = unitorder * 60
Case 16 To 20
cost = unitorder * 55
Case 21 To 30
cost = unitorder * 50
Case 31 To 50
cost = unitorder * 45
Case Is > 50
cost = unitorder * 40
End Select
End If

If chkdisc1.Value = 1 Then
cost = cost - (cost * 0.1)
End If
TextBox2.Text = cost
End Sub

Traffic Signal



Design an application to display traffic lights. All lights for 9 secs and yellow for 5 secs.

1. start VB & create a new project
2. Save the form & project as frmtraffic.frm
3. set the caption of your form as 'Traffic Light'
4. Now create the controls & place them according to the screenshot shows above.
You can draw the desired shape by setting the shape property. set the shape property to 3-circle to obtain circles.
5. also name the controls as labelled in the screenshots.
6. now set the properties of 3 inner circles as follows:
Name                      Property                        Setting
shpRed                Backcolor                       VbRed
                           Backstyle                       1-opaque
shpYellow            same as above                VbWhite
shpGreen             same as above                vbWhite
tmrlights                Enabled                         True


7. Go to the code view: type option explicit at the top of the code page. as declare the variable state as shown below.
Dim state as integer

8. Now double click the event for change(cmdchange) button :

Private sub cmdchange_click()
state=1
shpRed.backcolor=VbRed
shpyellow.backcolor=Vbwhite
shpgreen.backcolor=VbWhite
label1.caption="stop"
Timer1.enable=true
End Sub

Create the timer event for timer tmrlights
now double click the timer and write the following code:

Private Sub Timer1_Timer()
If state=3
   state=1
Else
state=state+1
End If
Select state
Case1
ShpRed.back color=VbRed
ShpYellow.back color=VbWhite
ShpGreen.back color=VbWhite
Label1.caption="Stop"
Timer1.Interval=250

Case2
ShpRed.backcolor=Vbwhite
ShpYellow.backcolor=Vbyellow
ShpGreen.backcolor=Vbwhite
label1.caption="wait"
Timer1.Interval=250

Case3
ShpRed.backcolor=VbWhite
ShpYellow.backcolor=VbWhite
ShpGreen.backcolor=VbGreen
label1.caption="Go"
Timer.Interval=250
End Select
End Sub


ADODC through coding

Public conn As ADODB.Connection
Public rs As ADODB.Recordset

Private Sub Command1_Click()
rs.MoveFirst
End Sub

Private Sub Command2_Click()
rs.MovePrevious
If rs.BOF Then
    rs.MoveLast
End If

End Sub

Private Sub Command3_Click()
rs.MoveNext
If rs.EOF Then
    rs.MoveFirst
End If
End Sub

Private Sub Command5_Click()
rs.AddNew
End Sub

Private Sub Command6_Click()
rs.Update
End Sub

Private Sub Command7_Click()
rs.Delete
rs.Update
End Sub

Private Sub Form_Load()
Set conn = New ADODB.Connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\ADMIN\My Documents\employee.mdb;Persist Security Info=False"
conn.Open
Set rs = New ADODB.Recordset
rs.Open "emp", conn, adOpenStatic, adLockOptimistic, adCmdTable

Set Text1.DataSource = rs
Text1.DataField = "empno"

Set Text2.DataSource = rs
Text2.DataField = "job"

Set Text3.DataSource = rs
Text3.DataField = "salary"

Set Text4.DataSource = rs
Text4.DataField = "empname"

Set Text5.DataSource = rs
Text5.DataField = "deptno"

Set Text6.DataSource = rs
Text6.DataField = "manager"

Set MSHFlexGrid1.DataSource = rs

End Sub

DAO through coding

Private Sub Command1_Click()
Data1.Recordset.MoveFirst
End Sub

Private Sub Command2_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF = True Then
    Data1.Recordset.MoveLast
End If
End Sub

Private Sub Command3_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF = True Then
    Data1.Recordset.MoveFirst
End If
End Sub

Private Sub Command4_Click()
Data1.Recordset.MoveLast
End Sub

Private Sub Command5_Click()
Data1.Recordset.AddNew
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = True
Command7.Enabled = False
End Sub

Private Sub Command6_Click()
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command7.Enabled = True
If (MsgBox("do u want to save data", vbYesNo) = vbYes) Then
Data1.Recordset.Update
End If
End Sub

Private Sub Command7_Click()
Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Wednesday, April 20, 2011

Happy Birthday to Prema Rajput !!!

            Its 20th April and we have the birthday of Prema Rajput. We wish her a very Happy Birthday and pray for the best in her future. Prema is the charming girl of our class who can be seen jumping here and there in the class. Sometimes see talks like an adult while sometimes she act as a child. She is short in height but big in brain. She reacts to big things as they are small problems and to small things as they are biggest bombs of her life. 

            Recently, she had been engaged into a relationship and she is enjoying it thoroughly. We wish her luck for that too. Prema, keep growing and be as charming as you are.

            HAPPY BIRTHDAY TO PREMA RAJPUT !!!

Tuesday, April 19, 2011

Happy Birthday to Yusuf Dawawala !!!

Happy Birthday Yusuf !!!
            

Today, its the birthday of my best friend - Yusuf Dawawala. Hereby, I am wishing him a very happy birthday and hope he gain all he stipulates. He has been a co-operative classmate to me. We abuse each other, we disagree with each others ideas but still we like each others company. All the classmates used to call this guy a boring person but today everyone is surprised by his change. What I like about him is his True Outcome rather than keeping a fakeness a ubiquitous quotient of his personality. There is no falseness in his talking attitude and greeting attitude. What he is he is. He never shake the hand with some one if he is angry and not even ignore someone if he likes the company. He is the one to show his real heart outside. This has been his attitude right from the first day of the college. 

              Recently, Yusuf scored 1st rank in class. It was a surprising element for everyone but no one was jealous to see him score that marks. Everyone knows that he is genuine and when a genuine person achieve something, people applause it wonderfully. Same happened with Yusuf. Yusuf argues with everyone till he doesn't get the right answer. His favourite teacher has been Mukta Khapre mam for which he has been teased by all the classmates. Yusuf was quite reserved initially but now he loves to mix up with everyone. 

              On his 20th birthday, lets wish him a very happy birthday and a bright future to him.

HAPPY BIRTHDAY YUSUF !!!   

Wednesday, April 13, 2011

Happy Belated Birthday to Gaurav Save !!!

              
              A very Happy Belated Birthday to our dear friend - Gaurav Save. Gaurav Save is always known as the King of Defaulters in our class. How much he tries to get away from the list, the Defaulter list never leaves him. He is also holding the record of highest numbers of subjects to be tried in a single semester. We just pray that he clears all the papers in 1 attempt and create one more record. 

              He acts like a salt in class. His presence may not effect us but his absence truly makes the class tasteless. Gaurav, we hope that you will attend the lectures continuously. A big blow for you on your birthday. Live a happy life ahead. 

Friday, March 25, 2011

Happy Belated Birthday to Sohail Shaikh !!!

Happy Birthday to SOHAIL SHAIKH


              Sohail Shaikh is the biggest body-builder of our class. He is popular for his introvert image but from the 1st day when 4th semester started, he has changed himself a lot. He started the trend of Bigg Boss on Facebook and then entered Twitter with a blow. Everyone of us will always remember his self-created definition in the subject of Marketing Management. Sohail Shaikh is very sporty, OK in studies and good in sense of humor. We hope that he keeps exercising and gyming.

              On his birthday, we, the students of BCA 2nd year wish him a great success in future.

 HAPPY BIRTHDAY TO YOU, SOHAIL !!! 

Tuesday, March 8, 2011

Our Performance In FEST DAYS !!!



              Recently, we had our Festival Days in our college and this is the first time when our class - BCA 2nd Year has done so well. We have almost won all the competitions and we proved that we had the potential, it was just that we didn't used to participate. I don't remember all the Winners but still I will try to list all the Winners here.

TRADITIONAL DAY :                    
 ABHILASH RUHELA (WINNER)


TIE DAY :                                          
VIVEK PATIL (WINNER)

MEHENDI COMPETITION :         
VRUSHALI BHOIR (WINNER)

CARROM DOUBLES :                   
ABHILASH RUHELA and SIDDHESH PATIL (WINNER)
SAQUIB SHAIKH and SAMADHAN BHOSALE (RUNNER-UP)

CRICKET :                                      
RUNNER-UP under the guidance of VISHAL SINGH (CAPTAIN).
Cricket team includes SAQUIB SHAIKH , SAMADHAN BHOSALE, YUSUF DAWAWALA, 
SOHAIL SHAIKH, SOHAIL MULANI, ARUN TIWARI, PRASAD DEVRUKHKAR, TUSHAR PANDE, ABHILASH RUHELA and SIDDHESH PATIL.

VOLLEYBALL :                            
RUNNER-UP under the guidance of ABHILASH RUHELA (CAPTAIN).
Volleyball team includes YUSUF DAWAWALA, SAQUIB SHAIKH, SAMADHAN BHOSALE, SIDDHESH PATIL, SOHAIL SHAIKH, SOHAIL MULANI and TUSHAR PANDE.

            

               So the HIGHEST NUMBER of Certificates is bagged by :-
ABHILASH RUHELA. He have won 4 Certificates out of which 2 is for being Champion and another 2 is for being Runner-Up as the team member in Cricket and Captain in Runner-up team of Volleyball. Lets congratulate him on behalf of BCA 2nd Year for his outrageous performance in the Fest.

Thanks.

Best of Luck - BCA 2nd year for future.

Monday, February 7, 2011

Happy Belated Birthday to Vandana Singh !!!

Happy Belated Birthday Vandana !!!
         

    A very very Happy Belated Birthday to Vandana Singh. She has been a good performer in our classroom. In the Semester 1, she scored the 1st Rank and in the Sem 2, she scored 2nd Rank. She is good at studies and she is the one who is unpredictable. She is sometimes very cheerful and sometimes very aggressive. We dont love her aggressiveness but still we like her. Vandana, may God bless you with all the success and desire.


               A very happy birthday to you again.


Thanks.

Just Type The Keyword To Search Your Answer -- >>