ok if you had a text file that held a url how would you use it in
lReturn = ShellExecute(hwnd, "open", "URL GOES HERE", vbNull, vbNull, SW_SHOWNORMAL)
^all one line^
thanks
Printable View
ok if you had a text file that held a url how would you use it in
lReturn = ShellExecute(hwnd, "open", "URL GOES HERE", vbNull, vbNull, SW_SHOWNORMAL)
^all one line^
thanks
Your really pushing it...
Usually you couldn't do this but there is ONE possibility but it is a bit sketchy and relies on a few things...
What this does is uses the "echo" DOS command to display the contents of the text file but I suspect ANYTHING you place in the "URL GOES HERE" would be taken literally as a string instead of a DOS command which means you physically CANNOT do the whole thing in one line.Code:lReturn = ShellExecute(hwnd,"open","echo txtfile.txt",vbNull,vbNull, SW_SHOWNORMAL)
Instead you do this :
Its not one line, its 4... but it works ;-)Code:Dim sURL as String
Open "txtfile.txt" for input as #1
Line Input #1, sURL
Close(1)
lReturn = ShellExecute(hwnd,"open",sURL,vbNull,vbNull, SW_SHOWNORMAL)
Gen-X:
I tried your snippet and could not make it work. IE4 opens but the url is not posted. I am on NT4 and as I said, IE4.72...
Regards
Paul Lewis
You asked for a code that could put the URL in the place you wanted... and thats what I did...
If it doesn't work then that means something else in your statement is wrong.
Good luck
I was only an interested bystander. Microslip originally asked the question, and while browsing I thought I could use that idea myself so I tried it.
You're probably right that something else in my machines settings are askew so hopefully it works for Microslip and others.
I'll revisit it at another time as I'd like to make a nice little "html link" control which subclasses an ordinary label, but interprets (and highlights and tracks) http:// references, launching them if pressed.
All I want that for is my Help|About screen :)
It was a good reply you made to Microslip anyhow Gen-X so don't think I was being unkind by saying it didn't work for me :)
Catch you later
Paul Lewis