• Advertisement

Archived

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

Opening a web page

This topic is 6319 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
Hmmm, is there a way to set the referer? so you can see where you came from? I hope you understand what I meen...

Share this post


Link to post
Share on other sites
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

  • Advertisement