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

Filter by week: 1 2 3 4 5

Splitter Bar with graphics
Posted by Chris Y at 8/31/2005 12:00:00 AM
I have two graphics areas linked by a splitter control. The splitter uses the Dock property to specify the linking relationship. However, I find that whenever I Dock Left, the graphics area loses the vertical scroll bar. If I Dock top, the horizontal scroll bar is gone. Do you all get the sam...more >>


DirectX and C# - how to improve animation?
Posted by KM at 8/31/2005 12:00:00 AM
I already posted it to microsoft.public.win32.programmer.directx.managed, but there was no response, maybe here any one will know, thanks in advence. I'm trying to make a simple animation - white lanes on black screen are moving from left to right. I've tried to do this using GDI+ but even ...more >>

Saving a EMF file as Bitmap.
Posted by DotNetBBK at 8/30/2005 2:13:04 PM
Hi, I am following Charles Pretzold's book, " Programming Microsoft Windows with C#", to create a EMF file and save the contents of this file as Bitmap. EMF file is being created, as I want . But Bitmap file is always a Black screen. What am I doing wrong ? Here is the code:- private ...more >>

Brush for non-named color??
Posted by Optikal at 8/30/2005 12:42:02 PM
How do I create a Drawing.Brush for a non-named color? The Color class has a FromArgb() function I can use, is there anything similar I can use to create a Brush?...more >>

Getting pixel information about each pixel in an image...
Posted by Johnny Granberg at 8/30/2005 2:11:06 AM
Hi there, im trying to read an image pixel by pixel and save the information to a file for later use in another image... the images i want to read are quite big so i need it as fast as possible, ive read at http://www.bobpowell.net/lockingbits.htm and this seems fast but i cant really fig...more >>

sharpen algorithm
Posted by jthomas at 8/29/2005 4:34:01 PM
Hi, My application receives faxed images (TIFFs), uses the MODI tool to OCR the TIFF, searches the text for various values and publishes the text to an html page. Problems occur when the OCR function doesn't capture the correct text. I imagine I would see better performance if I could sha...more >>

rectangle contains
Posted by Rob T at 8/29/2005 4:05:28 PM
Hi. I have a program that creates an image and displays it to the screen....pretty simple. I put it into a matrix so that I can rotate it. I would also like to be able to know when I click on it so I am doing a rectangle.contains. This works fine if the image isn't rotated. But if it ...more >>

FreeImage reference does not want to load
Posted by Alex at 8/29/2005 1:47:52 PM
I am trying to start with FreeImage project, which has a C# library. When I try to add FreeImage.dll as a reference inside the Visual C# Express I get an error saying that FreeImage.dll is not accessible, please make sure that it is valid COM or assembly. Please help. What am I missing? Tha...more >>



How to make 16bpp/24bpp/8bppindexed PNG file in GDI+? why it's always 32bpp?
Posted by dosxp at 8/29/2005 3:57:44 AM
hi everyone. i want to make a png file which is 16bpp/24bpp/8bppindexed in vs.net2003 i always got 32bpp file! why? it seems that GDI+ do not support any encoder for PNG. who can tell me how to make 16/24/8index png file? i need my file to be smaller. i know people can use libpng.dll in...more >>

Drawing custom progress bar and threading
Posted by Adrian at 8/28/2005 12:00:00 AM
Hi, I'm building a custom progress bar which uses graphic object with bitmap buffering, rectangle, solidbrush, etc. Everything seems to work fine, except that when the progress bar control is used in a real application, it slows down the whole process. Should I use a new, seperate thread 'wi...more >>

DrawImage Bug in .NET 2.0 ?
Posted by cody at 8/27/2005 11:23:45 PM
Hi Iam using ownerdraw in a Panel. Iam scaling an image so that it should fill the whole width of the control but the funny thing is, it doens't. Instead it blends from left to the right into the background of the control (seem like alpha is decreasing from left to the right). The proble...more >>

Animation effects in VB.Net forms!
Posted by mf_sina at 8/27/2005 12:57:24 AM
Hi! is it possible to give some animation effects in VB.Net forms? because .Net environment is naturally almost boring so animation will help to keep users diverted to my app. the effects such as dropping form from top of screen or folding or unfolding a form , covering and uncovering a for...more >>

how to animate colors of texture and slowly drawing lines
Posted by Jack at 8/27/2005 12:00:00 AM
Hi, If I were to do this on a VB.NET form ----------------------------------> the '-' is a solid line and > is the linecap. If I wanted to draw this line in incremental small steps (in slow transitions) pixel by pixel, from left to the right, and also animate its texture's colors, how to ...more >>

Progressbar when loading imagefile
Posted by Johnny Granberg at 8/26/2005 8:21:04 AM
im trying to figure out how to make a progressbar when loading images.... im using the following code to open the file: Dim bmpInputStream As IO.Stream Dim bmpSourceBitmap As Bitmap bmpInputStream = File.OpenRead(InputFilenames(SourceImageNumber)) bmpSourceBitmap = DirectCast(Image.FromS...more >>

Lasso Selection
Posted by susie_richie_30 NO[at]SPAM yahoo.com.au at 8/26/2005 4:09:14 AM
Hi, I am trying to implement Lasso selection, similar to one available in the Windows Explorer. I have a extended a Panel and set the style and back color : public class TransparentPanel : System.Windows.Forms.Panel public TransparentPanel() { this.SetStyle(ControlStyles.SupportsTransp...more >>

transparent colour
Posted by Steve Bugden at 8/26/2005 1:37:03 AM
Hi, I am trying to create an image with a transparent colour. I have created a function (please see below) which creates a white image with some green text. I would like to make white the transparent colour. If I comment out the MakeTransparent line, the function works in the sense that...more >>

CDC::TextOut not working in print mode of managed code.
Posted by DotNetBBK at 8/25/2005 8:49:30 PM
Hi, I am drawing an image in MFC, which has texts in it and the texts are getting drawn using CDC::TextOut and I can see text on the screen. But, when I try to print it using C# code, it prints all other things (lines,rectangles etc..), but text . Do I have to use some other function to ...more >>

SystemPens, SystemBrushes, and FromSystemColor()
Posted by Scott McChesney at 8/25/2005 11:40:45 AM
Folks - I have a rather odd question. I call it odd because I can't believe it's not spelled out in the MSDN docs. Or maybe it is, and I just missed it... In looking over the SystemPens.FromSystemColor() and SystemBrushes.FromSystemColor() functions, it struck me that there's no ment...more >>

how to develop a control similar to task manager performance chart
Posted by Bidarkota at 8/25/2005 11:00:04 AM
I need a control similar to Task Manager Performance chart in C#. I appreciate if anyone can help me in this regard. Thank you...more >>

Change EMF background
Posted by Paul Cheetham at 8/25/2005 12:00:00 AM
Hi, I want to change the background colour of an EMF file from within my project (VB.Net) The colour is currently set to white, and I want to change it to Transparent. I am having a lot of trouble finding any relevant information on the web, including the specs for the file format. Can...more >>

Multiple font rendering (diffrenet sized fonts on the same line)
Posted by shit.faced NO[at]SPAM optusnet.com.au at 8/24/2005 2:27:43 AM
G'Day, I am writting an peice of code to render rtf encoded text using GDI+. I have been able to do all the difficult stuff (parse the rtf ect.) Now the easy parts driving me insane and I'd love some help from a Graphics.DrawString(...) enthuiest. Basicly when making sequential DrawStri...more >>

OutOfMemoryException
Posted by Extreme Datasets at 8/23/2005 9:28:02 PM
Hello All, I have an application that adds pictureboxes at runtime. When I set the Image property I get a OutOfMemoryException. The images are only about 40kb each and it craps out on about the 4th one. Code Example: For I As Integer = 0 To 10 Dim PB As New Picturebox With PB ...more >>

Rotate ellipse around center
Posted by Dan at 8/23/2005 8:10:03 PM
I have the following code in C#. This does not rotate the ellipse around center. Could someone help me out here? I want to keep the center of rotation. Thanks in advance - Dan grfx.DrawEllipse(pen,50,25,384,576); Matrix X = new Matrix(); // create point of center of elli...more >>

GetHardMargins fails in .Net 2.0
Posted by Paul Diterwich at 8/23/2005 3:53:04 PM
In Framework version 1.1 this work but in the .Net 2.0 framework GetDeviceCaps returns no values (see below for a code example). For my program I need to get the margins before actually printing that is why I'm using the PrinterSettings instead of the PrintPageEventArg graphics object. A...more >>

"Draw" RichText on a graphics ???
Posted by bboldi at 8/23/2005 1:20:35 PM
I need to draw a RichText on a draphics object. The simpliest method would be copying content of a RichTextBox control. I can do this with BitBlt from win32 api if the richtextbox is visible, but in my case the richtextbox is only created in memory, but not showen on any control? Can anyone help...more >>

DrawString rounded
Posted by Faze at 8/23/2005 4:09:48 AM
Hi, I develop a little control that daraws a string, using System.Graphics methods. Here is a simple image that will be usefull for my question. <img src="http://faze.altervista.org/temp/texts.png"> Using GraphicsPath and a little blur (with drawing a resized image), I draw the first text (the ...more >>

Extract the color from the position under the mouse
Posted by Rithesh Pai at 8/23/2005 12:00:00 AM
Hi All, I tried to extract the color from the position under the mouse on bitmap backbuffer via GetPixel.Even though the color is red, when I compare it with red,the if statement does not get executed.Why is it so??? Color colorval=backbuffer.GetPixel(e.X,e.Y); if(colorval.R.Equals(C...more >>

Reduce image file size without losing visible quality
Posted by Landley at 8/22/2005 8:47:54 PM
Hi All, I am trying to reduce the file size of an image set at 320px by 240px. I reduced it by changing the pixelformat (see below). Is there any other way of making further reductions without changing the resolution? Private Function GetReducedImage(ByRef image As Bitmap) As Bitmap ...more >>

Using Anti--Aliasing for an image drawn in MFC
Posted by DotNetBBK at 8/22/2005 7:43:01 PM
Hi, I have an image, which is drawn in MFC and has lines drawn in other than the standard angles, but we can't implement Anti-Aliasing in MFC, as it makes drawing slow. But, I want to apply anti-aliasing in the print mode and I am printing this using C# code. So, I assumed that if I pass t...more >>

Getting PrintDocument to Override Default Color Setting
Posted by Phil Galey at 8/22/2005 11:03:26 AM
I'm developing in VB.NET on Windows 2000 and printing to a DeskJet 5550 = printer using the PrintDocument object. Why does the command: PrintDocument1.PrinterSettings.DefaultPageSettings.Color =3D False ....act like a dummy switch? I'm trying to override the Windows default = setting o...more >>

SaveImage with reduced memory consumption
Posted by Wolfgang at 8/22/2005 12:00:00 AM
Dear all, I've a great image (DIN A4 600dpi) drawn with GDI+. I want to save the image with a minimum of memory usage. Unfortunately it seem that dotNet first makes a Bitmap and then does everything else. The following command require a peak memory usage of approx. 300MB: IWSimage->Sa...more >>

Bug exists in method Region.IsVisible(Rectangle)?
Posted by Bill White at 8/22/2005 12:00:00 AM
I use the method Region.IsVisible(Rectangle) to check the overlaps among = rectangles. The Codes list as following. Private mGraphs As ArrayList =3D New ArrayList Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As = System.EventArgs) Handles MyBase.Load mGraphs.C...more >>

RenderProgressive and ScanMethodInterlaced Image Save Questions
Posted by Justin at 8/21/2005 7:35:28 PM
Hi, I am trying to write an application that does some image processing and would like to give the user various options on how the image should be saved (different options for different file types: primarily JPEG and PNG for the two compression parameters mentioned). I have a two part question a...more >>

how to zoom
Posted by dotnetlearner at 8/20/2005 8:09:02 AM
can anyone plz tell me how to zoom a part of curve selected by mouse...more >>

Setting the size of a controls nc area
Posted by MariusI at 8/19/2005 1:16:10 AM
I'm creating a custom container control and i want to specify the size of the control's non-client area. I've done nc painting earlier using interop so i am familiar with techniques for painting into the nc area, but i've never found anything on how to set the actual size of the caption....more >>

Updating Metafile problems
Posted by Paul Cheetham at 8/19/2005 12:00:00 AM
Hi, I have a System.Drawing.Image component, in which I have an image in Enhanced Metafile Format (EMF) I would like to do the following: - Change the background of the image to Transparent (it is currently white) - Write a Time stamp in one corner of the image. I have been trying to wo...more >>

Accessing individual pages in TIFF file
Posted by landers at 8/18/2005 10:56:35 PM
Hello All, I have created a multi-paged TIFF image using the Image.SaveAdd method. 1. Is there a nice way of retrieving the individual pages into separate images? 2. Is there a way of knowing how many pages there are? Landers ...more >>

Is there a PI factor between MFC and Manged code ?
Posted by DotNetBBK at 8/18/2005 7:10:03 PM
Hi, I have an image, which has a size more than the A4 paper, so I want to take a snapshot of this picture in slices and print. The drawing code is in MFC and the printing is being done using C#. I ran into the problem, where the picture size was coming too small, when printing. I investiga...more >>

DragDrop question
Posted by Dave Spencer at 8/18/2005 3:05:40 PM
Hi all, I have an app where the user can drag an object back and forth between a panel and a ListView. So the panel and the listview are both targets and sources for the same object type. I also allow the user to drag an object from one point in the panel to another. This all seems to wo...more >>

How to write array of bitmaps to hard disk
Posted by Rithesh Pai at 8/18/2005 11:21:21 AM
Hi all, I am converting avi files to series of bitmaps to enhance them.How do I write this series into harddisk. Also,one more issue that creeps in is if I write these to hard disk,accessing them again in a sequence will also take up a lot of resources. Is there any way out??? rega...more >>

Inverting or flipping a GraphicsPath
Posted by brianbender77 NO[at]SPAM hotmail.com at 8/18/2005 9:19:15 AM
I have a GraphicsPath object filled with AddArc() and AddLine() methods. What I am attempting to do is actually draw this path and then flip it and draw it again to give me symetrical images to reduce code. I have looked at the Matrix object but can only seem to rotate it, which is not what I ...more >>

Can parts of an Image object be transparent?
Posted by **Developer** at 8/18/2005 7:44:04 AM
If I have an Image, say image1" that I'm going to draw on a PictureBox's Image or set the PictureBox.Image to it. Can I make part of the image1 transparent without doing anything to the PictureBox? That is, can either or both of the following: obj1.SetStyle(ControlStyles.Support...more >>

Scan for files in hard disk drive
Posted by Rithesh Pai at 8/18/2005 12:00:00 AM
Hi all, I need to scan the hard disk drive/CD and search and retreive the files of likes jpeg,gif etc.Is it possible? regards Rithesh ...more >>

Process cannot access file "file_name" because it is being used by another process
Posted by Rithesh Pai at 8/18/2005 12:00:00 AM
Hi all, When I read from an AVI stream and write a bitmap for the second frame,I get this error Process cannot access file "file_name" because it is being used by another process Is there anyway to overcome this.I also tried 'using' statement but to no avail. ...more >>

Play AVIs
Posted by Tavarua2K at 8/17/2005 1:27:19 PM
How can i play AVIs without using the Windows Media Player class in VB.NET? Please!! ...more >>

Uniting two bitmaps
Posted by Victor at 8/17/2005 1:25:53 PM
Hi everybody, I have two small bitmaps on the UI surface that have a common vertical border and the same height. I would like to combine them in one bitmap object that should depict the both in the position how they are. Is it somehow possible? Victor ...more >>

Is this the right way to do scrolling?
Posted by John Smith at 8/17/2005 12:00:00 AM
I have a myPanel class which is a simple inheritance of System.Windows.Forms.Panel on which I draw my graphics. As discussed in a previous thread, this is to get double-buffering to work. Even though myPanel is a control, scrolling doesn't seem to work even when its .Width and .Height are ...more >>

code to read file from CD
Posted by Rithesh Pai at 8/17/2005 12:00:00 AM
Hi all, Is there any way to read files from a CD with C#. Thanks in advance. regards Rithesh ...more >>

Inside PictureBox questions
Posted by **Developer** at 8/16/2005 10:04:54 AM
I'm going to build a test project to try to develop an understanding but a little prior insight would help. A PictureBox has a Background Image, a Background color and an Image. Also I can use a graphic object to draw in it. How do these relate? The Background color and Background Imag...more >>

How to activate OnPaint event?
Posted by John Smith at 8/16/2005 12:00:00 AM
I have a question more on C# program flow and structure rather than System.Drawing per se. I have a panel1 on which I put my graphics. panel1_Paint calls DrawGraphics(e.Graphics) where e is the PaintEventArgs passed from somewhere I don't know where (it's in the formal parameter list of th...more >>


DevelopmentNow Blog