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 > may 2004

Filter by week: 1 2 3 4 5

How to get a picture from webcam?
Posted by Antti Laakso at 5/31/2004 5:26:03 AM
hi I'm trying to get a picture from webcam, maybe with vb.net or c Can anyone help me with that Antti Laakso...more >>

Open image : Out of memory exception
Posted by Michael at 5/31/2004 12:56:02 AM
I got an out of memory exception when trying to open a tif file. But the tif file can be opened from windows imaging. MSDN mentioned that an out of memory exception will be thrown "If the file does not have a valid image format or if GDI+ does not support the pixel format of the file" How I...more >>

Relative coordinate system in GDI+ ?
Posted by Chris at 5/30/2004 8:59:10 PM
Does GDI+ have the ability to retain a sub-coordinate system? For example, say I create a triangle spaceship through a graphics path with the ship pointing in the direction of the x-axis. Then I rotate that ship slightly. Then I want to translate the ship forward (no longer parallel to the x-a...more >>

"free-form" selection {Polygon Selection}
Posted by suresh at 5/30/2004 8:41:25 PM
Can any body tell me how to have a free-form{polygon} selection of an image in .NET. The one the look alike of the one in the mspaint free-form selection. Thanks in Advance suresh...more >>

What is the purpose of OnPaint?
Posted by kjon at 5/30/2004 1:57:44 PM
Hi, I'm new to the GDI graphics programming and would like to know what's the real purpose of the overridable OnPaint event? I mean, I have tried to draw something on my control in a normal sub and it still can draw when I call the sub in the program without going through OnPaint. This also happ...more >>

Metafile RotateFlip method
Posted by Rasmus Oudal Edberg at 5/29/2004 7:39:52 PM
Hi, When I try to RotateFlip a Metafile object i get an NotImplementedException. I would like to know if anybody knows a workaround for this ? Regards, Rasmus Oudal Edberg ...more >>

Copy custom region from Bitmap to another Bitmap
Posted by danijel.klemencic NO[at]SPAM uni-mb.si at 5/29/2004 2:47:05 PM
Hello, How can i copy custom pixel wrom Bitmap to another Bitmap. Example: Source(0,0,640,480) -> Destination(10,10,40,40) where params(x,y,width,height) I tried with folowing code, but i got some strange results. Code worked only wor examles where: pt1.X = ....61,65,69,... Please...more >>

Copy custom region from Bitmap to another Bitmap
Posted by danijel.klemencic NO[at]SPAM uni-mb.si at 5/29/2004 2:37:24 PM
public static Bitmap Copy(Point pt1,Point pt2,Bitmap bmpOrg) { int PixelSize = 3; int width = pt2.X-pt1.X; int height = pt2.Y-pt1.Y; Bitmap bmpCpy = new Bitmap(width,height); BitmapData bDataOrg = bmpOrg.LockBits(new Rectangle(0,0,bmpOrg.Width,bmpOrg.Height), ...more >>



how to integrate "Windows Picture Viewer and Fax Viewer" (shimgvw.dll) of Windows XP in my c# app?
Posted by ~dr-sci-fi at 5/28/2004 12:59:26 PM
hi all, i want to use "Windows Picture Viewer and Fax Viewer" in my c# app to manipulate images, picture viewer is found as a DLL (shimgvw.dll) in System32 folder of WinXP. can some one tell me how can i use it in my C# app? TIA - sci ...more >>

Image object of treeview
Posted by sam at 5/28/2004 1:51:03 AM
Hi I tried to print a treeview . What I need is a image object from the treeview I am looking for CLR compliant way not using PInvoke I trie Graphics gr = Graphics.FromHwnd (tree.Handle ) Bitmap bmp = new Bitmap (width,height,gr) Image img = Image.FromHbitmap(bmp.GetHbitmap()) but if i tr...more >>

GDI+ error when trying to use DoubleBuffer
Posted by Chris at 5/27/2004 11:52:47 PM
When I run this code I get this error. If I comment out DoubleBuffer, the program works fine. Can anyone figure out why it is failing? Error message: An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll Additional information: Invalid parameter used. C...more >>

Printing GDI drawings
Posted by Flare at 5/27/2004 11:34:48 PM
Hi. I have made a simple painting applcation. I have a mainform wich creates a class called drawingPanelwich inherit from Panel. In the drawingPaneli have overriden onPaint an the the painting. Now on my mainform i have a button called Print. I know how to print .....PrintPageEventArgs e (e....more >>

DrawString Output Characters Move Around As You Type
Posted by PDoug at 5/27/2004 7:21:02 AM
If I create a string that dynamically gets updated with characters I type on the keyboard, the System.Drawing.Graphics.DrawString method shows the characters in the updated text moving back and forth - rather than the original characters maintaining their position, and the new characters being appen...more >>

Thread safety
Posted by Steve McLellan at 5/27/2004 12:24:46 AM
Hi, I've just discovered that accessing Image.Height (and probably other properties) in a multi-threaded environment can cause access problems (as a test, you can spawn a hundred threads and get them all to perform a couple of multiplications on an image's height and width ). I know I can prev...more >>

Drawing EMF on form is pixelated?
Posted by rcl58 NO[at]SPAM iglou.com at 5/26/2004 2:22:52 PM
I have a drawing that I have exported from Corel Draw to EMF. When I draw the image on a form it looks very bad (pixelated). How do make it look like the original? Thanks! Bob...more >>

How do I get the caption color 2?
Posted by RichM at 5/26/2004 12:46:03 PM
jeez, the search function on this forum stinks. I never find anything there, so forgive me if this was asked a thousand times There are two colors in a gradient caption, both are modifiable by the user. In SystemColors I can see an ActiveCaption color, but how can I find color 2? Obviously a gradi...more >>

How to override the paint on a command button.
Posted by John Mark Howell at 5/26/2004 9:10:36 AM
I have created a class that extends the System.Windows.Forms.Button class and am attempting to create a shaded background by overriding the Paint event. However, when you first place the control on the form, you see my shaded background for about 1/2 a second then it changes and looks like a no...more >>

how to draw dotted lines/rectangles on a bitmap?
Posted by ~dr-sci-fi at 5/26/2004 2:37:42 AM
hi, i want draw dotted lines and/or rectangles on a bitmap at high-speed. how can i achieve that? TIA - sci ...more >>

DateTimePicker
Posted by Saurabh at 5/25/2004 4:08:58 PM
Hi All, I want to use the DateTimePicker in my application but there does not seem to be any way of setting the date to null or the edit portion of the display to be blank. The checkbox does look crap, Does anybody have any idea about achieving this? I also tried having a text control and a...more >>

Freeware image viewer fully developed in .Net: e-View
Posted by MrBasic at 5/25/2004 11:42:36 AM
We have developed a free image-viewer for testing .Net and GDI+ capabilityes. e-View supports a lot of raster and vectorial image formats: -Bitmap (BMP) -Graphics Interchange Format (GIF) -Joint Photographic Experts Group (JPG) -Portable Network Graphics (PNG) -Tag Image File Format (TIFF) ...more >>

Moving the MainMenu position
Posted by Muffato at 5/25/2004 11:11:03 AM
Do you know how can I move the position of a MainMenu instead the top-most... like Office and Visual Studio do Thanks Kleber Muffat Campinas-Brazil...more >>

.net chart object
Posted by Miro Durcik at 5/25/2004 10:50:46 AM
Does anyone know of any free (simple) chart control for .net. I don't mean that MSCHART.ocx, cause probably that is causing problems in my app. bar, pie, 3d bar Arki...more >>

What do the Image.Flags mean?
Posted by Brian at 5/24/2004 7:51:03 PM
I am working on a picture viewer and some of the images (jpg) have resolutions as high as 2700 or 1350 for the HorizontalResolution. These images also have a 'Flags' value of 0x13088 whereas images with 96.0 H and V resolution have a 'Flags' value of 0x12088. The picture format for both is 24bpp ...more >>

how to retrieve and display image from sql server
Posted by Sam at 5/24/2004 1:43:45 PM
hi, how to display image (save as image in sql server) in asp.net ? ...more >>

Slow to Draw
Posted by Cory Burkhardt at 5/24/2004 8:17:21 AM
I am writing an application that has a form that needs to display a grid of squares (20x20) that could possibly each have different images in them. Initially, I had each of the squares represented by a different control, which I designed myself. However, the grid was getting drawn much too slow...more >>

Custom Property of type Custom Struct
Posted by Nilesh Rade at 5/24/2004 5:36:03 AM
I am having a custom struct called ControlMargin which will have Left and Right. It is ame as that of Size which has Weidth and Height Now I am using this struct to define a property called Margin which is og the type ControlMargin But when i am going to the designer of my control i am not abl to ...more >>

What kind of control?
Posted by Rudolf Ball at 5/23/2004 10:40:27 PM
Dear NG, I want to build a car-rental application, where cars can be rent for some days. I want to display a table "Cars" and "Day", eg. 20.05 21.05 22.05 ... Car 1 X X Car 2 X X X Car 3 X .... My questi...more >>

Changing colors of a colorpalette doesn't work!
Posted by Martin Cabalzar at 5/23/2004 4:34:00 PM
Hi=20 Is it possible to change the colors of a colorpalette from an existing = image and then save it to a file with the new colorpalette? This is my code - but it doesn't work: protected void SaveAsNewImage() { Bitmap bmp =3D new Bitmap("test.gif"); // The existing image bmp.Pal...more >>

Adjusting Size of UserControl Visible Clip Bounds
Posted by PDoug at 5/23/2004 7:26:02 AM
I'm trying to build a Math Editor UserControl. The UserControl contains two Panel controls. The first, pnlScreenContainer, contains the second panel control pnlScreen. This arrangement allows me to scroll pnlScreen inside the pnlScreenContainer control without running into scrollbar issues present w...more >>

extract iptc tags?
Posted by news.microsoft.com at 5/23/2004 2:01:31 AM
hello, i tried to extract iptc fields (description, author etc) with .NET 1.1. unfortunately i dont know how. i tried the propertyitems of the Image-class but this doesnt return the results i wish it does. anyone knows how? thanks in advance thomas ...more >>

Can't get window handle
Posted by Axio at 5/23/2004 12:51:04 AM
I just can't find out the way to get the handle of a window....more >>

Finding color of specific pixel in Image
Posted by Alex I via .NET 247 at 5/22/2004 5:51:47 PM
Hi all . I'm trying to figure out how do I check the color of a specific pixel in an Image .. anyone can help ? Thanks -------------------------------- From: Alex I ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>JxJBMhoabk6Y8ttDzYZ1Qg=...more >>

How to Listen to the event registration and calling invalidate of a control??
Posted by Nilsh Rade at 5/21/2004 6:21:03 AM
H I am having a custom control which is having a Drag Event Now what i want to do is I want to call "Invalidate" on my control when the user of the control registers for this event. Because the requirement is like if there is a listner to this event then i have to draw a texture where he can drag ...more >>

Howto Save a bitmap in grayscalae jpeg???
Posted by beanleouf at 5/19/2004 6:29:55 PM
Everything is in the title... In fact, i get a bitmap in grayscale that has been captured with a scanner the code is approximately this one: Dim MyImage As Bitmap MyImage = myfunctiontolaunchthescan() MyImage.Save("c:\test.jpg", I.dont.remember.Jpeg) The result is i a picture in graysca...more >>

BitBlt GDI+ Memory Deallocation error
Posted by James Westgate [Crainiate] at 5/19/2004 4:20:42 PM
I am currently investigating the fastest way to draw an offscreen bitmap to a control usingthe following techniques in VB.NET 1. graphics.DrawImage 2. graphics.DrawImageUnscaled 3. using the bitblt API in GDI The idea with the last item is that the GDI bitblt call may be hardware accelerat...more >>

listbox background-image
Posted by Thomas Wang at 5/19/2004 2:47:02 PM
I created an owner-draw listbox with background image , i draw per item using texturebrush like this: e.graphics.fillrectangle(otexture,e.bounds); e.Graphics.DrawString("test",FontUsed,otexture,e.Bounds.X,e.Bounds.Y); In order to avoid flicker, I rewrite the WM_ERASEBKGND & WM_VSCROLL in WndP...more >>

Hard time creatiing multipage tif: Help!
Posted by flipdoubt at 5/19/2004 10:43:12 AM
I keep getting an "ExternalException: A generic error occurred in GDI+" from the following code that attempts to combine two single page images into one two-page tif. Has anyone successfully done this? using System; using System.Drawing; using System.Drawing.Imaging; public class TifTest...more >>

forms scrollbar
Posted by rethna_24 NO[at]SPAM yahoo.com at 5/18/2004 1:08:32 PM
I have a form and in the form I have enabled autoscroll property and I want to enable only vertical scroll bar..How can we do that.. Appreciate your response...more >>

HELP: Constraining cursor movement to intercharacter positions
Posted by Thomas Hill at 5/18/2004 8:02:22 AM
I have a custom control that operates as a header for other text controls. It consists basicaally of a single line of digits used as a ruler. I have a mouse 'slider' object which follows the mouse movements horizontally. How can I constrain the cursor position to be 'between' the chacters (Cour...more >>

Converting Region TO path
Posted by jsideburns NO[at]SPAM yahoo.ca at 5/18/2004 6:10:41 AM
Hi all, I want to be able to draw a region's outline in a dotted line. There exists a function (GDI) called FrameRgn which will do it in a solid line, the problem is FrameRgn takes a Brush not a Pen so the only way to dot the line is by giving it a hatchbrush (not good enough for me). There ...more >>

Window Title Bar
Posted by Hosam Arafa at 5/18/2004 3:06:02 AM
hi every body i work with shaped forms using region but i need to over load the title ba Can every body tell me how can i painting on title bar thanks...more >>

Region property and applying it in a control
Posted by M West at 5/16/2004 10:46:26 PM
hello, currently trying to write a custom control that will display an image in true transparent form, e.g. can actually see the background images placed behind the control rather than the background graphic held on the form. Have produced a region which will hold the outline of an image tha...more >>

VB - saving files with encoders
Posted by Mick at 5/16/2004 10:35:57 PM
I'm trying to teach myself the basics of image handling with VB.NET and GDI+ and I'm stuck trying to figure out how to save an image with encoders and encoder parameters. Part of the problem is the MS documentation seems to be really sparse in this area. I found an example through this newsgroup...more >>

Bitmap.MakeTransparent()
Posted by Mark Bellamy at 5/16/2004 7:35:36 PM
According to the docs, the non-parameterized overloaded version of this method says that it makes the "default transparent color transparent". My question is-- what is the "default transparent color" and how might I 'get' or 'set' it? Thanks. ...more >>

Near-opaque Alpha Values Fail to Retain Color on Copy
Posted by BlueMonkMN NO[at]SPAM email.com at 5/16/2004 7:58:32 AM
I posted earlier about a problem with combining alpha values, but I have simplified the problem much more. Take a look at the red value magically changing when I try to make an exact copy of an image with near-opaque alpha values. This must be a GDI+ bug. Is there a work-around or fix? usi...more >>

Make a window "Click-through"
Posted by Martijn Coppoolse at 5/14/2004 11:50:19 PM
Hello everyone, I've got two little apps which are able to create a window that displays something on the desktop, but are not clickable. Instead, when you click on the window, the item 'behind' or 'under' that window gets clicked. I'd like to know how to do this, using VB6, VB.Net, Windo...more >>

Reduce image size
Posted by Eduard Faschang at 5/14/2004 7:01:26 PM
Hallo I have picture with a bis size as 1 MB (digital photos). I am looking for an example to reduce the file size with c#. After reducing I want store the smalll file in a database. Mybe anybody has a exaplme or idea. Thank a lot Edi ...more >>

Transparent Label
Posted by Steve C. Orr [MVP, MCSD] at 5/14/2004 3:13:23 PM
I have a picture box with a picture in it. I place a label control over the picture control, and I set the BackColor property on the label to Transparent. And yet the Label does not show as transparent at runtime or design time. It has the standard ugly gray background. Why? What is the best s...more >>

can't get images out of tiff file
Posted by chris olsen via .NET 247 at 5/14/2004 11:18:47 AM
I have tried everything, but I continue to get an outOfMemoryException that is thrown. I am really new to using GDI+, actually new to vb.net so there is hopefully something very simple that I am doing wrong. Here is the code ==== Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal ...more >>

DrawString line spacing problem
Posted by Yoav Ben-Yosef at 5/14/2004 10:49:54 AM
Hello, I'm displaying some text lines on a form using DrawString, and found out that the spacing between the lines is not constant. Is there a way to space the lines equaly without calling DrawString with new coordinates for each line? TIA ...more >>


DevelopmentNow Blog