|
I do understand the behaviour of bitwise operatores on Integers. But what I still dont understand is
e.Button how is that an Integer, or what bits does it have or how do we know those bits.
I assumed that MouseButton is an enum and the bitwise operator would work on its underlying byte or int value.
And thanx for the help
|
|
|
|
|
Hi,
MouseEventArgs.Button returns a MouseButtons Enumeration, which basically is an int with some
bits set. I suggest you read up on enums, and the Flags attribute if you want to know the
specific details.
|
|
|
|
|
Thanx a lot everything is clear now. You were a great help.
|
|
|
|
|
you're welcome.
|
|
|
|
|
I've scoured the web (well sorta' scoured it anyway) looking for an answer to this question.
I want to rotate a label control so that it's oriented vertically. I've tried a couple of the articles here on CP, but I'm having a couple of issues.
0) The rotated text is incorrectly aligned
1) The rotated text (what I can see of it anyway) is butt-ugly, exhibiting no anti-aliasing at all.
I've tried rendering some text on a bitmap, and then rotating the bitmap, but that ain't working at all (I know it's because I'm not doing it right).
Does anyone know of a decent (free) rotated label control that honors ALL of the alignment and applicable style settings and the system text quality settings?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Thursday, November 20, 2008 12:33 PM
|
|
|
|
|
If you decide to make a custom control check out the Win32 SetWorldTransform call. This will set a transform that even the text drawing API's will how, and still have thinks look reasonable (something that the lfEscapement value completely mucks up). It shouldn't be too hard to do this in .Net. You may also have to drop down and make a DrawTextEx or TextOut call your self - somewhere in the back of my mind I recall one of these calls being the better one to use.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
Well, I solved that particular issue by creating the bitmap in a separate class, and then rotating it in the form's OnPaint routine. I have a whole other issue right now.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
BTW, I beat the framework into the submissive bitch that she should be, and forced my will upon her, like she was a $2 hooker.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Glad to hear it, cause the whole bitmap rotation thing was an awfully cheap way to go - kind of My Pretty Pony approach if you ask me.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
John Simmons / outlaw programmer wrote: she was a $2 hooker.
Is that a Texas Special? I don't have firsthand experience mind you, but I'm pretty sure in NYC you're now looking at a $10 hooker, inflation, gas prices, stock market, and so on being what they are.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
is there a way to set a form so it is always on top?
So that any other windows cannot cover the form i designed
|
|
|
|
|
|
The start menu still pops over it... is there a way to get my form always over that as well?
|
|
|
|
|
I'm new to C#, so please excuse my ignorance. I assume there must be a straighforward way to "trash" (not just temporarily ignore) messages sent to a control, such as a button, so that unintentional/random clicks do not queue up and get handled later. I have successfully filtered messages using the IMessageFilter class functions, but the messages are still queued up and get responded to as soon as I invoke RemoveMessageFilter.
Also, any strong recommendations on a C# manual would be appreciated.
I greatly appreciate any help.
Doug
|
|
|
|
|
Try overriding WndProc - declare the WM constants you want to be ignored and test for them, if you want the message to be passed on (not ignored) call the base - something like...
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_???)
{
m.Result = IntPtr.Zero;
return;
}
base.WndProc(ref m);
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Thanks for the input Dave.
I put the WndProc() override function in a Form class definition, with the intention of catching Left Mouse Button events (WM_LBUTTONUP, WM_LBUTTONDOWN, WM_LBUTTONDBLCLK). The effect of this was that messages from clicking on controls (buttons and text boxes) on the form were not even seen by the WndProc function, but the WndProc function did see mouse clicks from anywhere else on the form. I don't know if the mouse messages are modified somehow from the controls so that there IDs are different?
Any help here would be appreciated.
Thanks,
Doug
|
|
|
|
|
Sorry for the delay in replying, haven't been online for a couple of days.
You'll need to create your own classes and derive from whatever control it is you need to intercept for i.e. Button and override WndProc in there.
If you need to then handle it from the parent form, you could raise an events that use event args derived from CancelEventArgs based on the WM_??? and use the bool Cancel to return whether to call base.WndProc(ref Message m). I've not tried this but it should work.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi.
I have created a component group consisting of a web service, windows service, database, etc. Each of these units(the component group being one unit) will be installed on a server (meaning each server will have a windows service, web service, database, etc). In order to call and use the web service I have consumed it and used it as a normal object.
Ex:
ExampleWebService myWebservice = new ExampleWebService();
myWebservice.Create();
Now my question is here. I have a part of my program which reads the webservices' URLs from a database, and needs to call each webservice in order to check if its still alive or not, a kind of heartbeat monitor if you will. From one webservice, how do I call another, knowing its URL and by consuming it ?
Any help will be greatly appreciated, thanks.
|
|
|
|
|
If you have a web method in each web service that is the same (for example each web service has method Alive() which returns boolean), use WSDL to generate a proxy and include that in your project. You don't need to add web service references to your project.Now you can control better the url and other properties. From there on it's like calling a normal web service.
Addition:
See for example: Invoking a Web Service Without Web Reference[^]
Mika
The need to optimize rises from a bad design.
My articles[ ^]
modified on Thursday, November 20, 2008 3:40 PM
|
|
|
|
|
fantastic stuff.
Thank you very much for your help
James
|
|
|
|
|
You're welcome
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi all,
i have two different sources.. a Dataset and a String with XML data
I was thinking of converting the Dataset into an XML document, and the string to an XML document and then comparing the two. First of all, is this a viable solution?
Secondly, I know that the data in both XML documents will not be the same (i.e. the actual attributes are not the same) but there are some overlapping attributes like for example NAME, SIZE, EXISTS etc...
How can I compare the two without using a simple shortcut like xml diff
|
|
|
|
|
Could you tell me how to use Application.ApplicationExit event? and I want my program to do somehing before my computer closes. Would you mind teeling me how I can do?
Thanks in advance.
|
|
|
|
|
|
hi evryone
is it posible to open 2 database together in win CE ?
i working in Sql CE
if (answer == 'yes')
MessageBox (the answer)......
than'k alot for any help
|
|
|
|