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 


Need help about code in VB6 (im new to VB)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
getdead
Advanced Cheater
Reputation: 0

Joined: 20 Aug 2008
Posts: 66
Location: Kiwi Plantation

PostPosted: Tue Sep 09, 2008 4:57 am    Post subject: Need help about code in VB6 (im new to VB) Reply with quote

can any1 tell me the code for clicking on coordinates i put)

for example i want left 23 up 23 and how do i write the code
I already made start and stop and added timer but dunno whats the dcode for the clciking and HOW DO I FIND THE COORDINATES) any programs?
Back to top
View user's profile Send private message Send e-mail
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Tue Sep 09, 2008 6:20 am    Post subject: Reply with quote

use API's:
SetCursorPos - to put the cursor's coordinates
mouse_event - to send mouse events (left click / right click)
to get the coordinates use GetCursorPos API

_________________
Stylo
Back to top
View user's profile Send private message
getdead
Advanced Cheater
Reputation: 0

Joined: 20 Aug 2008
Posts: 66
Location: Kiwi Plantation

PostPosted: Tue Sep 09, 2008 6:24 am    Post subject: Reply with quote

ummmm.......okkkkk.......will try...(i said im new to VB)

whats API?
Back to top
View user's profile Send private message Send e-mail
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Tue Sep 09, 2008 6:29 am    Post subject: Reply with quote

Application Programming Interface
but i suggest u if you're new to vb and as i can see new to programming too start with something smaller and read about API's

_________________
Stylo
Back to top
View user's profile Send private message
getdead
Advanced Cheater
Reputation: 0

Joined: 20 Aug 2008
Posts: 66
Location: Kiwi Plantation

PostPosted: Tue Sep 09, 2008 6:31 am    Post subject: Reply with quote

oki....i just know how to make web browser

oki will learn the stf
Back to top
View user's profile Send private message Send e-mail
sloppy
Expert Cheater
Reputation: 0

Joined: 17 Aug 2008
Posts: 123

PostPosted: Tue Sep 09, 2008 7:05 am    Post subject: Reply with quote

I have zero experience with VB, but I'll give you a PostMessage example in C# and hopefully someone else here can translate it to VB jargon for you.

Code:
[DllImport("user32.dll")]
private static extern bool PostMessageA(IntPtr hWnd, uint Msg, uint wParam, uint lParam);

[DllImport("user32.dll")]
private static extern bool ClientToScreen(IntPtr hWnd, ref Point p);

[DllImport("user32.dll")]
private static extern bool SetCursorPos(int x, int y);

const uint WM_LBUTTONDOWN = 0x0201;
const uint WM_LBUTTONUP = 0x0202;
const uint MK_LBUTTON = 0x0001;

public void Click(IntPtr hWnd, int x, int y)
{
    Point p = new Point(x, y);
    ClientToScreen(hWnd, ref p)
    SetCursorPos(p.X, p.Y)

    Thread.Sleep(10); // increase delay if cursor moves but does not click.

    PostMessageA(hWnd, WM_LBUTTONDOWN, MK_LBUTTON, MakeLParam(x, y));
    PostMessageA(hWnd, WM_LBUTTONUP, 0, MakeLParam(x, y));
}

private uint MakeLParam(int LoWord, int HiWord)
{
    return (uint)((HiWord << 16) | (LoWord & 0xFFFF));
}

Note: Will need to hook hop PostMessageA & SetCursorPos for GG protected games.
Back to top
View user's profile Send private message
getdead
Advanced Cheater
Reputation: 0

Joined: 20 Aug 2008
Posts: 66
Location: Kiwi Plantation

PostPosted: Tue Sep 09, 2008 7:07 am    Post subject: Reply with quote

THX...will try
Back to top
View user's profile Send private message Send e-mail
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Tue Sep 09, 2008 7:58 am    Post subject: Reply with quote

damn filter, check out what i said here: http://snootae.blogspot.com/
_________________
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