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

Filter by week: 1 2 3 4 5

Scrolling question
Posted by Steve Magoon at 12/31/2004 9:16:06 PM
Why doesn't the scrolling function (below) work for the sine wave as it does for the FillEllipse function? Thanks for any help. Please pardon my crosspost to Controls - wasn't sure which forum would be best to post to. Steve public class CustomScrollCtrl : System.Windows.Forms.Scrollabl...more >>


Clipping
Posted by Alexander Adam at 12/31/2004 3:34:24 AM
Hello Group, I am using the GDI and GDI+ Together. Now in my old code I've setup a clipping region for my GDI Canvas, then I draw something with GDI+ on it. Does the clipping region affect the GDI+ as well so that only the required region is drawn or do I have to "reset" the region for the GDI...more >>

Sizing an image
Posted by Tony at 12/31/2004 3:15:15 AM
I have an image object of which I want to perform a high quality resize and create a new Image (don't want to draw it to the screen). I have tried using Image.GetThumbnailImage but the quality of the image returned from this method really sucks. I know there must be a better way to handle t...more >>

Question about Saving image after it has been loaded.
Posted by Ken Varn at 12/30/2004 4:32:23 PM
If I load an image using Image.Load(), and then call Image.Save() to save the image back out with a new filename, will the image be saved in its original format or do I have to explicitly add the ImageFormat argument to Save? -- ----------------------------------- Ken Varn Senior Software ...more >>

Derive class from System.Drawing.Image
Posted by Tong Du at 12/29/2004 8:28:11 AM
If I want to support different format of image, should I derive a class from System.Drawing.Image? But the Image class marks the default constructor as internal. Any ideas? Thanks, Tong...more >>

How to draw on form's title bar?
Posted by Amar Ingole at 12/28/2004 5:27:42 PM
Hi.. Please suggest me some way to draw on title bar and add new Button to title bar. If possible give demo code. Thanx ...more >>

Smooth TIFF B&W Image
Posted by Jorge Carlos Paredes Jimenez at 12/28/2004 12:02:40 PM
Hi everybody I'm working with TIFF B&W images in C#, for best performance I'm using GDI instead of GDI+. I'm using BitBlt and StretchBlt. The problem is that when I "paint" the image with StretchBlt or BitBlt the image is not "Smooth", when I "paint" the image with DrawImage the Image is "...more >>

Twips to Pixels
Posted by Angel at 12/27/2004 10:29:02 AM
I wrote an application in vb6 to save certain items is twips. I would like to convert those items that were saved in a Twips format to Pixels. Is there a function or a way to convert Twips into Pixel? thanks in advance......more >>



Paint message received... but no painting!
Posted by Kevin at 12/26/2004 9:59:02 AM
Hello, I'm writing in C# and have developed a panel control that contains a matrix of pushbuttons. It seems to work fine until you pull a modal dialog over the panel. Then drawing goes berserk and you get garbage, so moving the dialog around causes the display to look very bad. I've trac...more >>

How to determine grayscale image ?
Posted by Andrew at 12/23/2004 4:43:21 PM
Hello. How to determine that a loaded Bitmap is grayscale ? I am loading a grayscale JPEG using System.Drawing.Bitmap.FromFile() and PixelFormat property is Format8bppIndexed. It's strange to me, that there is no something like Format8bppGrayScale in GDI+ (there is only Format16bppGraySc...more >>

Drawing with PointF and SizeF structure
Posted by wansch at 12/22/2004 6:59:05 AM
Hello all, I'm a newbie to programming and my question is: For what is it good to draw with float values in graphic routines since pixels are always integer. Also I have tried the following code and ask myself if this is correct: class F1 : Form { protected override void ...more >>

Filling a panel with a LinearGradientBrush brush
Posted by programmingscoobydoo NO[at]SPAM hotmail.com at 12/22/2004 1:46:51 AM
Hi, I'm not doing this for any particular reason, but was just playing with specialising windows controls. It's driven me mad... I wanted to create a control, derived from System.Windows.Forms.Panel (though, i started with System.Windows.Forms.UserControl) that fills itself with a gradient. ...more >>

How to use GetThumbnailImage without embedded thumbnail?
Posted by George Nevsky at 12/21/2004 6:35:09 PM
I wish to use GetThumbnailImage method of Image object to downsize an image but I don't want to use embedded thumbnail which can be in original image file. I know probably it isn't best in the world way but I like it. It works absolutely fine for my purposes. It is very simple. It works...more >>

Turning A Circle.... How Many Pixels??
Posted by Craig Parsons at 12/21/2004 5:31:05 PM
Folks, I have an image of a circle, which I am trying to straighten out into a flat line. I am essentially wanting to look at the image, and read a straight line from the centre, and then plot this on a graph. Then I want to rotate the image 1 degree and read the next line down, if yo...more >>

GDI - Drawing vertical text
Posted by Bill Henning at 12/21/2004 4:26:30 PM
Hi everyone... does anybody have any sample code for drawing vertical text in C# using Win32 GDI? I need to properly dispose any memory allocated too. I was able to draw horizontal text with this code: IntPtr hFont = font.ToHfont(); IntPtr oldHFont = NativeMethods.SelectObject(hdc, hFont);...more >>

.NET competes with java-script
Posted by #pragma once at 12/21/2004 3:36:20 PM
That's all we are expecting from programs written in the managed code; Though a MVP advised not to say that, because after JIT compilation the code runs in the native! Funny, isn't? That means scripting languages run in the Host code and never in the native? That means scripting languages are po...more >>

DrawString / Ellipsis / word gaps problem
Posted by cae at 12/21/2004 7:02:15 AM
Hi, another very strange behaviour with ellpisis and the DrawString method. If I display the string "This is a string" with no ellipsis, there is a certain gap between words. Let's say 6 pixels between "This" and "is". If the bounding rectangle is smaller and ellipsis appear, the gap between ...more >>

Xerox datastream conversion
Posted by Niraj Ranka at 12/20/2004 7:54:40 PM
Hello, I would like to details regarding the conversion of Jpeg to Xerox datastream (Line Conditioned Data Stream) format. or pdf to Xerox datastream (Line Conditioned Data Stream). Anyone's help will be appreciated Thanx in advance Niraj Ranka ...more >>

Fancy Windows
Posted by carl.manaster NO[at]SPAM gmail.com at 12/20/2004 12:19:45 PM
I'm pretty new to dotnet; sorry if this is a FAQ but I've reviewed usenet and the FAQs I could find without success. I'm drawing fancy windows - funny shapes that resize in odd ways - and have the Region generation down pretty well, but my Region is clipped to the Form's boundary rectangle. ...more >>

DrawString and ellipsis problem
Posted by cae at 12/20/2004 6:24:12 AM
Hi, I come from the MFC world and I can't get the same behaviour I add in my old app with a new dotnet app written in C#. I have a rectangle with a string inside and the user can drag the mouse to shrink the rectangle width. While shrinking, a string "abcd" is progressively displayed as: ...more >>

ListBox
Posted by Brad Shook at 12/17/2004 1:44:29 PM
Does anyone know how to create a list box that has lines for every item. like so: _______________ |______________| |______________| |______________| |______________| Thanks, Brad Shook ...more >>

Drawing a qurater of a doughnut
Posted by AviD at 12/17/2004 11:23:02 AM
I’m trying to draw a quarter of a doughnut using a graphics path. I add two parallel arcs to the path and then close them. When I draw the path I do get the quarter, but there’ a parasite line that connecting the two edges of the inner arc. What will be the way to draw a clean quarter? ...more >>

PictureBox paint problem
Posted by subdueme NO[at]SPAM hotmail.com at 12/17/2004 3:19:49 AM
Hello When i enter or leave a picturebox with the mouse's cursor the pic redraw itself and all the image inside it flashes!!!! Does anybody know how to avoid this problrmm (bug)??? Thanks in advance...more >>

Extracting the propertyitems of a frame in a multipage tiff
Posted by Etan Bukiet at 12/15/2004 3:49:36 PM
Maybe Bob can help me out on this one. I am developing a photo album application and want to use tiff images as a sort of container for images that look the same. Anyhow, I was looking at how GDI+ deals with tiffs and I found out how to paint the image onto another canvas, but not how to a...more >>

make a transparent control
Posted by João Santa Barbara at 12/15/2004 10:35:33 AM
Hi all i'm doing a form that i paint on the event onpaint. And i want to make all controls in that form to become transparent in the way i can see the form background is it possible how ?? thks JSB PS: any sample !!! ...more >>

Print image, scaled to fit
Posted by Becker at 12/14/2004 12:44:42 PM
How can I take an image and print it scaling it to fit on a page? E.g. if the image is bigger than a page, I want it to shrink to fit the page, if it is smaller than a page, I want it to grow to the size of the page? My problem is that I have a picture box with an image in there (I can set i...more >>

AutoCard Mouse Cursor Movement Like
Posted by Sam at 12/14/2004 12:15:53 PM
Hi all Does anyone know how to make the mouse cursor of the picture box jump from one grid point to the next with in the picturebox? Thanks Sam ...more >>

Extract single image from multipage TIFF
Posted by Becker at 12/13/2004 9:56:01 PM
I have a two page TIFF document. I simply want to create an array of image and put the two pages of this multipage tiff in this array for some further processing on seperate "images." The problem is that i can use the image.selectactiveframe to get to the individual page, but everytime i tray...more >>

(Accepted Bug?) How does Graphics.DrawImage use ImageAttributes.SetColorMatrix matrix?
Posted by Robby at 12/13/2004 1:08:37 AM
It seems a little odd to me that the matrix set in ImageAttributes.SetColorMatrix is not being used for matrix multiplication in Graphics.DrawImage on the pixel values. In particular the matrix, Dim mx As ColorMatrix = _ New ColorMatrix(New Single()() _ {New Single() {-1, 0...more >>

GDI+ performance issue
Posted by **ham at 12/12/2004 8:08:36 AM
I know that's an old dirty issue; GDI+ almost -the slowest part of the framework - has bothered many developers using it in animations. Even in managed C++ the performance is awful. Now, any dude out there does know any thing about this issue in VS 2005 + ..NET 2.0 ? Has Microsoft solved this pe...more >>

how do I draw on top of an existing Windows application
Posted by Scott Weinstein at 12/12/2004 1:59:01 AM
I have the need to draw on top of an existing Windows application, and if the window is not maximized I also need to draw outside of the window frame. However, I need the existing Windows application to remain activated. my first attempt at doing this I created a transparent form, maximized i...more >>

Problem converting GIF images
Posted by Erik Read at 12/10/2004 11:05:04 AM
We have a vendor that is providing us with GIF images that we need to convert to another format. The problem is that when I load the image from this vendor into a bitmap object I get an "Invalid Parameter" exception. Any other GIF seems to work fine. These images appear to be GIF87 images if...more >>

transition window to greyscale
Posted by Scott McChesney at 12/10/2004 8:37:39 AM
I'm working on a project where I want to simulate the Windows XP functionality when the user changes their color scheme - the window gradually transitions to grey, and then the new color scheme is displayed. I have basic groups of color schemes in my app, and I'd like to provide a bit more "pop"...more >>

MeasureString - Slighly narrower than actual text.
Posted by Phil Jones at 12/9/2004 5:59:35 PM
When I use the MeasureString method of the [Graphics] object to determine the size that a string will take up when rendered - the method returns a Size that has a width slightly narrower than the actual string. By this I mean that if I paint the string within the returned size bounds it fal...more >>

Creating Transparent Image from Two Bitmaps
Posted by Paul Welter at 12/9/2004 4:23:17 PM
Hi, I need some help in how to get started with creating a transparent image from two bitmaps. The first image is the image to display, the second image is a mask of the first image for the area that should be transparent. How do I combine the two images to form a gif or tiff that has the...more >>

Creating Movable Truly Transparent C# controls
Posted by Dan Noel at 12/9/2004 12:17:03 PM
I am looking for a solution to create a Movable Transparent Panel in C#. I have found several solutions to the Transparent Panel problem that suggest overriding OnPaintBackground and then doing nothing. While this approach works for non-movable panels, such an approach does not work for ...more >>

Is there an event for image change for a PictureBox Control? please help.
Posted by Jose Michael Meo R. Barrido at 12/8/2004 6:14:36 PM
Hi! Can u please tech me a way to know if the image in the picturebox has changed? what event should i catch the chage? ...more >>

problems creating a 16 bit greyscale bitmap
Posted by Norvin Laudon at 12/8/2004 4:51:22 PM
Hi, I am trying to convert some 16 bit greyscale images from their own proprietary image format to bitmap format. I'm creating the bitmaps using PixelFormat.Format16bppGrayScale, but the actual size (in bytes) of the resultant bitmap appears to be twice the size it should be (it seems to be...more >>

Number of characters in textbox line
Posted by Aditi Chimbalkar at 12/7/2004 5:37:12 PM
Hi, I am using richtextbox for an application. I am working with c#. Is there a way to find how many characters can fit in a textbox line? One way that I had thought was - richtextbox1.Size.Width/richtextbox1.Font.Size; But this does not seem to work. Please help me out. Thanks and ...more >>

PrivateFontCollection asp.net Timeout
Posted by igkins at 12/7/2004 12:53:03 PM
Hello, I have an ASP.net project that gets posted to by a flash object. For the past month everything had been working fine, but in the past day, the page refuses to load. I basically through response.write("here") to figure out where it was hanging and it comes doesn to this: Private...more >>

Creating an image from a URL
Posted by Nir at 12/7/2004 5:19:01 AM
Hello , I want to Create an image from a URL. I mean , Convert HTML Page to TiF Or GIF . Someone have any Idea or example. Thanks Nir ...more >>

How to fade away a message box ?
Posted by Fading Away A Message Box ? at 12/7/2004 12:09:01 AM
Hi all, I have searched many times to know how to fade away a message box in visual basic .NET, I would be grateful to you guys if anyone helps me.. ...more >>

Panel width and Hwight in Pixels..
Posted by Ofir at 12/6/2004 5:50:56 PM
Hellow, i am working with vb.net, Is there a function that can give me the panels width and height in pixels?? (such as GetDeviceCaps) Ofir. ...more >>

rotate drawing with matrix
Posted by Peter Proost at 12/6/2004 11:08:49 AM
Hi group, I got the following piece of code which draws a square with stars round it, now I want the stars to rotate round the square, I can do this with the mx.rotate and a timer and an angle, but this rotates the whole drawing of the stars but what I realy want is for the stars to rotate r...more >>

Straightening Out A Circle?
Posted by Craig Parsons at 12/6/2004 6:53:22 AM
Folks, I have a scanned image which is circular, and contains a trace in the middle of it (for those of you familar with trucks it is a tachograph chart!). I want to "flatten" it out, into a straight line. I can't seem to find any controls which might be able to do this for me. ...more >>

setresolution and text
Posted by igkins at 12/5/2004 12:19:04 PM
Hello, I have the following code: image = createImage(sType) image.SetResolution(300, 300) g = Graphics.FromImage(image) textFont = New Font(fontFace, 8.0F, FontStyle.Bold) g.DrawString(sText, textFont, New SolidBrush(fontColor), _ New RectangleF(outRect.X, out...more >>

get Hdc of screen
Posted by ClassicHaHa at 12/4/2004 5:15:04 AM
How can I get the Hdc of screen in VB.net or C#? It seems to be strange in VB.net!! I know in VB6,I can use getdc api to get Hdc of screen,but in Vb.net no such a function. even under the graphics class the getHdc() is invisible to the programmers. Any ideas? Thanks in advance!!! -- WH...more >>

Tiff conversion - little endian to big endian
Posted by David A. Coursey at 12/3/2004 12:25:09 PM
I am writing a small app to convert Group4 tiffs to Group3. I also need them to be big endian for my system to accept it properly. I have gotten everything to work except for the byte order. I have searched every newsgroup I could find and nobody seems to be converting from little to big ...more >>

Property Grid
Posted by Patrick at 12/3/2004 3:05:03 AM
Dear Ng, If I click on a control at runtime, i want to show the properties of the control in a property grid. But not all, just a few, which are interesting for the user, like background color, etc... How can I do that? I don't want to overload the user with properties he will never use and...more >>

Control Paint class
Posted by Patrick at 12/3/2004 3:03:04 AM
Dear Ng, I still have my Control Selection and Resizing problem in my "visual studio like" form designer. The user should be able to add and move around controls at runtime. When he clicks on it, he should see the the selection frame and the grab handles to resize the control. Can anybody h...more >>


DevelopmentNow Blog