Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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 > september 2005

Filter by week: 1 2 3 4 5

Drawing a zigzag
Posted by Trex at 9/30/2005 7:15:56 PM
How can I draw a zigzag line under text like most IDEs do when there is an error in code. Or if your familiar with Outlook, when Outlook sees an address that has multiple matches to it. I've looked into HatchStyle.ZigZag but it's just not rendering right. How is this typically achieved? ...more >>


TextBox Drawing Bounds
Posted by Joe at 9/30/2005 6:48:19 PM
How can I get the area or boundary where the text of a textbox is drawing so I can draw something directly below it? - Trex ...more >>

Alpha Channel not preserved when saving png
Posted by Seth Juarez at 9/30/2005 5:03:19 PM
I have the following code that for some reason saves an image but greyed = out. EncoderParameters encoderParams =3D new EncoderParameters(1); encoderParams.Param[0] =3D new EncoderParameter(Encoder.ColorDepth, = 32L); this.CanvasImage.Save(filename, getEncoderInfo("image/png"), = encoderPara...more >>

Rectangles...I must be missing something.
Posted by YYZ at 9/30/2005 11:35:41 AM
I've created a usercontrol and I'm trying to emulate the look of a mac effect (just for showing some options to my boss) by using 2 gradient rectangles. I'm having a LOT of trouble doing this, however, because I keep getting a 1 or 2 pixel line showing up. Can someone look this over and tell m...more >>

Drawing 101.
Posted by Rob Brooks at 9/29/2005 3:21:23 PM
Hi, I'm going some drawing via "Graphics" in a "Paint" callback and the commands will only manifest themselves if I minimise the window and then maximise it again. I'm new to windows programming and so I am obviously missing a lot of the basics when it comes to this sort of thing but my man...more >>

C#, WebBrowser control and accessing the ScrollBars?
Posted by Flip at 9/29/2005 11:58:13 AM
I've tried asking this one three other newsgroups with no responses. :< I was hoping that someone here with C++ and C# experience could help nudge/guide me in the right direction please? I know it's not immediately GDI+ applicable, but I'm trying to do this before using some Bitmap methods ...more >>

Drawstring word-wrap
Posted by yogee at 9/28/2005 11:20:01 PM
I am creating a program to print report where I have to draw grid. (I am not using Crystal Report as it's not free of cost). I am new to system.drawing class. I want to draw a text string in a definite width but variable height ractangle. I mean full text should come in ractangle with specifi...more >>

InvalidateRect Pinvoke and C#
Posted by Tim Klaas at 9/28/2005 9:42:57 PM
Hi, I want to use InvalidateRect from user32.dll. It seems that it doesn't really invalidate a rectangle. The whole screen can be refreshed with InvalidateRect(IntPtr.Zero,IntPtr.Zero,true). But how can I refresh a rectangle? I need this function because I draw on the desktop and I want t...more >>



Weird problem when re-painting form while moving it outside of the screen!
Posted by theunissen NO[at]SPAM comcast.net at 9/28/2005 3:47:53 PM
Hi, I've been struggling with this problem for days on and off. Hopefully somebody has some insight in this. I have a usercontrol which is placed on a form. When the control gets the paint event, I use a memory bitmap to draw on and then blit it back to the original DC (from the graphics). ...more >>

Adding EXIF property to JPEG
Posted by Roger Beniot at 9/28/2005 2:16:07 PM
I am trying to add EXIF properties to my JPEG pictures taken w/ a Canon digital camera. The fields I want to add related to GPS data. I have tried the suggestions listed at: http://www.pixvillage.com/blogs/devblog/archive/2005/03/27/176.aspx I have tried the following: 1) adding an image w...more >>

Create and save a transparent GIF - Please help
Posted by expertware NO[at]SPAM libero.it at 9/28/2005 10:56:52 AM
Hi guys! I am back with an easy question. Pamela I have this task to do. Seems crazy but Later I will explain the reason. Can anybody provide me with a simple answer. I need to create and save to disk a .GIG image, say "blank.gif" the image is a bitmap transparent of any size (even 1x1 wi...more >>

Problems with GetHicon method
Posted by simone.poste NO[at]SPAM libero.it at 9/28/2005 4:58:42 AM
I've a problem converting System.Drawing.Bitmap in System.Drawing.Icon using the GetHicon method. This is my code sample : private void pSetIco(int parNumImg) { System.Drawing.Bitmap b; b=new Bitmap(this.ilIcons.Images[parNumImg]); this.StartIcon.Icon = Icon.FromHandle(b.GetHic...more >>

VB.NET Font question
Posted by adam.spamfree NO[at]SPAM gmail.com at 9/27/2005 5:28:21 AM
Hi, I'm having a problem with trying to make the text of a button both bold and italic at runtime. All that i have so far is Button.Font = New Font("sans seriff", 9, FontStyle.Italic), but i need to make it bold as well as italic at the same time. Thanks a lot. ...more >>

Cropping resized images
Posted by David at 9/27/2005 12:00:00 AM
Hi all, I have the following code... Bitmap bitmap = new Bitmap((int)new_width, (int)new_height, m_src_image.PixelFormat); m_graphics = Graphics.FromImage(bitmap); m_graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; m_graphics.InterpolationMode = Syste...more >>

invalid bitmap???
Posted by Abraham Andres Luna at 9/26/2005 11:07:36 AM
i save a compressed bitmap to an image field in my sql database: ImageCodecInfo iciJPEG; foreach (ImageCodecInfo cdc in ImageCodecInfo.GetImageEncoders()) { if (cdc.MimeType == "image/jpeg") { iciJPEG = cdc; } } EncoderParameters epsQuality = new EncoderParameters(1)...more >>

Panel_Paint gives NotSupported Exception
Posted by Srinivasan at 9/25/2005 11:20:02 PM
I'm running a WinCE4.1 Compact Framework application using VS2003. While I run this code, I get an error saying NotSupportedException. private void panel1_Paint(object sender, PaintEventArgs e) { try { Graphics g = this.pictureBox2.CreateGraphics(); g.FillRectangle(new SolidBr...more >>

GDI+ Performance Question
Posted by Shawn B. at 9/25/2005 9:53:56 PM
Greetings, I asked this question earlier in microsoft.public.win32.programming.gdi and was redirected here. So I'll try to piece together the relevant parts of the conversation. The general theme of this question is: performance. I'm noticing GDI+ to be slow. I've been reading alot about h...more >>

StretchDIBits in managed
Posted by tHw at 9/25/2005 5:13:19 AM
Hi all! Can someone give me an idea how to solve my problem? I'm writing my application in VC++ .NET. On my windows form I'm using StretchDIBits to draw a picture in a given place. Then on this picture I'm drawing lines, text (DrawLine,FillPlolygon etc.). The thing is I'm changing the position ...more >>

Problem Loading Image To Form Graphics Object
Posted by Phil Galey at 9/23/2005 3:56:06 PM
I'm trying to display a PNG on a form in my VB.NET application, but it = will only display a cropped portion of the image. I'm using the = following: Dim gr As Graphics =3D Me.CreateGraphics Dim img As Image =3D Bitmap.FromFile(<Path to PNG file>) gr.DrawImage(img, CInt(50), CSng(50), CSng(i...more >>

Poor performance drawing circles with .NET compared to unmanaged API calls
Posted by Ansgar Kuhlmann at 9/23/2005 11:34:11 AM
Hello, I am currently doing performance evaluations with Visual Studio 2005 beta2 and .NET 2.0 beta 2. When I paint some thousands of circles to a Windows Form using the graphics object it takes about 4 times longer compared to unmanaged drawing into the device context of the form (using P/In...more >>

Drawing Transparent Bitmaps
Posted by Marc at 9/23/2005 10:58:02 AM
What I want to do is to draw a series of bitmaps on top of each other with transparency. I have one bitmap with no alpha data, and a second bitmap with alpha. When I load the bitmap with alpha data into the bitmap structure, the pixel format does not show that the bitmap supports alpha. Whe...more >>

BIG TROUBLE IN GDI and API
Posted by Sunil Batra at 9/23/2005 12:00:00 AM
Hi, I have just joined this group , i am very new to this concept of API, GDI, drawing. Can any one guide me from where to start the basic. I want to build a cad project in which i have to make lines , curves, points , 3 point ,4point beizers, rectangles, circles and so on. I want to kno...more >>

region intersect
Posted by Zachovich at 9/22/2005 9:09:03 AM
I am rorking on a treeview who's nodes can each branch out in a few different directions. Right now I need to determine whether two regions intersect with each other so i can prevent the child nodes (and their child nodes; and so forth) from colliding with each other. all help is apreciated...more >>

A Bitmap to grayscale (C#)
Posted by RicercatoreSbadato at 9/22/2005 6:00:02 AM
My code is the following: public Bitmap myConvertBitmapToGrayscale( Bitmap i) { Bitmap b = new Bitmap(i.Width, i.Height, PixelFormat.Format16bppGrayScale); Graphics g = Graphics.FromImage(b); g.DrawImage(i,0,0); g.Dispose(); return b; } but something's going wrong... ...more >>

recommendation
Posted by Jurica at 9/22/2005 12:06:02 AM
Hi, I'm a beginner in graphics programming. I have the following situation: I have to show existing bitmap in the control on the form and then put one or several transparent layers over it which will be used for drawing. Which control to use to load the existing bitmap on o form? Will pictur...more >>

curious about CustomControl
Posted by SharpCoderMP at 9/22/2005 12:00:00 AM
hi, to create my own control i need to derive from System.Windows.Forms.Control but, my control is sooooo simple - it draws only line, a separator-like line, with a custom color and width. i dont need handling any user input and do not use any fancy drawing routines nor i do not implement ...more >>

Invalidate Desktop with C#
Posted by fdauo NO[at]SPAM yahoo.de at 9/21/2005 11:56:17 PM
Hi together, I have a "sliding" form on my desktop which can be expanded or collapsed in a sliding manner. So my problem is, that if the form is collapsing, I want to refresh or invalidate that region on the desktop. I already tried it with something like this: -----> snip [DllImport("...more >>

Drawing an arc with three inputs
Posted by sravinut at 9/21/2005 3:35:47 AM
Hi, I have to draw an arc with three inputs. I know horizantal length an vertical length and the sweep angle. As i know two lengths of th triangle(horizontal length and vertical length) i am calculating th third side using Pythogoras theorem. I am assuming that it is m chordlength. I am...more >>

printing issues (.NET2.0 issue perhaps?)
Posted by Lloyd Dupont at 9/21/2005 12:00:00 AM
I am trying to print a fairly complex document. some page are portrait, and some other are landscape while it works well in preview, when I'm printing everything is orientated as the first page. although I do set the page orientation in OnQueryPageSettings() for each page apropriately. d...more >>

another printing problem
Posted by SharpCoderMP at 9/20/2005 7:21:18 PM
hi, i have this problem when priniting to postscript printer (i print to file, convert it to pdf and view result): the size of a page is set to A4 landscape through the print dialog, when i look at PrintEventArgs that are passed to my printing method i see that PageBounds are set to 0x0;...more >>

printing problem
Posted by SharpCoderMP at 9/20/2005 7:05:01 PM
hi, i have this problem when priniting to postscript printer (i print to file, convert it to pdf and view result): the size of a page is set to A4 landscape through the print dialog, when i look at PrintEventArgs that are passed to my printing method i see that PageBounds are set to 0x0;...more >>

opensource drawing
Posted by Peter Proost at 9/20/2005 10:22:51 AM
Hi does anyone know a good program (if possible freeware) our maybe opensource .net project for drawing real windows (the one you see in houses), 2D is good enough it doesn't need to be 3D I now this is not realy a programming question, but I can't find one using google, because entering drawing...more >>

Open Type font and gdi
Posted by mgonzales3 at 9/20/2005 10:03:03 AM
I just bought a font from Adobe. It was a "oft" font which is open type. I'm trying to create a bmp using a memory stream and is unable to find my font. Any reason why this would so? The exeption i get: Font cannot be found. I searched my registry at: SOFTWARE\Microsoft\WindowsNT\C...more >>

help in Drawing a polygon
Posted by sravinut at 9/20/2005 5:47:16 AM
Hi, I am drawing a polygon by connecting a series of points. I am storin points in an Arraylist variable. On mousedown i am capturing point and storing the same in Arraylist. I drew a traingle with four points and three lines. by last point an first point are same. After drawing polygo...more >>

Override Paint
Posted by Rithesh Pai at 9/20/2005 12:00:00 AM
Hi all, Whenever,I use Override Paint to handle my drawings on pictureBox,I see that the form does not load and gives null argument exception. Can anyone tell what causes this?? regards Rithesh ...more >>

Creating Html document
Posted by Ken Kazinski at 9/19/2005 7:44:08 PM
I want to create a html document with inputs to my program. Is there a good place to start to find examples? What namespace should I use or object? Thanks....more >>

Creating an Alpha gradient between one curve and another
Posted by Mike Gale at 9/19/2005 6:33:02 PM
I've used GDI+ in .NET before, though not for several months. I'd like to create an alpha gradient to "let the background through". In this case I want something like 100% transparency along one curved edge, moving to something else, say 50% transparency along another curved edge. The dir...more >>

Resizing Images on-the-fly vs. storing multiple copies on the file system
Posted by dadonk at 9/19/2005 7:31:00 AM
I am working with a web application that allows users to upload high quality photos into an image library. Those images will then be used in different places and at displayed at different sizes. My question is, does anyone know if generating different sizes of the images on-the-fly would be a bi...more >>

GIF & JPG headers
Posted by Nick at 9/19/2005 12:00:00 AM
Hi there, I'm trying to determin whether JPG and GIF images have a set header or not, for example, do GIF's always start with "GIF" and do JPG's always have "JFIF" written near the beginning of the file? If someone could point me towards a reliable internet resource I would be mo...more >>

A generic error occurred in GDI+. System.Drawing
Posted by Bernhard Wurm at 9/19/2005 12:00:00 AM
I've got a quite complicated situation here! I used the ASPImage from ServerObjects to resize pictures per my ASP script (not asp.net) This COM component has got a problem with windows server 2k3 Web Edition. So I decided to write this component by myself. I wrote a .NET Class, which should ...more >>

A Graphics object in a VC++ App
Posted by Victor at 9/18/2005 12:07:50 PM
Hi everybody! VS.NET 2003 C++ MFC-SDI-Standard Project created by the wizard. I have added the following to the CMyAppView.h file : #include <gdiplus.h> using namespace Gdiplus; #pragma comment(lib, "gdiplus.lib") Then I put the following line into the function CMyAppView::OnDraw(CDC*...more >>

Can i draw away from my applications windows
Posted by Glenn at 9/17/2005 12:02:35 PM
Hello Can i use gdi+ to create a drawing object away from my applications dialog/window for example if i wanto display a pop up just above the taskbar like messenger does when someone signs in, Thanks Glenn ...more >>

Changing dpi
Posted by Patrick Speer at 9/16/2005 6:07:07 PM
Any hints on how to change the dpi of an image? I see read-only properties for dpiX and dpiY but need to change from say 72dpi to 150dpi. TIA! -Pat ...more >>

draw a bitmap
Posted by mgonzales3 at 9/16/2005 12:05:02 AM
I can draw a bitmap with a .ttf font but why not with an OpenType font? Dim fontFmly As New FontFamily("MICRStd(Open Type)") Dim font As New Font(fontFmly, 12, FontStyle.Regular) Please help me! help me! ...more >>

Double Buffering to draw lines
Posted by Rithesh Pai at 9/15/2005 12:00:00 AM
Hi all, I had been been trying for the double buffering technique to draw line on movement of mouse on pictureBox.The following is the piece of code: private void pictureBox1_MouseMove(object sender,MouseEventArgs e) { if(e.Button==...more >>

call msword from .net
Posted by Rithesh Pai at 9/15/2005 12:00:00 AM
Hi all Is there any way to call applications like msword,mspaint etc from my .net application. regards ...more >>

What's the secret to creating radial gradient?
Posted by Chris Hayes at 9/13/2005 10:00:14 AM
Greetings, I am delving into the Drawing parts of .NET (out of necessity) and while I am making great strides in understanding how to use it, I have been stymied by creating the proper gradient in a circle... I need the gradient to start in the center of the circle and move outwards as a...more >>

Drawing a bmp using a MICR font
Posted by mgonzales3 at 9/13/2005 7:05:04 AM
I'm drawing an image using a MICR font and it draws fine w/no problem. However I get all this noise in my bmp. I used some suggestions found at the bobpowell.com (esp. onebit) but it basically strips out my bmp to look like a font on the skinny. Here is my code. -------------------------...more >>

Custom caption button and NativeWindow
Posted by MariusI at 9/10/2005 9:41:03 AM
Hi, i've created a usercontrol with a non-rectangular nc-area and a close button. Everything is up and running nicely, but i'm not happy with the class layout, mainly because all state management is done in the usercontrol class. Ideally, i want to refactor so that i have one class which corre...more >>

VB.NET + OpenGL ?
Posted by PetitTrot at 9/10/2005 5:15:10 AM
I search examples mixing VB.NET and OpenGL? (web site, books etc.) Thanks p.s. actually I use VB.NET 2005 Beta 2...more >>


DevelopmentNow Blog