Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Saturday, May 28, 2011

VB : Multimedia Player


A multimedia player that can play all kinds of media files such as wav, midi, mp3, mpeg video, avi video and so on. When you launch the program, you can select files of different types from different drives. After you have selected a particular files, you can play it using the customized button or you can use the buttons of the multimedia control

In this program, you need to insert the Microsoft Multimedia Control, a combo box, a dirListBox, a DriveListBox, a fileListbox, a picture box(to play the video) , a text box and four command buttons which you label as "Play", "Open","Stop" and "Exit".One of the most important procedures is to open various audio files, the codes are as follow:



























Refer the below given program.....then do this as your home work..(feel free to contact, if u fail to get the answer.....before contacting, make sure u tried your best..)
Copies files from one location to other

=========================================================================
Back to Home   &  VB

VB-15 : The four calculations



It is too nice to know the difference in coding between JAVA and VB.See the same program i did in JAVA. 

==============================================
B) Property :
Label       : NAME-Label1, CAPTION-Enter first number
Textbox   : NAME – text1   , Text-(should kept blank)
Label        : NAME-Label2, CAPTION-Enter second number
Textbox    : NAME – text2   , Text-(should kept blank)
OptionButton : NAME-Option1,CAPTION-Add
OptionButton : NAME-Option2,CAPTION-Subtract
OptionButton : NAME-Option3,CAPTION-Multiply
OptionButton : NAME-Option4,CAPTION-Devide
Command Button  :  NAME -  Command5, CAPTION-Exit


C) 
  Attaching Code to the Object :



Private Sub Command1_Click()
End
End Sub

Private Sub Option1_Click()
If Option1.Value Then
c = Val(Text1.Text) + Val(Text2.Text)
MsgBox c
End If
End Sub

Private Sub Option2_Click()
If Option2.Value Then
c = Val(Text1.Text) - Val(Text2.Text)
MsgBox c
End If
End Sub

Private Sub Option3_Click()
If Option3.Value Then
c = Val(Text1.Text) * Val(Text2.Text)
MsgBox c
End If
End Sub

Private Sub Option4_Click()
If Option4.Value Then
c = Val(Text1.Text) / Val(Text2.Text)
MsgBox c
End If
End Sub





Click   Simple Programs(3) to get an idea about Calculation.


 Refer Calculations using Grid control  & Simple Calculator also.



Back to Home   &  VB 
=========================================================================

VB-14 : Making decision with Select Case

Select Case structure is an alternative to IF..THEN......ElseIF...for selectively executing one block of statements from among multiple blocks of statements.
You can add any number of ElseIF clauses as you need to provide alternative choices.A better way to choose between several alternatives is the Select Case statement as in the example given below:


Let there be a text field in which the user is supposed to enter the choices from a range of options given.


Enter any fruit from one of the following choices : Mango,apple,banana,orange and pineapple.


A)   Property :
Comman Button : NAME – Command1,CAPTION-Submit
Text Box          :NAME-text1,TEXT-(Blank)




B)   Attaching Code to the Object :
Private Sub Command1_Click()
Select Case Text1.Text
Case "Mango"
MsgBox "Mango is in green colour"
Case "Banana"
MsgBox "Banana is in yellow colour"
Case "Orange"
MsgBox "Orange is in orange colour"
Case "Apple"
MsgBox "Apple is in red colour"
Case "Pineapple"
MsgBox "Pineapple is in cream colour"
Case Else
MsgBox "The fruit you choose is not in the list"
End Select
End Sub

 ========================================================================
Back to Home   &  VB