Question Wildcards

Chris11

Active member
Joined
Jul 12, 2009
Messages
29
Programming Experience
1-3
Hey I need to make a simple if statement.

Code:
 If WebBrowser.Location = "http://www.google.com" Then
        Else
            MsgBox("Message")
End If
And there is something with statement as well... Not too sure what.

But I'd like the if statement to look for every website not just google, so can you use wildcards? If so how?
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,173
Location
Sydney, Australia
Programming Experience
10+
First up, the Location property is the position of the top, left corner of the control, not the address of the page it's displaying. For that you want the Url property.

As for the question, you don't need wildcards to search for every web site so i can only imaging that that's not what you mean. Please provide a clearer description of exactly what you're trying to achieve.
 

Chris11

Active member
Joined
Jul 12, 2009
Messages
29
Programming Experience
1-3
I want a timer constantly checking what Url the webge is constantly on, then if the if statement defects the user is on any other website other than goodgle for instance, then take a action. But I want to allow every page under the same domain as Google, so I wanted to have something like 'www.google.com/*Wildcard*. It would be impractical for me to list every page under google. Hope I've made it clearer.
 
Top Bottom