Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Hey i wanna know..

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
DURAN
Newbie cheater
Reputation: 14

Joined: 19 Apr 2007
Posts: 16
Location: The Netherlands

PostPosted: Sat Sep 22, 2007 5:24 am    Post subject: Hey i wanna know.. Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Sep 22, 2007 7:12 am    Post subject: Re: Hey i wanna know.. Reply with quote

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
View user's profile Send private message Visit poster's website
DURAN
Newbie cheater
Reputation: 14

Joined: 19 Apr 2007
Posts: 16
Location: The Netherlands

PostPosted: Sat Sep 22, 2007 7:14 am    Post subject: Re: Hey i wanna know.. Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Sep 22, 2007 7:18 am    Post subject: Re: Hey i wanna know.. Reply with quote

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
View user's profile Send private message Visit poster's website
DURAN
Newbie cheater
Reputation: 14

Joined: 19 Apr 2007
Posts: 16
Location: The Netherlands

PostPosted: Sat Sep 22, 2007 7:22 am    Post subject: Re: Hey i wanna know.. Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Sep 22, 2007 7:24 am    Post subject: Re: Hey i wanna know.. Reply with quote

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
View user's profile Send private message Visit poster's website
DURAN
Newbie cheater
Reputation: 14

Joined: 19 Apr 2007
Posts: 16
Location: The Netherlands

PostPosted: Sat Sep 22, 2007 7:35 am    Post subject: Re: Hey i wanna know.. Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Sep 22, 2007 7:37 am    Post subject: Reply with quote

You can use:

Code:

Private Sub Command1_Click()
    MsgBox "Sorry, this button doesn't work.", vbCritical, "Error"
End Sub
Back to top
View user's profile Send private message Visit poster's website
DURAN
Newbie cheater
Reputation: 14

Joined: 19 Apr 2007
Posts: 16
Location: The Netherlands

PostPosted: Sat Sep 22, 2007 7:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites