Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old May 1st, 2008, 07:04 PM
bmxer193 bmxer193 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 3 bmxer193 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 39 sec
Reputation Power: 0
How to Direct to website

How do i make it so when you click on a command button it sends you to a website? I looked everywhere for how to do this. Sorry about the noob question lol
Thank you!

Reply With Quote
  #2  
Old May 1st, 2008, 07:41 PM
medialint's Avatar
medialint medialint is offline
spirit duplicator
Click here for more information.
 
Join Date: Apr 2004
Location: \\Firecrate\
Posts: 11,900 medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)  Folding Points: 215584 Folding Title: Super Ultimate Folder - Level 1Folding Points: 215584 Folding Title: Super Ultimate Folder - Level 1Folding Points: 215584 Folding Title: Super Ultimate Folder - Level 1Folding Points: 215584 Folding Title: Super Ultimate Folder - Level 1Folding Points: 215584 Folding Title: Super Ultimate Folder - Level 1Folding Points: 215584 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Months 2 Weeks 1 h 49 m 50 sec
Reputation Power: 2075
ShellExecute API (this launches in the default browser I presume this is what you want and you're not using a web browser control)

Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command5_Click()
    ShellExecute 0, "open", "http://medialint.com", vbNullString, vbNullString, 1
End Sub
__________________
medialint.com

Now I don't know, but I been told it's hard to run with the weight of gold.
Other hand I have heard it said, it's just as hard with the weight of lead.

Reply With Quote
  #3  
Old May 2nd, 2008, 06:07 AM
bmxer193 bmxer193 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 3 bmxer193 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 39 sec
Reputation Power: 0
I keep getting compile error: only comments may appear after end sud end function or end property

Reply With Quote
  #4  
Old May 2nd, 2008, 07:57 AM
zynder's Avatar
zynder zynder is offline
Not much of a contributor
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2006
Location: Hidden
Posts: 734 zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 110329 Folding Title: Super Ultimate Folder - Level 1Folding Points: 110329 Folding Title: Super Ultimate Folder - Level 1Folding Points: 110329 Folding Title: Super Ultimate Folder - Level 1Folding Points: 110329 Folding Title: Super Ultimate Folder - Level 1Folding Points: 110329 Folding Title: Super Ultimate Folder - Level 1Folding Points: 110329 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Week 2 Days 9 h 19 m 57 sec
Reputation Power: 606
Send a message via Yahoo to zynder
Place the declaration on the very top of your code.

Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Comments on this post
medialint agrees: exactly - it should work fine if this declaration is at the top of the module

Reply With Quote
  #5  
Old May 2nd, 2008, 02:00 PM
bmxer193 bmxer193 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 3 bmxer193 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 39 sec
Reputation Power: 0
O ok it works now thanks you guys!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > How to Direct to website


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway