Archived

This topic is now archived and is closed to further replies.

vbisme

Opening a web page

Recommended Posts

vbisme    100
Let''s say I want to create a program with a single push-button. When that button is pressed, I want to open up a link to a website. Can someone give me the code for it? I''m trying to make an ActiveX control, so Visual Basic codes are welcome. Thanks

Share this post


Link to post
Share on other sites
SiCrane    11839
You should be able to use a call the ShellExecute or ShellExecuteEx, passing the address of the site or file as an argument.

Share this post


Link to post
Share on other sites
tcs    122
Look my site for an example on how to do this, http://members.aol.com/dragoninet has more on this


Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity

Share this post


Link to post
Share on other sites
Crocmort    122
Use ShellExecute...

ShellExecute(
HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
);

You use "open" for lpOperation and the string for the link to open in lpFile... Everything else is NULL exept nShowCmd : SW_SHOWNORMAL. Just hope it''ll help a little bit.

Share this post


Link to post
Share on other sites