all groups > dotnet drawing api > december 2005
Filter by week: 1 2 3 4 5
How do I draw a rectangle?
Posted by pamela fluente at 12/30/2005 10:32:45 AM
Hi! I need to draw a rectangle like this shown on this page:
http://151.100.3.84/technicalpreview/square.htm
I am not sure how to obtain the 3D effect. Can anyone provide a
suggestion on the simplest way to draw this rectangle?
sub Draw3DRect(Graphics as Graphics, Rectangle as Rectangle, _... more >>
PrintPreviewControl not working on some machines
Posted by jaredljensen NO[at]SPAM hotmail.com at 12/29/2005 6:29:29 PM
I have subclassed the PrintDocument class and overridden OnBeginPrint
and OnPrintPage to create a reusable class for reports. My app
displays these reports in a PrintPreviewControl. Everything works fine
on my XP Pro SP2 (Framework v2.0) dev machine.
The problem is that on some, but not all,... more >>
Number of pages in tiff file...
Posted by zamdrist NO[at]SPAM gmail.com at 12/29/2005 3:46:43 PM
Trying to determine the number of pages in a tiff file. I'm assuming
System.Drawing calls pages frames.
Here's what I have now, although it clearly doesn't work:
Dim img As Image
Dim dimen As Guid()
img = Image.FromFile("C:\eofb_396.tif")
dimen = img.FrameDimensionsList
MsgBox(dimen.G... more >>
Resizing gif down. Quality suffers.
Posted by engwar1 NO[at]SPAM yahoo.com at 12/28/2005 10:24:46 AM
I'm writing some file upload code using C# for users on my website. If
the image is too large I want to resize it smaller to a thumbnail size.
It's working fine for jpegs but the thumbnails of the gifs look pretty
bad.
I assume it's something to do with the color palette. I don't know a
whole... more >>
Question on the use of other webpages to generate temporary graphi
Posted by B. Chernick at 12/27/2005 6:35:02 AM
I keep seeing references (from a number of MVPs among others) about how one
can generate temporary graphics by pointing the ImageURL of a control to a
web page rather than fixed location.
Could someone give me a coherent example? So far I'm stumped. I really
can't see how this scheme is s... more >>
Adding Image Types
Posted by T. Ford at 12/23/2005 1:20:02 PM
Are there examples/samples of adding new image types that can be read/written
via the System.Drawing.Image class? I've got a custom image type and would
rather not have to load it by creating a Bitmap object, calling LockBits,
modifying the bits, and then calling UnlockBits.
Thanks,
Tor... more >>
crop with selection
Posted by manuel conti at 12/23/2005 11:13:18 AM
Hello to erveryone,
i'v an imgPicBox where i've loaded an image.
I want crop this, but i would use a graphic selection (photoshop mode for
ex.). It's possible? I must use a pen and make a rectangle on image or i can
use some component inside the framework?
Thanks
manuel
... more >>
Rotating
Posted by Charles A. Lackman at 12/21/2005 6:14:25 PM
Hello,
I have a print document that has a graphics object as such:
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim AGraphic as Graphics = e.Graphics
AGraphic.DrawImage(MyImage, 0,0,... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Superscript text
Posted by Ben Amada at 12/21/2005 8:10:59 AM
Hello,
Within a string of characters, there are a couple of superscript characters
I would like to draw onto an image. I assume I'll need to use the
DrawString method to achieve this.
I've basically found no information on how to draw superscript characters.
Has anyone done this before?... more >>
Drawing Optimization advice wanted!
Posted by Özden Irmak at 12/21/2005 12:55:19 AM
Hello,
I'm looking for your suggestions on how to optimize my control draw
routines...
I know that the most important thing in optimization is to draw only needed
parts (which is passed as ClipRectangle) but I'm having difficulties for
this...
Let me give you a brief info about how I ... more >>
ImageCodecInfo
Posted by James Bean at 12/20/2005 9:01:20 PM
What are ImageCodecInfo classes? Can tehy make your images (gif, jpeg, etc.)
better or why to use them?
I made a (another) screen capture program and notice that captures
could be better. Could ImageCodecInfo class make screen capture picture
better?
Thanks for any info!
Cheers!
... more >>
How to correctly invalidate region on DesktopWindow?
Posted by Gabriel Lozano-Morán at 12/20/2005 5:10:13 PM
Using a mousehook I am drawing the mouse coordinates on the desktopwindow
when a user hovers the mouse over a certain control. The problem I am having
know I need to invalidate the region where I am drawing the coordinates,
thus I need to invalidate a specified region on the desktopwindow. I have... more >>
Can't create font anymore
Posted by Lucvdv at 12/20/2005 2:46:05 PM
Exception when creating a Font object:
An unhandled exception of type 'System.ArithmeticException' occurred in
system.drawing.dll
Additional information: Overflow or underflow in the arithmetic
operation.
This seems really strange.
All of a sudden, creating fonts stops work... more >>
Getting hold of graphics drawn on control?
Posted by Steve Marshall at 12/19/2005 9:47:19 PM
Hi all,
I'm capturing data from a lab instrument and drawing graphs and things onto
a picturebox. I then want to be able to save the resulting image. How do I
get a handle (or something) to what I have drawn? Or do I need to create an
image object and re-draw it all onto that? Surely no... more >>
text in Jpg files
Posted by Jack Russell at 12/19/2005 3:00:48 PM
Not sure if this is the right forum to ask this but .....
I am looking at storing text in jpg files. I have been pointed at a non
standard method of storing it in bmp files
http://vbnet.mvps.org/code/file/combine1.htm
and at a standard method
http://www.jsware.net/jsware/scripts.php3#jsi... more >>
path information
Posted by Mike at 12/19/2005 6:30:02 AM
Defining an image file like below worked in vb2003:
e.Graphics().DrawImage(System.Drawing.Image.FromFile("QC2Invoice.png"),
e.Graphics.VisibleClipBounds)
"QC2Invoice.png" in ../bin/release
Does anyone know how to make reference to files in the release folder when
using vb.2005?
Thanks... more >>
Fade In/Out effect on Control?
Posted by Özden Irmak at 12/18/2005 8:56:28 PM
Hello,
I've developed several controls for an applicaiton which is something
similar to PowerPoint...
It has a player where all controls do animate in a way where they show on
their start time and disappear when their timeline are finished. Some of the
controls even contain other control... more >>
convert 1 bit image to greyscale
Posted by Binary Poet at 12/18/2005 6:04:22 PM
I have a 1 bit images (scanned page) and want to display it in greyscale
with bilinear to help it look much better when displayed
I have looked at Bob Powell's site and played around with the "Create high
qaility thumbnail images" sample, but I need to have the page in the same
dimensions a... more >>
Image Processing
Posted by Peter Wallington at 12/17/2005 3:18:44 PM
Hi All,
I am looking at writing an application (in VB.NET) to find and flag colours
used in an image. What is the best way to go?
Peter W.
... more >>
Transparent Image Copy to Clipboard Adds Blue BG
Posted by Bill Henning at 12/17/2005 3:03:50 PM
Hi there... I am running in the .NET 1.0 framework have an object that has
an Image property. Upon a certain event, I want to copy the Image to the
Clipboard. This is easy enough:
Clipboard.SetDataObject(image)
However, if the Image has a transparent background, when I go to paste the
Im... more >>
word wrap on e.graphics path
Posted by johnwg2 at 12/16/2005 9:48:55 PM
Hi
Having created a path using
path.addcurve.
I then set the clipped area to this path
e.Graphics.SetClip(path)
I now have an irregular shape. Is it possible to write text into thi
shape that
automatically word wraps within the clipped area??
thanks
john
--
johnwg
---------... more >>
MDI Parent Container Background painting a new color than ugly gra
Posted by ARTMIC at 12/16/2005 5:46:44 PM
Hello i read these forums a bit, and i found some code on the
http://www.bobpowell.net/mdiback.htm site.
There is a small problem though, i can change the background to a different
color alright, but when the child mdi window is clipped, as in half the child
goes behind the border of the m... more >>
How fill a Bitmap with random black/white pixels
Posted by Hans Peter Gerdes at 12/16/2005 12:47:46 PM
i need help to finding a algorithm to fill a Bitmap (1024 x 768) with random
black/white pixels (pixelsize from 1x1 update to 4x4).
I know the setpixel function for draw the pixel, but i need a algorithm to
calculate the pixel color nicely.
like this picture http://zeus.rutgers.edu/gifs/rds.gi... more >>
How to fill a region
Posted by mauro at 12/16/2005 12:09:40 PM
I have a bitmap and I want to fill an area that is delimited by the color
black, I do not know the path of the area, I just want to know how to fill
a given area by knowing a point inside it and the rgb color of its border,
how
can I do this ? This is similar to the fill function of any graphic... more >>
Beginner’s_question
Posted by Alexis at 12/15/2005 10:37:01 PM
Is there a way to convert text documents to image files? ... more >>
drawing perspective
Posted by Steve at 12/15/2005 1:16:50 PM
I have just been asked if I can draw over a perspective photo in a specific
area. It would be a rectangle and on the base image, the region to be drawn
over will be an easy color to detect. So I know that I can determine the 4
corners of the region to draw on. What I'd like to do is draw a... more >>
Screen capture with IE AxWebBrowser control and hidden Window
Posted by Berry W at 12/14/2005 11:22:59 PM
Hi,
I'm trying to capture hidden window's data that is in IE's
AxSHDocVw.AxWebBrowser ActiveX control.
If Control and window are visible, code below works but if Control
and it's window is hidden e.g. emmedded in dll, code does not save
data as an picture. How should I handle this kind of s... more >>
GDI+ (SetROP2_I???)
Posted by Gilberto Müller at 12/14/2005 8:07:02 PM
Hi again,
How to configure the pen mode using GDI+ ?
Example: R2_XORPEN
Thanks,... more >>
GDI+ (RoundRect)
Posted by Gilberto Müller at 12/14/2005 8:01:01 PM
Hi,
How to make RoundRect using GDI+?
PS: I saw only DrawRectangle (there is no DrawRoundRect).
Thanks.
... more >>
Animated GIF with GDI+
Posted by Steve at 12/14/2005 10:02:23 AM
I have been reading the newsgroups and have found that indeed, it's not
possible to create an animated gif with GDI+. This is a bummer, I thought
for sure there would be a class for this.
Anyway, moving along.. I still need to do this somehow. Does anyone have
experience with any librarie... more >>
how to get an 8 or 24 bit handle to a Bitmap image in .NET
Posted by tedunni NO[at]SPAM gmail.com at 12/14/2005 7:41:12 AM
I load a file into a bitmap object. The bitmap object is in 8bits. I
need to now supply the handle to a C dll which accepts and integer
value (HBitmap). The problem I am having in .NET is when I try to get
the handle, what is returned by GetHBitmap is 32 bits. The C dll can
only handle up to... more >>
Get the exact heigh of a String
Posted by Hans Peter Gerdes at 12/13/2005 3:48:08 PM
I´m trying to get the exact heigh of a string ("X").
I try Graphics.Measurestring() or Font.GetHeight() but all function give me
the Height with ascent and descent of the font. I need exactly the Height of
the Character "X".
Thanks in advance
Hans Peter
... more >>
DrawString
Posted by Pedro Hurtado at 12/13/2005 3:35:02 AM
I´m trying to draw with "DrawString" the textbox multiline text.
I have used diferent Flag of Stringformat and don´t get the DrawString
method draw in the same TextBox form.... more >>
c# assistance needed 10$/hour
Posted by michael horthum at 12/12/2005 5:29:24 PM
- i am not a beginner, books, or online tutorials don't help, please save
your advises-
i want to learn c# from someone who knows it well.
concepts and fundamentals i currently have (gdi+, activeX, directX,
oop,classes, how they interact with each other etc.)
you should connect to my desk... more >>
Need lightweight custom windows grid
Posted by Rajat at 12/12/2005 3:14:19 PM
Hi,
I am receiving data from an external source in form of events. The incoming
events are very fast. Initially I was using windows datagrid control to
display the data, but it seems to be very slow.
Please tell me, how can I create my own custom lightweight grid to solve
this issue or poin... more >>
Outputting GDI Commands to A Bitmap
Posted by Chris Y at 12/12/2005 12:22:57 PM
VS.NET 2003+.NET Framework 1.1
Is there an easy way to pass the output of my GDI+ drawing commands to a
bitmap (say at a resolution of one coordinate point to one image bit)?
I want to save my drawing canvas to a JPEG file for use in a web page, for
example.
Thanks in advance.
chris ... more >>
CheckListBox Row Height
Posted by mathieu at 12/12/2005 7:55:09 AM
I am trying to develop a CheckListBox wich triggers a ItemChecked event
if and only if the user clicks the check mark of a row.
I already tried setting "CheckedOnClick" to FALSE but that alone wont
work because ItemChecked is triggered when clicking an already selected
row.
OwnerDrawing see... more >>
Converting html page to tiff or gif?
Posted by Steven Hill at 12/11/2005 8:53:18 PM
Hello All!
Has C# any classes to convert html page to gif or tif?
Anyone could please, give how to do it?
Br
Wew
... more >>
Maps of Europe
Posted by Tito at 12/11/2005 1:07:29 PM
See online physical and historical maps of Europe:
http://www.euratlas.com
Best to all of you
... more >>
Question about Web graphics and the ImageButton
Posted by B. Chernick at 12/11/2005 9:31:02 AM
Guys, I need a quick and simple answer (if possible.) Is there an easy way
to do simple vector graphics (drawing a line or a circle) on the image of a
web page's ImageButton?
Thanks.... more >>
Patchy availability of Bob...
Posted by Bob Powell [MVP] at 12/10/2005 12:00:00 AM
Hi Folks,
I promise I haven't forgotten you all. I am currently doing consulting work
for a group that has a very tight internet security policy (With good reason
I might add) As a consequence I can't use the newsgroups at-all on
Wednesday, Thursday or Friday unless I can find a convienient h... more >>
Zoom to Selection ZoomPicBox
Posted by Curtis at 12/8/2005 5:14:21 PM
I have used Bob Powell's ZoomPicBox example to create a user control. I am
trying to add the ability to zoom to a selection rectangle and zoom into the
coordinates on that image. My idea was to calcuate the amount that the
selection rectangle would be zoomed in and then use the matrix to go to... more >>
"The object is currently in use elsewhere" exception with print
Posted by Sabran at 12/8/2005 3:58:16 PM
Hello all,
I'm developing an intranet application in VB.NET that uses a Hosted
Windows Form (HWF) dedicated to image manipulation. This HWF is also
supposed to allow the user to print an image to their default printer.
I'm using a System.Drawing.Printing.PrintDocument object to initiate
print... more >>
EMF and GraphicPath
Posted by Steven at 12/8/2005 1:24:22 PM
Hi,
I have to draw a geometric form quite complex, like a car for example.
Then, i need to know which part of the car the user has clicked on.
I have been told to "draw" the car with Microsoft Visio to create a .emf
file, to use the MetaFile class to print the form on the screen, and then t... more >>
DrawString and ExternalException
Posted by lukasz at 12/7/2005 10:16:23 PM
If ctl is a System.Windows.Forms.ListControl, when the following lines:
using (SolidBrush br2 = new SolidBrush(fore)) {
g.DrawString(text, ctl.Font, br2, x2 + 10, rect.Top);
}
can throw an ExternalException (A generic error occurred in GDI+)?... more >>
Copying Format1bppIndexed Images
Posted by Tom Bean at 12/7/2005 4:00:30 PM
My application breaks multi-page faxes into a collection of images, one for
each page. The faxes are saved by our fax software as multi-frame TIFFs
with a pixel format of Format1bppIndexed.
While processing the pages, I am creating a new Bitmap of each frame and
found the new Bitmap had a ... more >>
uniscribe printing problem
Posted by Lloyd Dupont at 12/7/2005 9:56:13 AM
In my (C# 2.0) application I have implemented international rich text
rendering with uniscribe.
It paint well on the screen.
It's when I try to print or print preview I experience trouble.
PrintPreview doesn't work at all. I just have a blank page.
Printing kind of work but I have to sca... more >>
programming a vector drawing tool?
Posted by Mad Scientist Jr at 12/6/2005 11:53:53 AM
I am looking to make a homegrown vector drawing tool, similar to making
vector drawings in Word or Powerpoint. It should be easy to use and
intuitive, like Word or the old MacDraw. I want to make it easy for
beginners, as opposed to something harder or more involved like
Illustrator or Flash...
... more >>
GDI or not
Posted by Hennie7863 at 12/6/2005 11:30:34 AM
Hi i wan to build an application to show some stuff in a graphical way.
I'm a datwarehousedeveloper and i want to build a graphical interface
for representing the facts and dimensions. I want to create context
menu's and i want to drill down on a dimension or a fact. It should be
possible to sho... more >>
DrawCurve goes too high in percentage graph
Posted by mottebelke NO[at]SPAM hotmail.com at 12/6/2005 6:03:33 AM
I'm currently drawing a line graph using the DrawCurve method. So I
have an array of points through which the line should be drawn. This is
all going well, but there is an issue I can't come round.
The values in the graph are percentages (0-100%). But if point 1 is a
low percentage (say 50%), ... more >>
|