|
-
Nov 22nd, 2006, 03:51 AM
#1
Thread Starter
Interweb adm/o/distrator
VB6 - LINKING ON _Click to SITE
VB Code:
Public 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
Linking a label example:
VB Code:
Private Sub Label1_Click()
ShellExecute Me.hwnd, "OPEN", "http://www.vbforums.com", vbNullString, vbNullString, 5
End Sub
-
Nov 22nd, 2006, 12:56 PM
#2
Re: VB6 - LINKING ON _Click to SITE
i'm not sure a single API warrant's it's own codebank thread - especially such a commonly used one as ShellExecute
you haven't even explained what the API actually does, and that the code may not work if the user does not have a default browser set up...
-
Nov 22nd, 2006, 09:55 PM
#3
Thread Starter
Interweb adm/o/distrator
Re: VB6 - LINKING ON _Click to SITE
Lol Its pretty self explanatory.
-
Nov 24th, 2006, 02:22 AM
#4
Re: VB6 - LINKING ON _Click to SITE
-
Nov 25th, 2006, 07:51 PM
#5
Thread Starter
Interweb adm/o/distrator
Re: VB6 - LINKING ON _Click to SITE
Some people come to this site to learn from it. And i remember when i was new to Vb6 i always learnt from stuff like this. Just because you two are admins and just sit here bagging on people who are better than you doesnt mean it does not help other people who are learning.
-
Nov 26th, 2006, 06:38 AM
#6
Re: VB6 - LINKING ON _Click to SITE
Those 2 are not admins!!
Secondly, BushMo's point is quite fair. I agree that you are trying to help learners but do you think that a just a single line of code can help them in understanding something?
What BushNo is saying, atleast post some, atleast a little information about what you are trying to do with that code, and most importantly explain the purpose of APIs if you are using one (and you are using one). If not, provide a link to page which explain the APIs used, like BM did.
Good luck with future posting.
-
Jan 5th, 2007, 09:59 AM
#7
Junior Member
Re: VB6 - LINKING ON _Click to SITE
Thanks Hell-Lord, works as advertised. I'm a rookie and
found it very easy to add to my project.
On my system it grabs an open browser window. Is there
a way to make it open a new window?
Thanks,
John
-
Mar 31st, 2007, 07:42 AM
#8
Lively Member
Re: VB6 - LINKING ON _Click to SITE
ok for starters ya dont even need all what he put. all u need is:
vb Code:
Shell ("explorer.exe " + "http://evil-coders.com")
Did a reply help answer your questions? Please RATE good posts!
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
New Laptop System: Intel Dual-Core T2060 2.0GHz • 533MHz FSB • 2MB Cache • 1024MB RAM • 120GB Hard Drive • Dual Layer DVD ReWriter MultiDrive • 15.4" Widescreen Display • Microsoft Windows Vista Ultimate • 128MB Intel GMA 900 UMA Graphics
-
May 2nd, 2007, 02:52 AM
#9
Thread Starter
Interweb adm/o/distrator
Re: VB6 - LINKING ON _Click to SITE
ShellExecute() is preferred over Shell()
Sorry for the bump
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|