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 > august 2006

Filter by week: 1 2 3 4 5

Bob Powell... you earnd that :)
Posted by SharpCoderMP at 8/31/2006 2:21:29 PM
just to let you know, i really appreciate your work here. you helped me a lot with my System.Drawing based work, so i've decided to place your name in credits part of the app i'm just about to release. keep up the great work Bob :)...more >>


Using LogFont Class in C#
Posted by balu at 8/31/2006 2:52:27 AM
When i try to use the below code which i copied from msdn, i am getting the error like "No PInvoke conversion exists for value passed to Object-typed parameter." LogFont logf = new Microsoft.WindowsCE.Forms.LogFont(); // Create graphics object for the form, and obtain...more >>

Tif problem?
Posted by Chris Ashley at 8/31/2006 1:08:40 AM
I need to do some manipulation of Tif images, however I'm encountering problems with multi-page Tif files. If there are three or less pages in the Tif, everything seems to work fine. However once the Tif goes above this I get a 'System.OutOfMemoryException: Out of memory.' - this is strange be...more >>

Angular Coordiantes
Posted by ajjones at 8/30/2006 2:11:13 PM
Can someone please explain angular coordinates?? ...more >>

ScaleTransform
Posted by Mehdi at 8/30/2006 1:39:02 PM
Hi, I have been trying to achieve a zooming effect. ScaleTransform seemed to be the obvious choice. But what I need is a zooming from the center of the screen in all directions, and scaletransform scales it from the (0,0) point to the right and bottom only. I have tried using combinations of...more >>

DrawString problem
Posted by Fabio at 8/30/2006 12:22:55 PM
Hi all! I have a problem with the DrawString method. I wrote this little code that reproduce the problem: private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; StringFormatFlags flags = StringFormatFlags.MeasureTrailingSpaces; Rectangle...more >>

Scaling graphics components
Posted by Saso at 8/30/2006 1:10:01 AM
Hello! Is it possible to scale graphics components, such are line, rectangles etc, when on paint event occurs? I want to scale the line that was drawn with scale factor 1, so the result of scaling should be the grained line. Regards Saso...more >>

Scaling (zooming) problem
Posted by Vinko at 8/29/2006 10:04:53 PM
Hello! I've created an image of 5x5 pixels size and put red diagonal line from point 0,0 to point 5,5. I want to zoom that image for any scale factor (in attached example 15x). Interpolation mode is set to NearestNeighbor. Why entirely image is not scaled properly, first pixel and last pi...more >>



How can I draw faster than .NET graphics?
Posted by ThunderMusic at 8/25/2006 8:49:47 AM
Hi, I want to take 2 images and fade them from one to the other... I want to do it full screen (for a screen saver)... Using the .NET graphics, I got a 3 FPS for what I want to do on a P4 3Ghz... Is there a way I can draw faster? I mean, there must be a way I'm drawing the images 3 times : ...more >>

how to save grayscale image?
Posted by SharpCoderMP at 8/23/2006 7:00:49 PM
hi, how can i save a grayscale (8bit) image? i tried using System.Drawing.Imaging.Encoder.ColorDepth but when i try to save jpeg wither using 8 or 1bit i always get 24bit one. when i try to save tiff i get an exception when i try 8 or 1bit. what's going on?? here's code example: using (B...more >>

Finding out if output is to a print preview window
Posted by Ron Allen at 8/23/2006 4:52:01 PM
In the release version 2.0 how do I find from inside and OnPrintPage event handler if the output is going to a preview controller? Before 2.0 you could check the page size before compensating for printer hard margins now that has changed. On the pre-release there was supposed to be a way...more >>

Mouse move disable.
Posted by shulya at 8/23/2006 3:58:19 AM
Hello , I am looking for a way to disable the mouse (in a c# application) for a measured time. I would appriciate any advice. Thanks Shulya ...more >>

using CMYK colors - is it possible?
Posted by SharpCoderMP at 8/23/2006 12:00:00 AM
hi, is it possible to use CMYK colors instead of RGB when drawing to the printer? if so, how can it be done? standard Color struct allows only ARGB colors. I need to draw something that is in pure CMYK Black color (C0:M0:Y0:K100) and i have no idea how can i do that....more >>

SetPixel() / GetPixel() for Format64bppArgb in VB using LockBits
Posted by pamela fluente at 8/22/2006 2:45:12 AM
Hi dears, I need an exact replacement of SetPixel() and GetPixel() functions (VB.NET), only for the specific format PixelFormat.Format64bppArgb, using LockBits. I have already browsed Bob's site, but I am too unfamiliar with this stuff to attempt to produce myself these 2 functions. I n...more >>

Creating a visual object
Posted by Ant at 8/21/2006 11:22:01 PM
Hi, I don't know if this is the right thread. I'm actually working on a simple graph tool seeing as though .NET doesn't come with one. I have a control which I want to add bar objects to. I need the bar objects to have certain properties like height, width, colour etc. Sounds like a rectang...more >>

GDI+ very slow
Posted by Scott at 8/21/2006 10:59:01 AM
We have a program that uses GDI+ with .NET 2.0. All rendering is being done by the CPU and not by the graphics card. What is going on here? Do graphics cards not support GDI+? Which graphics cards do support it? Thank you, Scott ...more >>

Mouse wheel
Posted by shulya at 8/21/2006 8:46:49 AM
hello everyone, I am writing a GIS application, in which I move between the zoom layers using the mouse wheel. When the user uses the mouse wheel in order to zoom in for example (mouse wheel up. I would appriciate if someone told me how can I know when the mouse had completed one round exact...more >>

Image from AVI
Posted by Andrew Robinson at 8/18/2006 4:01:55 PM
Any way to extract a single frame "preview" or thumbnail from an AVI file. I would love to use GDI+ and avoid 3rd party utilities. I will be saving this as a JPG or GIF. Thanks for any pointers. -- Andrew Robinson ...more >>

Fill circle to look like sphere
Posted by tommaso.gastaldi NO[at]SPAM uniroma1.it at 8/18/2006 12:01:31 PM
Hi friends. I wanted to gradient-fill a circle in such a way it "looks like" a 3D ball. Does anyone has a convincing example of that? tommaso ...more >>

Question on Cursors
Posted by bern11 at 8/17/2006 11:56:46 PM
How do you embed a cursor in a project and create it? I created a cursor in a project, I can use it using the Cursor(String) constructor, but I cannot get it to work with the Cursor(Type,String) constructor. I'm missing something really simple. The resource view has an ID assigned to it, d...more >>

Slow For-Loop (Picture Data Access)
Posted by hufaunder NO[at]SPAM yahoo.com at 8/17/2006 3:54:00 PM
I have 16-bit data that I want to display. In order to display it I compress a certain range of the input data into 8 bit (I need control over this). All seems to work ok except that it is dead slow both in release and debug mode. The main problem is the for-loop shown in the code bellow. Withou...more >>

applying ImageAttributes and resizing a bitmap makes it unusable
Posted by Graham at 8/17/2006 2:52:58 AM
I'm applying an ImageAttribtues object with a color matrix (to set the alpha channel) to a bitmap. The resulting file is viewable in mspaint, etc., but it doesn't seem to be a universally "usable" bitmap: I can't use it for a desktop background, for example, presumably because the ImageFlagsHasT...more >>

DrawImage, transparency and antialias
Posted by Fabio at 8/16/2006 4:28:29 PM
Hi all! When I draw a stretched image with DrawImage, it is drawn with a big antialias (it is not jut resized). Is there a way to regulate this antialias? And can I draw it with a rensparency? Thanks! -- Free .Net Reporting Tool - http://www.neodatatype.net ...more >>

Reuse of Bitmap objects to reduce garbage collection performance hit?
Posted by mprocopio NO[at]SPAM gmail.com at 8/16/2006 10:34:05 AM
..NET Drawing Colleagues, I have the following scenario. I have a large number of JPEG images on my hard drive. These are basically frames from a video. They can be converted to BMP if necessary. The general idea is to display these inside a PictureBox very rapidly simulating video, at up to a...more >>

imagecodecinfo not being assigned
Posted by Abraham Andres Luna at 8/16/2006 10:01:04 AM
hello everyone, i am attempting to open a raw image, and produce 3 resized/optimized images. the code below is mostly from the sdk documentation, however it does not work: Bitmap bmpRA = new Bitmap(strIMG); //raw image Bitmap bmpLA = new Bitmap(bmpRA, 300, 225); Bitmap bmpME = new Bitmap...more >>

Why's it take so long?
Posted by Michael C at 8/15/2006 12:00:00 AM
I can draw a 100x100 section of say a 150x150 bitmap onto a form or control very quickly (it takes 70ms to do this 100 times). If that bitmap is say 2000x2000 then it takes 3500ms to draw it 100 times. Why is there such a difference? I'm still only drawing a 100x100 section from each bitmap so...more >>

The control appereance in a Graphics or Bitmap object.
Posted by Hamed at 8/14/2006 11:49:32 PM
Have I posted the message to wrong newsgroup? Or Does the question is so much strage? Would someone please kindly direct me to a true newsgroup or resource? Best Regards Hamed "Hamed" <hamed@raymehr.com> wrote in message news:u0zFFR7vGHA.4880@TK2MSFTNGP04.phx.gbl... >> Is it pos...more >>

Currentx, Currenty
Posted by James Parsly at 8/14/2006 1:19:02 PM
In VB6, there were currentx and currenty properties that you could use to find out your location after printing some text or drawing a line. Does vb.net have similar properties? ...more >>

Rectangle Width property returns wrong value
Posted by MariusI at 8/13/2006 11:57:01 PM
If you look in the documentation for the rectangle.Right property, it states that the value is the sum of the rectangle.X and the rectangle.Width property. This does not add up in my book. Consider the following: A rectangle which starts at pixel 0 and ends at pixel 0. As I see it, this rec...more >>

Hi, PrivateFontCollection and IsStyleAvailable problems.
Posted by skyover NO[at]SPAM gmail.com at 8/13/2006 3:56:46 AM
Hi, I've just got a problem about using custom ttf font file. below is the code: string path = "~/TT3028M_.TTF"; PrivateFontCollection pfc = new PrivateFontCollection(); pfc.AddFontFile(path); FontFamily ff = pfc.Families[0]; if (...more >>

output stream size in system.drawing.imaging
Posted by Bill Palmer at 8/11/2006 7:07:35 PM
using asp.net on windows 2003 Is there any way to get the final size of an image i have resized using system.drawing.imaging? This is partly to be able to set Response.AddHeader "Content-Length" so the browser knows how long he'll have to wait, and partly to be able to measure any particula...more >>

Display device list
Posted by ThunderMusic at 8/11/2006 3:16:21 PM
Hi, I want to have a list of the display devices available on the computer, just like the Settings tab do in the desktop properties... What I need is the DeviceID, it's rectangle(left, top, width, height) and if it's active or not. Is there a built-in function to get these informations in ...more >>

Drawing a string that can resize with the control
Posted by ThunderMusic at 8/11/2006 1:26:08 PM
Hi, I'm trying to make a control paints itself. I can do everything I want except for the device number(string containing only 1 digit). I would like the number to be resized when the control resizes... Right now I use the e.Graphics.DrawString(string, Font, RectangleF, StringFormat), but th...more >>

Avoiding Gdi32 call to StartPage / EndPage
Posted by sebastiantjfisher NO[at]SPAM gmail.com at 8/10/2006 5:39:56 PM
Hi, I'm trying to use the PrintDocument & PrintController objects to print a file. As part of the process of printing this particular document type, I pass the hDC (device context handle) and let a third party external API render the document to the hDC. The issue here is that this third pa...more >>

ContextMenuStrip throws out of memory exception
Posted by kiranreddyd NO[at]SPAM gmail.com at 8/8/2006 9:51:20 PM
Hi, I am using .Net framework 2.0. I am displaying a context menu of type System.Windows.Forms.ContextMenuStrip. When it is being shown (event: Opening), I am adding the items (with images) to the menu if it is not done already. Based on some criteria I am disabling and enabling menu item...more >>

How to get Transparent ForeColor
Posted by vikash NO[at]SPAM nagarro.com at 8/8/2006 12:24:09 AM
Hi, I was in the process of designing a windows user control, in which i would like the user to see the Text with the Transparent Effect. For this, i was trying to set the Alpha property of the ForeColor to some value (0 to 255). But it does not seems to have any effect on showing the...more >>

about font creation
Posted by Ravindra at 8/3/2006 5:26:56 PM
Hi all, i need to create font creation tool.Like fonts must be created in an editor.Can any one help in this how to start. -- Regards, Ravindra P.N ...more >>

DrawLine method of graphics throws "Object reference not set to an instance of an object" but error is not consistent
Posted by Mathivanan at 8/2/2006 6:58:50 PM
Hi, we are using a web application which sending a bitmap from server. we are facing a problem in a page which throws the error "Object reference not set to an instance of an object". but this error is not consistent. when we make call to this page from the browser more than twice then it thr...more >>

Object reference not set to instance
Posted by satyasyam at 8/2/2006 6:37:55 PM
I am getting a following exception for the below line of code (in red = color). I am wondering how it is possible. Exception: System.NullReferenceException: Object reference not set to an = instance of an object if (strokePen !=3D null && objGraphics !=3D null){ if (float.Parse(style["x1"])...more >>

Scale transforms, again
Posted by James Parsly at 8/2/2006 10:45:35 AM
Here is an example of drawing a simple sine curve plot using VB 6 code. The code for the rotated label is pretty ugly, but it works (I've been doing it in a similar fashion all the way back to GWBASIC). I'm sure that part will be a lot simpler in .net. What I'd like to see is VB.NET code tha...more >>

Out of Memory on server - fine on my machine
Posted by mark NO[at]SPAM fabcomedy.net at 8/2/2006 8:40:45 AM
I've seen a lot of discussion about this on all sorts of websites but not actually found a definitive answer. I have written a relatively simple 'photo library' application using ASP.NET / VB.NET - if the user attaches a large photo the system should automatically reduce the size of the photo do...more >>

Gdi+ error writting bitmap images
Posted by amit at 8/2/2006 12:49:10 AM
am getting following error when I click ok. I have got this error while writting images in windows application.I am using visual studio 2005 I tried to get the exact error by putting my code in try catch block, and then the first error displayed is Parameter is not valid A g...more >>

I want to learn 3D (not DirectX or OpenGL)
Posted by Kürþat at 8/1/2006 12:56:09 PM
Hi, Sometimes I need to draw some 3D objects on windows forms. DirectX and OpenGL are great but, you know, not correct solution for simple cases like one I want to implement. Some other drawing libraries are available but I also want to know how to draw 3D objects. So I need some primitive ...more >>

Those transforms!
Posted by Steve Marshall at 8/1/2006 12:15:49 AM
Hi All, I'm wrestling with graphics transforms - trying to draw a graph into a rectangle within an image object. I can get it to work pretty much, until I start trying to scale and translate it according to the range of the data (which seems to be the "right" thing to do). What's really not...more >>


DevelopmentNow Blog