all groups > dotnet drawing api > february 2006
Filter by week: 1 2 3 4
GetHBitmap and FromHBitmap
Posted by tedunni NO[at]SPAM gmail.com at 2/28/2006 12:31:03 PM
I have the scenario below where I have a New Bitmap object and another
bitmap that points to this object. Later on, I need to supply a GDI
handle to a C routine. I get the GDI handle using GHBitmap, and then
to get the Image back I call FromHBitmap. However, when I call
FromHBitmap, I then br... more >>
Combining/Appending GDI+ EMF+ Files
Posted by george NO[at]SPAM neosoft.com at 2/28/2006 10:20:34 AM
What would likely be the simplest way to append one EMF+ file to
another please?
A code example would be wonderful, too, please.
Thanks in advance. I did a google search and came up with nothing.
... more >>
LinearGradientBrush - get color at point
Posted by Reda at 2/28/2006 12:00:00 AM
Hi,
I used a LinearGradientBrush to fill a rectangle. This way I created
'legend' in my chart control.
Now I need to get color for specified point (value). I thought that I could
somehow get it using LinearGradientBrush, but it seems that I was wrong ;(
Alternatively I would have to create my... more >>
PrintToFile
Posted by Samuel Shulman at 2/27/2006 10:58:55 PM
Hi
I set this property of the print dialog to True but the program still sent
the document to the printer but not to a file (although it did create the
file the was empty)
Any suggestions?
Samuel Shulman
... more >>
Printing Problem
Posted by Samuel Shulman at 2/27/2006 6:57:14 PM
Hi
How can I give printing options from the PrintPreview dialog so the user
will be able to select the pages to print
Currently when the user clicks on the print button in the toolbar the
document is sent immediately to the printer
Thank you,
Samuel Shulman
... more >>
draw on the top og an window
Posted by gusse.net at 2/27/2006 1:43:46 PM
how can i access/draw at the top of a window where the window title is in c#
--
--- [ gusse ] ---
www.gusse.net
... more >>
autoscrolling in .net
Posted by AVL at 2/27/2006 3:41:26 AM
Hi,
I've a requirement in which I need to implement autoscrolling....
Is there any control in .net which supports this functionality/............
My display list(data) should be scrolling .............. more >>
Finding specific point in region - how to?
Posted by marcin.rzeznicki NO[at]SPAM gmail.com at 2/25/2006 8:42:59 AM
Hello,
I am in need to find specific point in region. To be exact:
Suppose, we have region like the one below
__________
| _____|
| |
| |
_____* <- this is the point (*) I am looking for, if one thought of
region as a block of lines and attached to each line bounding... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
FillPath question
Posted by Steve Marshall at 2/23/2006 8:52:15 PM
Hi All,
I'm using Graphics.FillPath to clear the area under a plotted curve. It
works fine, but the fill operation seems to "eat away" some of the thickness
of the plotted line - maybe one pixel. Has anyone else observed this? Is
there a way to stop it happening?
Thanks
... more >>
Zooming
Posted by JB at 2/23/2006 8:06:27 PM
I have a form that contains multiple shapes on it.
Does anyone know how to zoom in and out of the form, while still retaining
all aspect ratios and so on? Is it a matter of me having to loop through all
objects and manually changing the size or is there a better way?
I am using VB.NET 200... more >>
Drawing on panel removes graphics.
Posted by Shawn at 2/23/2006 2:54:43 PM
I know the answer to this is right under my nose, but I think I'm too tired
to recall it. I have a form that uses a picture as it's background upon
loading. I then have a panel on top of it that is used to click on and
create a box on the area that was clicked on. What happens is when the box ... more >>
Windows Forms - drawing diagonal text using Drawstring ?
Posted by Philip at 2/23/2006 8:04:31 AM
Hi,
I am using the DrawString method to add 2 strings to a label at right-angles
to each other (so one is horizontal, and the other string is vertical)
Both strings start with 'S' - now, is there any way to make that 'S'
diagonal instead of vertical - in other words, rotated clockwise)? Th... more >>
Joining multiple images
Posted by JimBean at 2/22/2006 8:54:04 PM
Hello,
I'm joining multiple images to a whole one using Graphics classes
DrawImage method. Unfortunately DrawImage leaves borders in those places
where
images are combined. How could I prevent this?
I have tried to make a one big image with background color and then
draw smaller images in... more >>
Bob Powell - Rotating Ellipse in bounded Rectangle??
Posted by jhall999 NO[at]SPAM earthlink.net at 2/22/2006 12:08:11 PM
Bob, You have been a great help and I thank you very much. This may
just show my need to brush up on Trig concepts, but now that I have my
ellipse as a control and a property that allows the user to update the
angle, I need the container to change in size as the user rotates the
ellipse. In ot... more >>
Opacity For Panel Control
Posted by S Chapman at 2/22/2006 11:07:43 AM
I don't seem to find Opacity property for a System.Windows.Forms.Panel
Control. How can I make a panel semi-transparent please?
... more >>
Mixing (blending?) two bitmaps
Posted by Jens Weiermann at 2/22/2006 12:00:00 AM
Hi,
I want to create some simple transition effects for bitmap images. For
this, I need to mix two images (or blend them, whatever that may be called)
together to one resulting image. This should be done with a per-pixel
weight of the effect.
I have this working fine, however it's not as fast... more >>
Pen Width problem with ScaleTransform
Posted by Laurence Bunnage at 2/22/2006 12:00:00 AM
I have a problem with a piece of code I am using. The following snippet
draws a line onto a control. As the control is resized along with the
Dialog on which it is placed the scaling is adjusted so that the line always
runs from corner to corner. (This is a simplified version of what the co... more >>
Pen question - answer and further question
Posted by Steve Marshall at 2/21/2006 11:26:04 PM
OK, I've realised what is going on - it's my scale transform that is causing
this. But that leads to the question - how can I retain my scale transform
for the purposes of co-ordinates, but not have it scale line thicknesses
differently in each axis?
... more >>
Drawing Opaque controls on top of a semi-transparent form
Posted by Chris Dunaway at 2/21/2006 2:35:12 PM
If I set the Opacity propery of a form to a value less than 1, then the
form becomes semi-transparent -- along with all controls on the form.
Is it possible to manually control the painting of the controls on the
form so they are fully opaque but the form still be semi-transparent?
I tried t... more >>
Export to bitmap
Posted by JB at 2/20/2006 8:59:26 PM
Hi all,
I have been using Bob Powell's code from the GDI+ FAQ to draw primitives
onto a form. It is working great, without an issues.
I want to extend my program so that when I click a button it takes a
snapshot of everything on the form and either save it as an image (BMP) or
print it ... more >>
Bob Powell - Sorry more help Rotation
Posted by jhall999 NO[at]SPAM earthlink.net at 2/20/2006 12:52:07 PM
Bob, Thanks for the information. I have written an Ellipse control and
was going to add an Angle property for the property Grid, but am a bit
new @ all this and under some time constraints. Would you have any
code snippets that would simulate this feature as the user updates the
Angle property... more >>
Draw a line with a "tube" appearance
Posted by pamela fluente at 2/20/2006 5:47:23 AM
I want to draw a line from point X and point Y (at any angle), with
appropriate gradient so that it "looks like" a tube. Can anybody show
the best way to do that?
Sub DrawTube(ByVal g As Graphics, ByVal X As Point, ByVal Y As
Point, ByVal Width As Integer, ByVal BaseColor As Color)
... more >>
Application.RegisterMessageLoop does nothing!
Posted by Lloyd Dupont at 2/20/2006 12:00:00 AM
I tried to use this method but the delegate never seems to be callled.
As there is no text in the documentation I could only believe it's a new and
deprecated function doing nothing they forgot to remove..
--
Regards,
Lloyd Dupont
NovaMind development team
NovaMind Software
Mind Mappin... more >>
"A generic error occurred in GDI+." Exception
Posted by Jamie Bliss at 2/19/2006 1:23:39 PM
When using Bitmap.GetHicon(), it sometimes throws the exception
described in the topic.
Details:
System.Runtime.InteropServices.ExternalException was unhandled
Message="A generic error occurred in GDI+."
Source="System.Drawing"
ErrorCode=-2147467259
StackTrace:
at System.Dra... more >>
"Cannot find font"
Posted by J at 2/18/2006 7:24:11 PM
Hello, I am trying to create a font object for a custome font on my
machine. When I use
FontFamily ff = new FontFamily("MYFONT");
I get "Cannot Find Font MYFONT" thrown by system.drawing.dll
If I try and use the following :
rtb.CurrentFont = new Font("MYFONT", 10f);
It creates an instance... more >>
Matrix transforms fontsize
Posted by flakjack NO[at]SPAM gmx.de at 2/18/2006 10:43:28 AM
Hi,
here is the problem:
I have some point coordinates with a range from -5.0 to +5.0 and I want
to draw lines and strings depending to these points to a
bitmap,control, emf, etc. with a size of 300/300 using the matrix
class. This works fine, but I want to set the size of the pens in pixel... more >>
Printing to a file
Posted by Lloyd Dupont at 2/17/2006 1:13:44 AM
When you create a PrintDocument you could set the
PrinterSettings.PrintToFile to true so that it print to a file.
What kind of format is it printed to?
I have created such a file but I don't know what to do with it.....
... more >>
GDI print issue
Posted by Lloyd Dupont at 2/17/2006 12:00:00 AM
The following code (in PrintDocument) doesn't produce the expected output on
some printers, any thoughts?
protected override void OnPrintPage(PrintPageEventArgs e)|
{
e.Graphics.DrawLine(
Pens.Red,
e.MarginBounds.X - 10,
e.MarginBounds.Y,
e.MarginBounds... more >>
mixing GDI & GDI+ printing
Posted by Lloyd Dupont at 2/17/2006 12:00:00 AM
I have a C# application, using a mix of GDI+ / System.Drawing.Graphics =
and plain GDI to draw
Problem is:
If I just use g.Graphics.GetHdc() it appears that when I print, I have =
different coordinate system.
Even though I did no scaling but just translation.
Now I'm trying to setup the GDI ... more >>
Determine the size of an image (Drawing Text)
Posted by Shiv Kumar at 2/16/2006 3:20:32 PM
I need to create an image that essentially is only drawing text. The text is
known only at run time and so I need to create an image but don't know the
size (it's a one liner so the width is where my trouble is).
I create my font like so
Bitmap bmp = new Bitmap(20, 20);bmp.SetResolution(150,... more >>
Bob Powell? Rotating .NET Controls
Posted by jhall999 NO[at]SPAM earthlink.net at 2/16/2006 10:19:06 AM
Is there any way possible to rotate a .NET control using GDI+? Or some
other means. I wan to allow the user to select say a TextBox and turn
it x # of degrees?
TIA,
Jason Hall
... more >>
Generate curve diagram and display on web page or windows form
Posted by david at 2/16/2006 7:49:27 AM
I would like to know how dynamically generate the curve diagram for data
analysis (such as frequecy, probability density curve) on web page or windows
form.
Thanks for any help.
David... more >>
Problems Converting Bitmaps
Posted by Tom Bean at 2/15/2006 3:51:48 PM
I am trying to reduce the size of images stored in SQL server tables by
converting them to reduce the bits per pixel using GDI and can't get
anything but black bitmaps. I have tried to follow the examples presented
in many newsgroup threads but am having no success.
Some of the images I am... more >>
Odd problem with Graphics and FromHdc
Posted by nigel.magnay NO[at]SPAM gmail.com at 2/15/2006 7:58:25 AM
Hello
I have a C# component for a legacy COM system. It is passed an HDC, on
which it's meant to draw things that will be printed on a printer.
If I use P/Invoke, all is good. I can do things like
IntPtr hDC;
// get the hDC./.
TextOut(hDC, 200, 500, "HELLO", 5);
The text appears in ... more >>
Adjacent Lines In Powerpoint.
Posted by Frustrated-Emmily at 2/15/2006 7:21:29 AM
I have drawn 7 horizontal lines across a single blank presentation slide
which I intend to print off, in Microsoft Powerpoint 2000.
Each line is a different color and is adjacent to one another, to form a
type of rainbow effect. Each line needs to be 4 pt in width.
How do I eliminate the ... more >>
Zoom and Point()
Posted by Ricardo Furtado at 2/15/2006 7:09:30 AM
I've been with a problem for about two months and i've bought books and
search the internet for an explanation, and haven't found one.
I'm developing a cephalometric software, that needs to capture an image from
the scanner, mark the image with dots in order to find distances and angles.
Every... more >>
Invalidating: rectangles or regions
Posted by nickdu at 2/15/2006 6:59:26 AM
Note this is something I posted to the WinForms newsgroup. I thought that
many on this alias might have good information on this.
--
Thanks,
Nick
"nickdu" wrote:
> What I would like to invalidate are individual cells. And I don't want to
> only know about a bounding rectangle. T... more >>
Painting custom polygon-shaped control to PictureBox
Posted by Surly at 2/14/2006 1:36:33 PM
Please help! I'm absolutely perplexed by this problem.
I have a PictureBox on a Form in .NET 2.0. I allow my user to draw
polygon(s) on the image, and I record the points and draw lines as so
in the PicBox.Paint handler:
e.Graphics.DrawLine( blackPen, polygonPts[ i ], polygonPt... more >>
GetPixel - different RGB values than Photoshop
Posted by Mirek Endys at 2/13/2006 2:28:49 PM
Hello,
I have this problem:
I have a small bitmap 2x2 pixels size.
All pixels in this bitmap has RGB values (195, 204, 218).
I save this picture in files (formats) JPEG, BMP.
I load this pictures in code, to the Bitmap and call GetPixel, the Blue
value in case JPEG has value 219, in case ... more >>
Looking for graphic control to use in .NET
Posted by Simon Friso at 2/13/2006 1:23:27 AM
Hello,
I'm looking for a graphic control I can use in .NET.
I need the following features:
- drawing shapes
- filling shapes with color, gradient or texture
- drawing splines, arcs and curves
- present the drawings on a graphical map (jpg)
I prefer .NET technology. I know Vector Graphi... more >>
GDI+ FAQ Question
Posted by JB at 2/12/2006 6:38:26 PM
Hi,
I have taken the code from http://www.bobpowell.net/manipulate_graphics.htm.
This works great for creating simple shapes but I have tried to extend the
functionality.
What I want to do is add images to the screen, so that they work in the same
way as all the other shaped.
My code... more >>
LockWindowUpdate in VB 2005
Posted by Sanjay Singh at 2/10/2006 12:00:00 AM
hi,
does VB 2005 provide an equivalent of LockWindowUpdate ? I want to achive
that without using win32 API.
Also, can anybody please give me some pointer on where i can get all APIs
and their .NET equivalent.
I will be thankful for any help on the same..
thanks
sanjay
... more >>
Bitmap Resources
Posted by Saleh Ghaleb at 2/9/2006 7:38:25 PM
Hi All
I need to add icons to the header of a ListView control, the bitmaps (icons)
are save as one single bitmap resource..
I managed to do most of the job but the bitmaps drawn with thier background
color. How to make them look transparent?
Any help is deeply apperciated.
Bests
... more >>
Creating Image files from Bitmaps - Problem with Icons
Posted by Bob Costello at 2/9/2006 1:16:31 PM
I created a drawing program using VS.NET 2003. I use GDI+ for the graphics. I
also wanted the option of creating Image files using the same painting
software. Here is what I do:
// Create bitmap
Bitmap bmp = new Bitmap(32, 32)
// Get a graphics object
Graphics g = Graphics.FromImage(bmp)... more >>
Articles on .NET Graphics/Controls - Drawing
Posted by kalyan.ganjam NO[at]SPAM gmail.com at 2/9/2006 11:22:00 AM
Hi All,
I started a blog www.kalyanganjam.blogspot.com few months ago. I would
like to post articles on .NET Graphics on this blog.
But, I dont know where to start, naturally, as a consequence of the
vastness of the subject.
So, I decided to do this post and get as many questions/issues you may... more >>
VisualStyleRenderer and Office 2003 colors
Posted by Grafix at 2/9/2006 3:58:28 AM
All -
Without much luck in framework.windowsforms group, posting it to
framework.drawing.
(*) Is it possible to get the gradient colors that Office 2003 uses for its
toolbar, programmatically?
For instance Outlook 2003's toolbar under Blue, has a Horizontal Gradient
fill from Argb(2... more >>
Not applying scale transform on text in ruler
Posted by Sanjay Singh at 2/9/2006 12:00:00 AM
hi,
I am drawing a ruler with displayes as such
|'''''|'''''|'''''|'''''|'''''|'''''|'''''|''''' and so on
1 2 3 4 5 6 7 8
when i scale it to view at 200% , numbers below the bars also get enlrged as
such.
It was not so when i used "pictureBox1.Print" method in VB6 whatever be t... more >>
thumbnail's gif version only has 16 colors
Posted by Daves at 2/9/2006 12:00:00 AM
my 2.0 web app reads an Image from file, resizes it to thumbnail size and
uses Image.Save() to save it as a gif file. I want it to be gif format, no
other (if I save it in another format, say jpg this doesn't happen). What
happens is that the color palette is reduced to 16 colors so the result... more >>
Resize an uploaded image then store in SQL
Posted by Simon at 2/9/2006 12:00:00 AM
Hi all,
We have an ASP.NET framework 1.1 application running on windows server 2003.
We currently have code to upload images into an sql server, which is working
perfectly.
Here is the current code,
The first function SetImage takes a stream, and a file name from an
HtmlControls.HtmlIn... more >>
Use of Vector Fonts in C#
Posted by arjun.chakraborty NO[at]SPAM gmail.com at 2/8/2006 7:27:37 PM
Hi All,
I am new to GDI and I am faced with a problem of drawing sharp text on
gifs.
I am using the DrawString API with truetype fonts likeVerdana.Arial
etc.
However, at lower resolutions of 200 the text has craggy edges.
Also, when I zoom at up 400 % I can see more craggy staircase on the
... more >>
|