I know how to use vb to open an instance of internet explorer but I have a question that may sound like a newbie.
For example with my vb program , I am opening a login page. I put my username and password. Then I click on submit button and it goess to verify if the username and password. Then it post this message
IF Login is correct it will say on the page LOGIN SUCCESS
If login incorrect then it will say LOGIN FAILURE .
Is there a way to see or get those just those sentence?
Any help woukld be greatful. Thanks
____________________________
Enjoy life while you still can
20-09-2005 at 08:35 PM
|
TJ_01 Level: VB Lord Registered: 24-08-2005 Posts: 320
Re: internet explorer
It is possible to that but you will use a webbrowser control to view or navigate your asp or html pages in your vb form.
____________________________
Im JAMES
22-09-2005 at 08:17 AM
|
TJ_01 Level: VB Lord Registered: 24-08-2005 Posts: 320
Re: internet explorer
On your vb form.
Private Sub Form_Load()
Call WebBrowser1.GoHome
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
' when download complete, display url in txturl
txturl.Text = URL
End Sub
Private Sub Command5_Click()
' if txturl is not empty go to url specified
On Error Resume Next
If txturl.Text <> "" Then
Call WebBrowser1.Navigate(txturl.Text)
End If
End Sub
You must add a WebBrowser control on your form and copy the code. On the URL Address, enter the address where your asp or html page is located so it will be loaded in your control.
[Edited by TJ_01 on 23-09-2005 at 06:39 AM GMT]
____________________________
Im JAMES
23-09-2005 at 06:38 AM
|
Vpa Level: Sage Registered: 14-03-2004 Posts: 66
Re: internet explorer
you can also use InternetExplorer reference, I don't know if your using it yet.
Open References and add a reference to InternetExplorer
I don't know right now, I can't look it up now
I will get back to you later, if you need me to
dim WithEvents IE as InternetExplorer
'When you need it, use:
set IE = new InternetExplorer
'To show Internet Explorer
Ie.visible = true
'To go to a site:
IE.navigate2 "http://www.site.com"
'When a document is loaded
private sub IE_DocumentCompete(some arguments)
If IE.document.body.innerhtml="HTML code for Succes"
'Or you can use this:
If IE.locationurl="URL for Succes"
end sub