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 


Question about formBorderStyles... [any language]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sun Jul 13, 2008 11:21 am    Post subject: Question about formBorderStyles... [any language] Reply with quote

is it possible to download other borderstyles for my form or what i got in VS that's what i can use only...
_________________
Stylo
Back to top
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Thu Jul 17, 2008 1:16 am    Post subject: Reply with quote

Do you really need anything else? You can add/remove all the buttons, you can add/remove the icon, you can add/remove the whole titlebar...
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu Jul 17, 2008 4:45 am    Post subject: Reply with quote

i tried doing that ..
removed title bar and added my own X button that exit the application
but i wanted to make a title bar that when i'll hold the left mouse button
i'll be able to move the form . . but i stucked with that

_________________
Stylo
Back to top
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Thu Jul 17, 2008 7:46 am    Post subject: Reply with quote

1qaz wrote:
i tried doing that ..
removed title bar and added my own X button that exit the application
but i wanted to make a title bar that when i'll hold the left mouse button
i'll be able to move the form . . but i stucked with that
That varies per language, which would you want a description of?
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 17, 2008 8:49 am    Post subject: Reply with quote

Code:

case WM_LBUTTONDOWN:
   SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, NULL);
   break;

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu Jul 17, 2008 9:12 am    Post subject: Reply with quote

Renkokuken i'm tring to do it on C#
and oib111 can u explain what's your code does ? what's this window message and what's the wParam contains ?

_________________
Stylo
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 17, 2008 9:21 am    Post subject: Reply with quote

Quote:

The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.


Quote:

Specifies the hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST.


Quote:

HTCAPTION In a title bar.


Basically you send a message that says that the user clicked in a non-client area of the window, and you say that he clicked on the title/caption bar. This allows the user to move the window. This happens whenever the user clicks with the left mouse button (controls are excluded from this though).

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Thu Jul 17, 2008 9:21 am    Post subject: Reply with quote

1qaz wrote:
Renkokuken i'm tring to do it on C#
and oib111 can u explain what's your code does ? what's this window message and what's the wParam contains ?


He's telling you to use Switch/Case on your Form.

the handle (HWND) is your form (Form.Handle i belive)

the other are messages to be sent, now, use switch (on a variable that is the condition) case the event and that's all.

Here's an example in Delphi.

Code:
var i:boolean;
TButton1.Click();
Begin
case i of
True:SendMessage
False:Exit;
end;
end;


Get 2 more buttons, 1 that sets i to true and 2 to set i to false, make them click button 1 as well ;].
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu Jul 17, 2008 9:31 am    Post subject: Reply with quote

but the thing is that i dont have a title / caption bar in my form
on FormBorderStyle's options i set "None" so all i can see is an empty form without nothing...
what i tried to do is to add a panel at the top of the form and then i used the MouseDown event (on the panel) when i want to move it . .
but i stuck at the form moving
my code was
Code:

private void panel1_MouseDown(object sender, EventArgs e)
{
 this.location = Cursor.Location;
}

but as you can see it works but not as u expacted it's like the form's jumping to the mouse location :S

_________________
Stylo
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 17, 2008 9:52 am    Post subject: Reply with quote

Just make it so that when the user clicks on the panel you send this message:

Code:

SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, NULL);

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu Jul 17, 2008 10:01 am    Post subject: Reply with quote

ok but HTCAPTION is undeclare variable how can i declare it at C# ?
is it handle to the title bar ? or in this case the panel?

_________________
Stylo
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 17, 2008 10:24 am    Post subject: Reply with quote

HTCAPTION is a constant that says that the title/caption bar was clicked when you send the message WM_NCLBUTTONDOWN. Look it up on MSDN.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu Jul 17, 2008 10:50 am    Post subject: Reply with quote

nice i found it on msdn as u said, works perfect :] thx
_________________
Stylo
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 17, 2008 12:42 pm    Post subject: Reply with quote

Your welcome.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
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