Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get text from Internet Explorer Address Bar to vb6 TextBox .....

Posted on 2004-10-25
6
Medium Priority
?
1,020 Views
Last Modified: 2008-02-01
Hi,
I've a problem, i want source code, how to get text from Internet Explorer AddressBar to Textbox in Visual Basic 6 e.g: when user enter some url eg www.hotmail.com then I want to capture this url address on click or change event.  


Waiting for ur positive and nice response.           Thanks
0
Comment
Question by:AsifBangash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 200 total points
ID: 12398278
See this by Ark if make help:

Receive Events from and Send Events to Open IE Windows
http://www.freevbcode.com/ShowCode.Asp?ID=1606
0
 
LVL 1

Author Comment

by:AsifBangash
ID: 12398515

Dear Ryancys,

thx for reply but i want it in text box and i m saving it in database when textbox got text from it. and that will be unvisible to user.
0
 
LVL 1

Author Comment

by:AsifBangash
ID: 12398522
Dear Ryancys,

thx for reply but i want it in text box and i m saving it in database when textbox got text from it. and that will be unvisible to user.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Expert Comment

by:Ryan Chong
ID: 12398561
Hi,

If you mean grab the web page content, you can try below suggestions:

1st: Try use the URLDownloadToFile API

Example:

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
    Dim lngRetVal As Long
    lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
    If lngRetVal = 0 Then DownloadFile = True
End Function

Private Sub Form_Load()
    Randomize
    rndkey = Int(Rnd * 100000")
    URL = "http://www.abc.com/pass_management/user_auth.php?name=USERNAME&pass=PASSWORD" & "&rndkey=" & rndkey
    DownloadFile URL , "c:\test.txt"
End Sub

also:

Ensuring URLDownloadToFile Bypasses a Cached File Copy
http://vbnet.mvps.org/code/internet/urldownloadtofilenocache.htm

2nd: Using M$ Internet Transfer Control ActiveX. You can select it from Components, where it got a method called openURL which do exact the same above to retrive data from an URL.

Example:

mydata = Inet1.OpenURL(url)

and then we can display the web page content into textbox, and save into database, etc.

Hope this helps
0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 12398577
See this recent PAQ as well : http:Q_21178962.html

where Erick37 suggested solution as follows:

...
Dim ie As Object
    Set ie = CreateObject("InternetExplorer.Application")
    ie.Navigate "http://msdn.microsoft.com"
    Do While ie.ReadyState <> READYSTATE_COMPLETE
        DoEvents
    Loop
    Debug.Print ie.StatusText
    Debug.Print ie.LocationName
    Debug.Print ie.LocationURL
    ie.Quit
    Set ie = Nothing
...
0
 
LVL 1

Author Comment

by:AsifBangash
ID: 12407376
Dear Ryancys,

Thanks for hep me. Your first help is right for me and i m Accepted ur first answer.

ok I do it means capture text from internetexplorer to Textbox of visual Basic 6.0. any way thaks.

like to mail me on my account (asifbangash at gmail.com)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question