Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008


all groups > dotnet drawing api > april 2006

Filter by week: 1 2 3 4 5

Desperately needing direction with EncoderParameters and saving images under different compression/quality schemes
Posted by NutsAboutVB at 4/30/2006 1:30:07 PM
Hello, I am a VB.NET programmer and I have a JPEG image file (from digital camera) of about 109 KB's in size, when I open it and save it (without making any alterations at all, just going to File --> Save) in MS Photo Editor, the file is automatically shrunk in size to 81 KB's. When doing the...more >>

Optimizing Large Graphic plots
Posted by slundstrom at 4/29/2006 7:25:10 AM
I'm looking to be pointed in the right direction. I need to display a large number of shapes at different points (>1000 entities). I need the allow the user to zoom in and out and pan around on the display. I also need to be able to refence a shape at a given point with a mouse click and display...more >>

DrawString - Simple, yet very annoying
Posted by Marko Binic at 4/28/2006 5:38:31 PM
Hi, I've been trying to do a really simple thing with the GDI+ DrawString method - draw wrapped text in a "proposed" rectangle - that means that the text should wrap as soon as it (b)reaches the rectangles right edge, but not have sliced words. But I've been getting really strange results, lik...more >>

AccessViolationException
Posted by Nat at 4/28/2006 12:40:07 AM
I sometimes got some AccessViolationException from System.Drawing.dll. It doesn't happen everytime but it happens like once a day. Is it a known issue in .NET 2.0? I've never got this kind of exception in .NET 1.1 (even NullReferenceException) System.AccessViolationException: Attempted to rea...more >>

drawing a border around a region
Posted by PJ6 at 4/27/2006 6:24:35 PM
I have a region that was created by cloning one, and excluding another. How do I draw a border around this new region? There is no graphics path. Paul ...more >>

is hardware acceleration support coming for GDI+?
Posted by PJ6 at 4/27/2006 2:38:44 PM
This is going to be a big issue for me in the future - do I invest the time to learn managed DirectX, or can I stick with GDI+ and wait for hardware acceleration support to be added later? Paul ...more >>

Bitmap.MakeTrasnparent makes background black when saving from clipboard
Posted by BIG_j at 4/27/2006 12:00:00 AM
I have dynamic image(s) on the clipboard that I need to save as a transparent gif. There are a number of posts regarding MakeTransparent but I cannot get this to work for what I am trying to do. I am NOT loading the picture into a form and there are no paint events to consider. All images have a...more >>

How do I download code from wellformed?
Posted by Shawn B. at 4/26/2006 1:24:33 PM
Greetings, I just no noticed Wellformed.net and was wondering how to download the code samples? Also, will there be future editions? Thanks, Shawn ...more >>



How to transform ClipRectangle?
Posted by jeremy.m.johnson NO[at]SPAM gmail.com at 4/26/2006 11:42:38 AM
In my OnPaint method I'm applying scale and translate transformations (Graphics.TranslateTransform and Graphics.ScaleTransform) to my graphics, however I don't see a clean solution to for applying this transformation to the ClipRectangle. The clip rectangle isn't particuarly useful until it's b...more >>

Drawing a rectangle anywhere on the desktop
Posted by Stupid48 at 4/26/2006 10:43:32 AM
I have read many many articles on drawing in .net but I guess the wording i'm using to search is not correct. I have a form that when I hit a button, I would like to hide the form and be able to use the mouse to select a rectangle anywhere on the screen (windows desktop) and get the height, wi...more >>

Interesting flickering problem if application's user control is invalidated by external application (e.g. Notepad)
Posted by sasifiqbal NO[at]SPAM gmail.com at 4/26/2006 7:50:54 AM
Hi, One of my developers are facing an interesting problem regarding UserControl invalidation. The problem is: We have two forms in our application. Form A does nothing except loading of Form B and Form B contains an array of UserButton kind of contol (we have created our own buttons deriv...more >>

Charting Using VB.NET
Posted by Rajesh.k at 4/26/2006 12:00:00 AM
Hi all, Can anyone help me in creating a statastical Graph(Bar/Pie charts) using = ..Net??? Thanks in advance. --=20 Warm Regards, =20 Rajesh.K Programmer, iInterchange Systems Pvt. Ltd., V S & B Nitekan, Y Block, New No.8, Old No. 50,9 th street, AnnaNagar, Chennai - 600 040, India...more >>

Question about WM_NCPAINT
Posted by Shawn B. at 4/25/2006 10:37:43 PM
Greetings, I'm creating a series of custom controls that derive from either UserControl or Control. I want to draw my own border based on the DrawBorder3D(). Is it necessary to capture WM_NCPAINT event in these cases? If not, then what is the best approach. Assuming I don't need to hand...more >>

Custom Scrollbars and WinXP Themes
Posted by Shawn B. at 4/25/2006 10:07:59 PM
Greetings, How do I make a custom (derived from Control) Scrollbar (or other control) participate in the WinXP theme schemes? Thanks, Shawn ...more >>

scaling an image in a picturebox
Posted by Lee Crabtree at 4/25/2006 2:30:20 PM
I have a PictureBox control on a form that displays a bitmap. However, the bitmap rarely matches the size of the PictureBox. The different SizeMode properties don't really do it for me. In one case, it changes the size of the PictureBox itself, making it larger than the form. In another,...more >>

Custom Border Problems
Posted by Shawn B. at 4/24/2006 12:30:43 AM
Greetings, I'm creating a custom control that should paint a custom border from the DrawBorder3D method. I'm subclassing WndProc and capturing the WM_NCPAINT message as follows (pardon my brevity): public event System.Windows.Forms.PaintEventHandler NonClientPaint; protected virtual ...more >>

how to draw a vertical line
Posted by thecoolone at 4/22/2006 1:14:13 PM
i have an home page that contains many controls and links. i wud like to group all these on the left side of the page and partation it from the rest of the page using a vertical line. So is there any way in C# , ASP .NET to draw a vertical line. Like how there is a drag n drop for horizonta...more >>

Need a free (or open source) diagraming component.
Posted by Afshar Mohebbi at 4/22/2006 8:03:18 AM
Hi All, A need for a diagraming component again. I need one of them that is free or open source and don' know where I can find one. I need it for drawing some Business Diagram that is consisted of several Circle and Arrows. Circles may have an loop on theirselve. It's the basic that I need now....more >>

number of colors?
Posted by Lore Leunoeg at 4/22/2006 12:39:19 AM
Hello How can I get the number of colors used in a jpg or a bmp or a raw image with dotnet c#? Any hint? Thank you Sincerely Lore ...more >>

A lost article
Posted by tool69 at 4/21/2006 4:02:08 PM
Hi, I have read a good article on GDI/GDI+ by Lars Powers. ( http://www.code-magazine.com/Article.aspx?quickid=0305061 ) Unfortunately the sources are missing on the indicated web site. I would like to know if some of you have them or something similar in C#. Thanks a lot : Kib....more >>

this group for gdi+?
Posted by YisMan at 4/21/2006 11:04:01 AM
hi is this the right group for gdi+ or rather the group: win32.programmer.gdi -- Thankfully, YisMan...more >>

Creating Graphics to use in asp.net pages
Posted by basulasz at 4/21/2006 4:49:02 AM
I need to create graphics and use them in my web pages dynamically. I see examples about GDI+ in windows forms applications. But i need to create graphics to use with asp.net pages. How can i do that, or are there any tutorial or article about that?...more >>

GIF Transparency
Posted by Cesar Chalom at 4/20/2006 2:48:14 PM
Hello, When I save any image as GIF, gdiplus always uses its halftone palette, right ? So I did a test, and then retrieved the color palette, and found that there is the color ARGB 0 (zero), that means 0 for Red, Freen, Blue and Alpha. That is the only color that has ALPHA = 0 So, that m...more >>

HasMorePages = true doesn't let me jump to next page
Posted by Leo at 4/19/2006 9:35:29 AM
I set HasMorePages to true, but it doesn't let me jump to next page. (Of course, if I remove the HasMorePages = false in my if statement, it will create hundreds of pages). Any suggestion? Thanks in advance. Leo My code to call the print event: .... { m_PrintDoc = new PrintDocument(); ...more >>

Draw on ??? and Add Scroll Bars
Posted by Craig Hornish at 4/18/2006 4:46:45 PM
Hi, I need to draw a group of shapes (rectanges) that will be larger than the control (from what I read on Bob Powles link it should not be a picture box :) that they are drawn on. Then I need to be able to scroll so it can be seen in different areas. What is the best way of doing so...more >>

Problem with window size (NCCALCSIZE) when restore
Posted by mayanc1981 NO[at]SPAM gmail.com at 4/18/2006 1:26:47 PM
Hi, I'm building a skin for my form in c# and I have a little problem. I'm using NCCALCSIZE to resize my client size and give painting space for my custom borders. For some reason, the form is getting smaller every time I restoring it from minimize / maximize states. This is the code for...more >>

Drawing text that can be selected and copied into the clipboard.
Posted by hans at 4/18/2006 6:45:01 AM
Hi! I need to extend a third-party program that paints text on a Panel using the Graphics Object. The customer wants the text to be selectable so that he can copy it to the clipboard. I am completely new using Graphics in .NET. Is this feasable using the panel and graphics objects? Thanx...more >>

can we make a simple ms paint like interface with asp2.0
Posted by yasin at 4/16/2006 5:35:11 PM
is it possible that we can make a simple ms paint like interface with asp2.0(simple draw proccesses only) . if possible which libraries we have to use for it. ...more >>

Out of Memory when editing graphic...
Posted by Wade at 4/14/2006 10:00:42 AM
Hi, I have code that adds a BarCode to a scanned image that is stored in a SQL database. It works fine for scanned images that are 8.5 x 11, but I also have some images that are 24x36. When I try to add the barcode to these larger images I get the Out of Memory error. I put the image on ...more >>

Drawing irregular shapes with user interaction.
Posted by Randolpho at 4/13/2006 8:31:55 PM
I'm working on a project that involves irregular shapes -- nodes in a complex animated directed graph, really -- and I was wondering about how I should go about building my architecture. I've been fooling around with a "roll my own" approach, in that I'm drawing the shapes in a Panel.OnPaint m...more >>

overlaying text on Windows Media Player
Posted by Keith Langer at 4/13/2006 11:58:27 AM
Hi, I was wondering if anyone can tell me how to transparently overlay text and images on a Windows Media Player or Shockwave control. thanks, Keith Langer ...more >>

Graphics disappear on some computers
Posted by seodfac NO[at]SPAM yahoo.com at 4/12/2006 8:16:44 PM
I am having a problem getting my graphics to stay on a form on certain machines. I have a heat transfer project that does some calculations and then gives a visual representation of the results. The graphics are done within the code and look great, but on computers without visual studio, the gra...more >>

Creation of icons with transparent pixel
Posted by Pizzi at 4/12/2006 8:50:18 AM
Hi I have to create some icons (from bitmaps) with transparent pixels. The problem is that creating them with "System.Drawing.Icon.FromHandle(mybitmap.GetHicon())" makes the transparent pixels in the bitmap black !! I tries settings the pixels in the bitmpa to every possible color (Transpa...more >>

Gray out obejcts in a disabled custom draw control
Posted by Jason Ho at 4/12/2006 12:00:00 AM
Hi All, I created an owner draw Listbox with icon in each item. When I disable the listbox, the content and scrollbar inside will not be gray out automatically. Any suggestion to make the icon gray out (apply a filter to the icon bitmap before drawing can work?) and also have to make sc...more >>

Polygon.Contains equivelant.
Posted by Steve at 4/11/2006 6:10:51 PM
Is there an equivelant to the Rectangle.Contains(Point) but for a Polygon. I'd like to detect if the mouse is over a wierd shape that I've drawn. Thanks. Steve. ...more >>

Transparent Picturebox possible ?
Posted by grubertm NO[at]SPAM gmail.com at 4/11/2006 12:19:22 PM
Despite searching for the past 4 days I have not found any solution to what should be a simple task: Create a PictureBox which renders its Image with an alpha value so that other control underneath it can show through, similar to what you get by setting a Forms opacity. The usual recommendati...more >>

Cycling Images Does not refresh picture box (and is really slow)
Posted by Ezekiel571 at 4/11/2006 9:10:36 AM
Hello, I am trying to cycle images (tif) through a picture box. Say 5 or so. Its really slow and does not refresh for each image. How can I make sure that the user can see the images and also speed it up. Im using vb .net and wrote basically the same code in c# to see if it was faster. Any...more >>

Saving Jpeg/Exif info Please Help.
Posted by TheGanjaMan at 4/11/2006 5:56:45 AM
Hi everyone, I'm trying to write up a simple image stamper application that stamps the Exif date information from the jpegs that I've taken from my digital camera and saves the new file with the date stamped on the lower right part of the picture. (I'm not an advanced programmer so my code ...more >>

Help with Clipboard format - CF_METAFILEPICT
Posted by J at 4/11/2006 12:00:00 AM
Hi everyone, I'm having some problems with the various clipboard formats, hopefully someone can give me some pointers. A certain application seems to copy it's image data to the clipboard as MetafilePict and not MetafileEnhanced. How can I get the data from the MetafilePict clipboard ent...more >>

Generic GDI error
Posted by Josh at 4/11/2006 12:00:00 AM
Hi, I'm going nuts trying to work out why I'm getting a "Generic" error. I've included the code below. The error occurs when trying to save the file ( marked with a "HERE" comment). This is a console app'. Any help or suggestions for reading appreciated. Thanks FileStream fs = new F...more >>

Just starting
Posted by Chris Saunders at 4/10/2006 11:01:53 PM
Using VS 2005. I'm just beginning to learn about drawing in .NET, sorry if this question seems stupid. Here is some code: public partial class MainForm : Form { Bitmap b; public MainForm() { InitializeComponent(); int w = Cli...more >>

Array of Images
Posted by Meher at 4/10/2006 6:20:40 PM
Hi: Can anyone please give me a possible solution. I need to write a function in .NET which would accept an array of image urls and should return one image. The method should create a new image by iterating through each image url, read the image and overlap one image above the other and ...more >>

How to get the real / total heigt of a text-line
Posted by vstudio NO[at]SPAM web.de at 4/10/2006 12:58:56 PM
Hi I have problems to display certain lines of text on my display. I know how many rows are in my text, eg 20. And I know the resolution of my Screen: Screen.PrimaryScreen.Bounds.Width Now I want to display my text with Verdana bold as big as possible. Something is wrong or missing in my func...more >>

Using GDi to Annotate a tiff in VB .Net
Posted by Ezekiel571 at 4/10/2006 12:51:12 PM
I was trying to open a tiff and write text to it using GDI when I came across the error "pixel format of the original image is indexed" I have read the groups and followed the instructions in order to come up with a solution but the problem Im having now is the sizing. When I open my image ...more >>

Draw something after a button click !!!
Posted by news.microsoft.com at 4/9/2006 11:43:11 PM
Hi, I tryed to draw a rectangle but it only appears when the code is in the Paint Event. I would like to know how can I draw something after a button click. Thanks in advance CC ...more >>

Drawing in picturebox
Posted by shulya at 4/9/2006 3:17:59 AM
hello everyone, I am using a picturebox to show a map image. Only a part of the map image is loaded each time. The user can grab the map image in the picturebox and move it inside the picturebox. whenever the user reaches the part of the map which is not loaded , the new part of the map is l...more >>

Filled polygons print to PDF as opaque
Posted by billw NO[at]SPAM online.nospam at 4/7/2006 12:06:02 PM
I am using .NET 1.1 (C#) to draw a graph. I am having trouble printing overlapped polygons that are filled with a transparent brush (HatchBrush(AHatchStyle, AColor, Color.Transparent)) to a PDF (or any PostScript based printer.) They print as though they are opaque, not tranparent. I co...more >>

Want Gif, but got PNG
Posted by Liming at 4/6/2006 9:36:15 AM
Hi all, I have a byte[] and I'm trying to stream it back to my aspx page using Resposne.OutputStream I set the content-type to "image/gif".. but when I stream it back, I got a png instead. here is a watered down version HttpContext.Current.Response.Clear(); HttpContext.Current.Respons...more >>

ugly drawn text to bitmap buffer
Posted by carry at 4/5/2006 11:07:12 PM
Hi all I'm drawing text and some other shapes on bitmap buffer. All objects just in one pass, but the text looks fuzzy as it were painted more times when bitmap is dropped on Graphics. I checked it with diagnostic output and it's drawing method is called just once, same as on other shapes. ...more >>

Convert unsafe code to safe, how to convert pointers to regular GDI+ methods?
Posted by Liming at 4/5/2006 3:42:09 AM
Hi all, Can anybody help me with this? I'm trying to convert this Color Quantaizaton code from unsafe to safe, but I don't understand pointers. How can I do convert this code to the safe version? I know from research, I can get a byte of a bitmap by doing byte pSourceRow = Marshal.ReadB...more >>


DevelopmentNow Blog