Jump to content
Xtreme .Net Talk

aewarnick

Avatar/Signature
  • Posts

    1052
  • Joined

  • Last visited

2 Followers

Personal Information

  • .NET Preferred Language
    C#

aewarnick's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. It is a waste to create a graphics object when one is sent to OnPaint.
  2. Let me explain better. I used Dev-C++ to create the C++ app and it has no runtimes. I am not using debug and Dev doesn't even have to be open for this weird thing to happen. I posted the same question here: http://www.vbforums.com/showthread.php?s=&threadid=271594
  3. This is actually, in my opinion, a very weird happening. I have a c++ program that stretches an image in the entire window and then draws that same image at normal size whereever the mouse moves. It works great and fast if I have another large program open like VS. But if I just have dev and the program running the drawing is slower than C# is. But C# remains the same. Is there something that .net does that my little c++ app does not that could cause that wierdness?
  4. Ok. Thank you.
  5. I was surprised when no build errors were shown when using << and even more surprised when the code worked correctly! What is << in C#?
  6. Thanks. Never saw that before. I'll try it out.
  7. Stream s= System.Reflection.Assembly.GetCallingAssembly().GetManifestResourceStream("YourNamespace.Treasure.jpg"); Bitmap b= (Bitmap)Bitmap.FromStream(s); Also, Stream is located in the System.IO namespace.
  8. That was actually part of a whole method sub or function. All you need is Stream s= System.Reflection.Assembly.GetCallingAssembly().GetManifestResourceStream(name); Bitmap b= (Bitmap)Bitmap.FromStream(s);
  9. If you are going to do that though, make sure you use a compressed image format because they will be embedded exactly as they are with the same size and bytes. Then you can get the images like this: Stream s= System.Reflection.Assembly.GetCallingAssembly().GetManifestResourceStream(name); if(s==null) return null; return (Bitmap)Bitmap.FromStream(s); name is the namespace of your project followed by a dot, then the exact name of the file including the extention. Mine would be AW.embeddedImage.png
  10. Ok, I'll explain exactly what I am doing. I have a Form that I use to test my code, I create it initially, then keep a pointer to the hwnd. From then on, I use the handle to access the Form's TextBox where I display variables values of the Form that I am testing. The problem is that when I change the text on the text box, it steals the focus from the form I am testing.
  11. Is there a way to remove focus from a control or window with code?
  12. Yes, I found that it was not the Pen it was how DrawRectangle draws the lines!!!! It is very annoying!!!!!!! Here is the rectangle I have to use to draw a border: this.BorderRect=new Rectangle(this.borderWidth/2, this.borderWidth/2, this.Size.Width-this.borderWidth, this.Size.Height-this.borderWidth); The top and left edges start the line in the middle and move out half and half. The right and bottom edges start on the inside and draw out!! Why?
  13. How do I convert the Pen.Width property to a pixels unit?
  14. The problem you are facing is the difference between .net and C++. I did a drawing test on this topic myself. You can download these programs and see for yourself. Here are the links: You can trust each program. I did nothing wierd or nasty. You must unzip all three, put them in the same folder and then use the merge file located in the 3rd Chunk to put the file together again. There are directions in the download on how to use the drawing tests. 1st Chunk 2nd Chunk 3rd Chunk If you have problems and are interested, let me know. I can e-mail the programs too.
  15. I would like to know how DragDrop works as far as setting the item in memory so that when something is drug from another application, the app it is being drug to recieves the item. DragDrop does not use the clipboard, so what does it use?
×
×
  • Create New...