Online Examination System for all learner!!! coming soon..

Showing posts with label Control. Show all posts
Showing posts with label Control. Show all posts

VB 6 : Make Web Browser Application

  If you are bored with existing web browsers, you can create your very own web browser using Visual Basic. In order to create the web browser, launch Visual Basic 6, press Ctrl+T to open up the components window and then select Microsoft Internet Control. The control will appear in the toolbox as a small globe. To insert the Microsoft Internet Control into the form, just drag the globe into the form and a white rectangle will appear in the form. You can resize this control to the size you wish. This control is given the default name WebBrowser1.

   To design the interface, you need to insert one combo box which will be used to display the URLs. In addition, you need to insert a few images which will function as command buttons for the user to navigate the Internet; they are the Go command, the Back command, the Forward command, the Refresh command and the Home command. You can actually put in the command buttons instead of the images, but using images will definitely improve the look of the browser.

The code for all the commands is relatively easy to write. There are many methods, events, and properties associated with the web browser but you need to know just a few of them to come up with a functional Internet browser.

 The method navigate is to go the website specified by its Uniform Resource Locator(URL). The syntax is WebBrowser1.Navigate (“URL”). In this program, we want to load the www.programtube01.blogspot.com web page at start-up.

 Related Video:

VB 6.0 : Simple Calculator

  Design:

Fig-1:Object Arrangement

Code:

Private Sub Form_Load()
     Label1.Caption = "Enter 1st Number"
     Label2.Caption = "Enter 2nd Number"
     Label3.Caption = ""
     Label3.FontSize = 17
     Label4.Caption = "Result:"
     Text1.Text = ""
     Text2.Text = ""

     Option1.Caption = "ADD"
     Option2.Caption = "SUB"
     Option3.Caption = "MULT"
     Option4.Caption = "DIV"
End Sub

Private Sub Option1_Click()

    Label3.Caption = Val(Text1.Text) + Val(Text2.Text)
End Sub

Private Sub Option2_Click()

    Label3.Caption = Val(Text1.Text) - Val(Text2.Text)
End Sub

Private Sub Option3_Click()

    Label3.Caption = Val(Text1.Text) * Val(Text2.Text)
End Sub

Private Sub Option4_Click()

    Label3.Caption = Val(Text1.Text) / Val(Text2.Text)
End Sub 

Output:


Fig-2: First Output

Fig-3: Second Output

Related Videos:



Related VB 6 Example:


VB 6.0: Control text size of TextBox using Scroll Bar

Visual Basic program to control fontsize of text of text box using scroll bar 

Disign :

Code:

//for more program please visit www.programtubenotes.blogspot.in 
Private Sub Form_Load()
VScroll1.Min = 1
VScroll1.Max = 200
Text1.Text = "Program Tube"
End Sub

Private Sub VScroll1_Change()
Text1.FontSize = VScroll1.Value
End Sub

Output:

 

Related Videos:

Command button



Command button
It acts as a switch. To deal with tool property> click on command button> property
window appear> change setting of any desired property. Usually change set its
caption property to a suitable string.
To make the button functional, the user should add some code. To do this: click on
command tool> code form appears with click event procedure. Write code in this
event or other events like press key event.

The most familiar properties that are needed for the command button are stated in the
table below.
COMING SOON..

C Programming Online Test 1

Following quiz provides Multiple Choice Questions (MCQs) related to C Programming Framework. You will have to read all the given answ...