+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Search Tool Tutorial

  1. #1
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    203
    Rep Power
    20

    Thumbs up Search Tool Tutorial

    This is a tutorial for people who want the easy way to things like me.
    You will need:

    - 3 CheckBox's Named Google, YouTube and Yahoo
    - 2 RadioButtons Named Image and Web
    - 1 Button Named SearchButton
    - Textures (Optional)



    1. Make the Google Button, Checked by Default and the Web Search Selected.
    Code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Google.Checked = True
            Web.Checked = True
        End Sub
    2. The following codes dissables the Image and Web Button options got Google if Google isn't checked.

    Code:
    Private Sub Google_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Google.CheckedChanged
            If Web.Checked = True And Google.Checked = False Then
                Web.Enabled = False
            ElseIf Web.Checked = False And Google.Checked = False Then
                Web.Enabled = False
            ElseIf Google.Checked = True Then
            End If
            
            If Image.Checked = True And Google.Checked = False Then
                Image.Enabled = False
            ElseIf Image.Checked = False And Google.Checked = False Then
                Image.Enabled = False
            ElseIf Google.Checked = True Then
                Image.Enabled = True
                Yahoo.Checked = False
                YouTube.Checked = False
            End If
    
        End Sub
    3. For the Search Button the code is as follow's. "On Error Resume Next" one of the problems I found with the code I used, is that everytime you Search for something, it opens and works proply. But then you get an error with the code. To fix that I added "On Error Resume Next"

    Code:
     Private Sub SearchButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchButton.Click
            If YouTube.Checked = True Then
                On Error Resume Next
                System.Diagnostics.Process.Start("http://youtube.com/results?search_query=" + SearchBox.Text)
                        ElseIf Yahoo.Checked = True Then
                On Error Resume Next
                System.Diagnostics.Process.Start("http://search.yahoo.com/search?p=" + SearchBox.Text)
            End If
    
            If Google.Checked = True And Web.Checked = True Then
                On Error Resume Next
                System.Diagnostics.Process.Start("http://www.google.com/search?hl=en&q=" + SearchBox.Text)
            ElseIf Google.Checked = True And Image.Checked = True Then
                On Error Resume Next
                System.Diagnostics.Process.Start("http://images.google.ca/images?hl=en&q=" + SearchBox.Text)
            End If
        End Sub
    4. Finally, the Google, YouTube and Yahoo Check Buttons Code. This only one search method is checked at a time. If this code isn't added and you click search, you will Open 2 or 3 Different Browsers searching the same thing. Hehe.
    Code:
     Private Sub Yahoo_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Yahoo.CheckedChanged
            If Yahoo.Checked = True Then
                Google.Checked = False
                YouTube.Checked = False
            End If
        End Sub
    
        Private Sub YouTube_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YouTube.CheckedChanged
            If YouTube.Checked = True Then
                Yahoo.Checked = False
                Google.Checked = False
            End If
        End Sub
        Private Sub Google_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Google.CheckedChanged
            If Google.Checked = True Then
                Image.Enabled = True
                Web.Enabled = True
                YouTube.Checked = False
                Yahoo.Checked = False
            End If
        End Sub
    5. If you had any textures, this is the time to add them. Enjoy
    Last edited by Jordan; 07-25-2008 at 07:01 AM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101

    Re: Search Tool Tutorial

    Good and simple tutorial.

    This is VB 6.0 right?

  4. #3
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    203
    Rep Power
    20

    Re: Search Tool Tutorial

    Nope, this is VB 9.0 (2008 Express Ed)

  5. #4
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    203
    Rep Power
    20

    Re: Search Tool Tutorial

    What Language to you use TcM?

  6. #5
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101

    Re: Search Tool Tutorial

    Well, depends. I used to program in VB, but stopped. I'm learning C#, and PHP. But I know other languages, that are not so famous though...

  7. #6
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    203
    Rep Power
    20

    Re: Search Tool Tutorial

    I see. Well I've always done VB, i did 6.0 etc... now im at vb 9.0. But I know Logo programming. And I know some basic Java programming. Basic C++. But never asmuch as VB.

  8. #7
    kerex is offline Newbie
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    0

    Re: Search Tool Tutorial

    thanks for the tutorial ..

  9. #8
    Join Date
    Nov 2008
    Location
    Kosovo.
    Posts
    2,391
    Rep Power
    30

    Re: Search Tool Tutorial

    Great Tutorial +rep

  10. #9
    shoaibbi's Avatar
    shoaibbi is offline Newbie
    Join Date
    Jan 2009
    Posts
    15
    Rep Power
    0

    Re: Search Tool Tutorial

    BRILLIANT
    VIvAcIoUs pAkIsTaNi

  11. #10
    Join Date
    Sep 2008
    Location
    Kosovo
    Posts
    4,032
    Rep Power
    44

    Re: Search Tool Tutorial

    cool tutorial .. +rep

+ Reply to Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Search Engine && Search Algorithm (Help)
    By pally98 in forum General Programming
    Replies: 2
    Last Post: 10-03-2011, 10:49 AM
  2. Replies: 4
    Last Post: 09-15-2010, 06:19 AM
  3. Tool tip?
    By Pointless in forum C# Programming
    Replies: 3
    Last Post: 09-08-2010, 12:01 PM
  4. Replies: 1
    Last Post: 03-18-2010, 10:15 AM
  5. IDE Tool for C++?
    By MrDiaz in forum C and C++
    Replies: 2
    Last Post: 07-07-2006, 04:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts