Okay... But also note that I'm not concerned with how a rectangle is drawn, just whether, in hyptothetical space, a point is in a rectangle or not.
If Bottom and Right are open limits by design, when are they actually used as such? I'd expect there would be a lot more code that does (this.Bottom - 1), but perhaps it's for lazy programmers who want to do (Bottom - Top), rather than (Bottom - Top + 1).
Either way, I'd argue that "Gets the y-coordinate of the bottom edge of this Rectangle structure" is inconsistent, especially since Top is described as "Gets the y-coordinate of the top edge of this Rectangle structure."
I can see why you might consider it to be inconsistent, but from a GDI point of view it is very consistant. The end point is a limit no matter what you are drawing using GDI, that even includes lines. I know from personal experence that this can be a pain when you want the end point included in the drawing area.
I do agree that the end point should be valid (/drawn). When I designed my own graphics library some years ago the end point was valid [it seemed the natural way to do it].
A bug is some thing that you did not intended to happen.
I have a Form in which I want to capture input events (MouseMove, KeyDown), before they propagate to the Controls of the Form. I tried overriding OnMouseMove, and not calling base.OnMouseMove, but this method seems to be bypassed when my mouse is over one of the controls of the Form. Do i have to set a flag somewhere to not automatically propagate the events to the child controls?
Go read this article. Even if you aren't working with a UI on the main thread, the techniques still apply.
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
I am using the TaskbarNotifier class to display incoming TCP/IP messages. I listen for a message on a port and when one is received, I start a thread that creates a new TaskbarNotifier object and shows the message. However, looking at Windows' Task Manager, I've noticed that the GDI Objects continue to grow (by 2 objects each time I am notified), even though the thread appears to end successfully (the thread count in task manager remains a constant 4).
If I call create TaskbarNotifier in the same thread as my TCP/IP listener, the resources don't grow, but the port is blocked until the notifier finishes.
Calling the thread without creading a TaskbarNotifier object also does not create growing resources.
Adding the single line:
TaskbarNotifier taskbarNotifier1 = new TaskbarNotifier();
to the thread class will cause the problem. If i set taskbarNotifier1 = null, it has no effect.
<font color="blue">Private</font>void richTextBox1_MouseMove(<font color="blue">Object</font> sender,System.Windows.Forms.MouseEventArgs e)
<font color="blue">Char</font> c=new <font color="blue">Char</font>();
System.Drawing.Point p=new System.Drawing.Point();
p.X=e.X;<font color="#006400">//current x of cursor In rtf box</font>
p.Y=e.Y;<font color="#006400">//current y.</font>
this.Text=(Convert.ToString(c));<font color="#006400">//retrieve the character at the current cursor position.</font>
System.Exception f=new System.Exception();<font color="#006400">//just incase you Try When there</font><font color="darkgreen">'s no text in the richtextbox</font>
hope that helps a little.
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<a TITLE="See my user info" href=http://www.codeproject.com/script/profile/whos_who.asp?id=38829>leppie<a>::<a TITLE="Go to all articles written by me" href=http://www.codeproject.com/script/articles/list_articles.asp?userid=38829>AllocCPArticle</a>(<a TITLE="Go to my latest, greatest article!" href=http://www.codeproject.com/useritems/dfamachine.asp >Generic DFA State Machine for .NET</a>);
I have some problems with convert project from VB6 to C#.
I dont know how it be in C# code like this:
Public Event Wiadomosc(ByVal sender As Long, ByVal seq As Long, ByVal time As Long, ByVal class As Long, ByVal message As String)
Public Property Let ListaKontaktow(index As Integer, co As lbpoleKontaktu, value As Long)
If co = 0 Then
kontakty(index).nrgg = value
kontakty(index).typ = value
Public Property Get ListaKontaktow(index As Integer, co As lbpoleKontaktu) As Long
If co = 0 Then
ListaKontaktow = kontakty(index).nrgg
ListaKontaktow = kontakty(index).typ
Public Sub sendMsg(numerGG As Long, seq As Long, class As Long, msg As String)
Dim dlugosc As Long
dlugosc = Len(msg) + 12 + 1
sckGG.SendData numerGG //where sckGG is Winsock control i know that i must use Socket in C# but i don't know how
sckGG.SendData msg & Chr(0)
Hi, friends ! If I want to create a window's control unit for reuse , how could I know when it should inheritance the Forms , Usercontrol , Control , Component ... ? what are they difference between them ? I am very confuse for them ? help me !! thx!
Hi, friends! How can I do a toolbar like VS.Net ? (it's called coolbar or rebar in C++), I have some library about that , but it's very complex for me , I want to know the keypoint , what is keypoint for coolbar in C# ? thx!
This all works perfectly on my machine, but when I send it to other people to test, they get various errors. I am sending all of the files. Do I have to do anything special to distribute an app which uses an ActiveX control?
When distributing C# apps, you have to make sure A) They have the .NET framework installed (only newest XP has it installed default), and B) Do they have the right version of .NET installed. I have found that 1.0 and 1.1 executables are not interchangeable (which is a bit dissapointing).
Last Visit: 31-Dec-99 19:00 Last Update: 28-Nov-23 22:31