| View previous topic :: View next topic |
| Author |
Message |
DURAN Newbie cheater
Reputation: 14
Joined: 19 Apr 2007 Posts: 16 Location: The Netherlands
|
Posted: Sat Sep 22, 2007 5:24 am Post subject: Hey i wanna know.. |
|
|
If i click the button the CEF site comes can someone me a TUT or something
EDIT:It's on VB 6.0
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Sep 22, 2007 7:12 am Post subject: Re: Hey i wanna know.. |
|
|
| MobScene wrote: | If i click the button the CEF site comes can someone me a TUT or something
EDIT:It's on VB 6.0 |
To open the users browser and navigate to a site, you need to use the ShellExecute API.
An example:
| Code: | Option Explicit
Private Const SW_SHOWNORMAL As Long = 1
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 Form_Load()
ShellExecute Me.hwnd, "Open", "http://www.cheatengine.org", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub |
|
|
| Back to top |
|
 |
DURAN Newbie cheater
Reputation: 14
Joined: 19 Apr 2007 Posts: 16 Location: The Netherlands
|
Posted: Sat Sep 22, 2007 7:14 am Post subject: Re: Hey i wanna know.. |
|
|
| Wiccaan wrote: | | MobScene wrote: | If i click the button the CEF site comes can someone me a TUT or something
EDIT:It's on VB 6.0 |
To open the users browser and navigate to a site, you need to use the ShellExecute API.
An example:
| Code: | Option Explicit
Private Const SW_SHOWNORMAL As Long = 1
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 Form_Load()
ShellExecute Me.hwnd, "Open", "http://www.cheatengine.org", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub |
|
how do i use ShellExecute API im new in VB and thanks for the reply
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Sep 22, 2007 7:18 am Post subject: Re: Hey i wanna know.. |
|
|
| MobScene wrote: | | how do i use ShellExecute API im new in VB and thanks for the reply |
... Are you serious?
I just gave you an example and you quoted it...
|
|
| Back to top |
|
 |
DURAN Newbie cheater
Reputation: 14
Joined: 19 Apr 2007 Posts: 16 Location: The Netherlands
|
Posted: Sat Sep 22, 2007 7:22 am Post subject: Re: Hey i wanna know.. |
|
|
| Wiccaan wrote: | | MobScene wrote: | | how do i use ShellExecute API im new in VB and thanks for the reply |
... Are you serious?
I just gave you an example and you quoted it... |
srry dude it works now thanks and i wanna know how to make this if i click a button it need to come with a error
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Sep 22, 2007 7:24 am Post subject: Re: Hey i wanna know.. |
|
|
| MobScene wrote: | | Wiccaan wrote: | | MobScene wrote: | | how do i use ShellExecute API im new in VB and thanks for the reply |
... Are you serious?
I just gave you an example and you quoted it... |
srry dude it works now thanks and i wanna know how to make this if i click a button it need to come with a error |
Just copy the line that says:
| Code: | | ShellExecute Me.hwnd, "Open", "http://www.cheatengine.org", vbNullString, vbNullString, SW_SHOWNORMAL |
And put it into your button code like this:
| Code: |
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", "http://www.cheatengine.org", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
|
You need to keep the other stuff at the top of the file above the rest of the code.
|
|
| Back to top |
|
 |
DURAN Newbie cheater
Reputation: 14
Joined: 19 Apr 2007 Posts: 16 Location: The Netherlands
|
Posted: Sat Sep 22, 2007 7:35 am Post subject: Re: Hey i wanna know.. |
|
|
| Wiccaan wrote: | | MobScene wrote: | | Wiccaan wrote: | | MobScene wrote: | | how do i use ShellExecute API im new in VB and thanks for the reply |
... Are you serious?
I just gave you an example and you quoted it... |
srry dude it works now thanks and i wanna know how to make this if i click a button it need to come with a error |
Just copy the line that says:
| Code: | | ShellExecute Me.hwnd, "Open", "http://www.cheatengine.org", vbNullString, vbNullString, SW_SHOWNORMAL |
And put it into your button code like this:
| Code: |
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", "http://www.cheatengine.org", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
|
You need to keep the other stuff at the top of the file above the rest of the code. |
Thanks and how do i make a error like if i click button the error says
"sorry this button doesnt works"
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Sep 22, 2007 7:37 am Post subject: |
|
|
You can use:
| Code: |
Private Sub Command1_Click()
MsgBox "Sorry, this button doesn't work.", vbCritical, "Error"
End Sub
|
|
|
| Back to top |
|
 |
DURAN Newbie cheater
Reputation: 14
Joined: 19 Apr 2007 Posts: 16 Location: The Netherlands
|
Posted: Sat Sep 22, 2007 7:40 am Post subject: |
|
|
| Wiccaan wrote: | You can use:
| Code: |
Private Sub Command1_Click()
MsgBox "Sorry, this button doesn't work.", vbCritical, "Error"
End Sub
|
|
dude ty so muchxD
|
|
| Back to top |
|
 |
|