all groups > dotnet drawing api > october 2004
Filter by week: 1 2 3 4 5
Print using Printer Fonts in c# app
Posted by Alison via .NET 247 at 10/31/2004 3:59:11 AM
Hi
How do I get a list all the printer fonts in c#?
I've written a c# app that prints out a receipt on a Citizen=
Thermal Printer=2E This works fine but I have to print out the=
character 'G' in the printer font "control" to automatically=
print out the bitmap logo saved in the printer'... more >>
Can't save meta file
Posted by Amendra TheUltimate via .NET 247 at 10/31/2004 3:52:39 AM
Hi,
I have tried saving a metafile, using a memory stream.
somemetafile.Save(m, ImageFormat.Emf);
But when you specify the image format as Emf I get a GDI exception saying an internal error occured. Other types are allowed other than wmf as well.
Only wmf and emf saving throws the except... more >>
negative image
Posted by Magic Gooddy at 10/30/2004 8:58:37 AM
SGkhDQpIb3cgdG8gY3JlYXRlIGJsYWNrLXdoaXRlIG5lZ2F0aXZlIGltYWdlIGZyb20gY29sb3Ig
aW1hZ2U/IChjYW4gSSBkbyBpdCB3aXRoIENvbG9yTWF0cml4Pyk=
... more >>
How to convert System.Drawing.Image to Byte[]?
Posted by Olav Tollefsen at 10/28/2004 9:15:22 PM
How do I convert an image stored in a System.Drawing.Image variable into a
Byte[] variable?
Olav
... more >>
correct "mental model" of graphics of a control ?
Posted by Bill Woodruff at 10/28/2004 7:47:58 PM
For a while I had a "mental model" that for controls (say, a panel) that the
Graphics object you would get inside the Paint event by doing :
Graphics panelPaintGraphics = e.Graphics;
// do something ....
Was probably a pointer to an object that might be moved around... more >>
NativeWindow Popup Tooltip problem
Posted by Jim at 10/28/2004 10:43:02 AM
I've been trying to get a Tooltip like class work and
for some reason the CreateParams Style property isn't
working. If I use WM_POPUPWINDOW (0x80C80000) the
newly created window does not show itself anywhere
on the screen. And what's worse is that I get a window
marker (or what ever you call i... more >>
Change a bitmap
Posted by Lachlan at 10/28/2004 8:32:50 AM
Hi,
Does anyone know how I can draw some images onto a
background image and then save the image to a file? I
thought an easy way would be to draw the images onto a
graphics object using the DrawImageMethod() then save it
but I can't figure out how to save the graphics object to
a file.
... more >>
drawing text around a curve
Posted by igkins at 10/27/2004 6:17:01 PM
Hello,
Does anybody know how to draw text around a curve, like on top of a circle
that follows the circle? I've been struggling this for a while and delved
into the graphicpath.warp routine, but i just seem to draw weird rectangles
with the text, i can't seem to get it to curve. thanks.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Need Printing Help
Posted by Chris at 10/27/2004 7:29:03 AM
Hello,
Does anyone have know of any good articles in reference to Printing in .Net?
I have a paper form with roughly 300 fields and trying to place info from
fields in a dataset into the paper form and how to place each one is a
problem.
Thanks... more >>
Graphics drawstring doesn't affect PictureBox bitmap image
Posted by Christopher Secules at 10/26/2004 3:04:06 PM
I have a Picturebox that continuously gets updated with either different
patterns and/or strings of text written on it. I have the text updating in
the PictureBox's Paint event. Then I use e.Graphics.DrawString(...) to draw
the string on the screen.
I noticed, however, that after the paint e... more >>
Changing the Brightness of a bitmap image in a picturebox using VB.NET???
Posted by Christopher Secules at 10/25/2004 1:22:23 PM
I've looked everywhere on how to change the brightness of an image in
VB.NET. I see that you can get the brightness of a pixel, but I can't find
any way to set the brightness of the pixel. I would think that a basic
function like this would've been included in VS.NET, since they seem to have
i... more >>
Alphablend API in .NET
Posted by Nak at 10/25/2004 1:01:51 PM
Hi there,
I was wondering if anyone had any examples of using the Alphablend API
in VB.NET? Thanks loads in advance.
Nick.
... more >>
ScaleWidth, ScaleHeight in VB.Net
Posted by Sam at 10/25/2004 12:37:55 PM
Does anyone have an alternative to convert a panel's width and height in
pixels to Inches other than assuming that there are 96 pixels per inch and
then Width/96 Height/96? I also need to track down distance in the mouse
move event in inch. Thanks in advance for all suggestions
Sam
... more >>
DrawImage slowness
Posted by Nak at 10/24/2004 5:30:18 PM
Hi there,
I have made an image box which includes magnification features. All
works well except I have noticed a bottle neck when viewing images that are
very large (via high maginification).
The magnified image only gets created once so I can pin point the bottle
neck down to 1... more >>
out of memory if picturebox image set at design time, okay if assigned at run-time ?
Posted by Bill Woodruff at 10/24/2004 10:55:01 AM
V.S. .NET 1.1
I assume that when I set the image property of a picturebox at design time using
the IDE to a very large image (5456x9854 jpg file) and it crashes with an out of
memory error that something has happened where it is unable to create the .resx
file ?
If I assign the picturebox i... more >>
InvalidPrinterException for Print() or PrintPreviewDialog()
Posted by bill at 10/22/2004 5:49:53 PM
I got an exception when trying to start a PrintPreviewDialog or print for a
specific network printer. The code works for other network printers. That
printer works perfectly for all other applications. The exception happens
when PrintDocument.Print() is called or PrintPreviewDialog.ShowDialog() i... more >>
stroking text
Posted by Chris Sano at 10/21/2004 5:59:02 PM
Does anyone know how to stroke text? I have some white text that
I'd like to outline with a fine black line. Any suggestions would be
appreciated. Many thanks!... more >>
Document Imaging using GDI+ .NET
Posted by sales NO[at]SPAM scantiva.com at 10/20/2004 8:41:16 PM
I work with customers (and friends) that view, print, and manage
scanned images. These scanned documents are typically letter or legal
size scanned at 200 or 300 dpi. They can be single and multi-page
Tiffs. In the past, I've been able to deliver free or near free
imaging utilities using VB5 ... more >>
How to make scale transform not affect line thickness
Posted by Arkion at 10/20/2004 4:32:56 PM
Hi all!
I'm using ScaleTransform to implement zoom in/out functionality. I'd
like to have the ScaleTransform only affect the positioning of
endpoints of lines drawn using Graphics.DrawLine, ie. the thickness of
lines should stay constant. Is this possible?... more >>
Get the Mouse position not using events
Posted by Teis Draiby at 10/20/2004 5:26:00 AM
Using C#, is there any way to query for the mouse position and button states
without using events (like MouseMove). Something like simply reading a
property somewhere.
Regards, Teis
... more >>
Out of memory when using FromFile method
Posted by MarcR at 10/19/2004 9:45:05 AM
I have two JPG in a directory. Both are pictures from digital cameras (but
not the same camerat). I use the following code to load the image:
dim objImage as system.drawing.image
dim sFile as string
objImage = objImage.FromFile(sFile)
When sfile is set to c:\a.jpg, I have no problem, how... more >>
Confusion about Image object and PictureBox usage.
Posted by Ken Varn at 10/19/2004 9:06:00 AM
I have an application that uses a PictureBox to display real-time video that
is captured from a JPEG video acquisition card. I basically get a JPEG
image buffer from the card that I convert to a .NET Bitmap object. I then
assign a clone of the Bitmap object to the Image property of the PictureB... more >>
how to add an icon to my form?
Posted by assaf at 10/18/2004 3:53:31 PM
hi all
i am using visual studio.net 2003.
i am adding an icon to my application.
i change it's BuildAction from Content to EmbeddedResource.
i double click the new file.
the visual studio displays the image
of a page with a fold in its upper right corner.
i erase the content using the e... more >>
FloodFll FillPixel - Bob Powell
Posted by JZ at 10/18/2004 3:19:11 PM
Hi,
I was recently given some code on this newsgroup by Bob Powell to enable me
to floofill, which I converted into VB.Net.
http://groups.google.com/groups?hl=en&lr=&c2coff=1&safe=off&threadm=416fecd4%240%2422880%24cc9e4d1f%40news-text.dial.pipex.com&rnum=1&prev=/groups%3Fq%3Dscribble%2Bdotne... more >>
Using System.Drawing to Size Images and Save Them
Posted by Brian Reed at 10/18/2004 1:29:15 PM
I have a digital camera and would like to write a simple app to take
specified images from the hard disk and create web sized images that could be
posted on a web site. Currently I am using Photoshop to shrink the images
and then save them manually one by one to another location. I am hoping... more >>
Reviews of Diagramming components ?
Posted by A Mackie at 10/18/2004 2:02:26 AM
Does anyone have links to reviews of .net diagramming components, and comparisons between them ? I need to provide drag + drop components from a tool-box, add connectors, annotate with text, etc. , to create business process diagrams, workflows, and the like. Ideally component should provide high-fu... more >>
how to set an application icon?
Posted by assaf at 10/17/2004 2:31:59 PM
hi all
i drew an icon.
i want to set my form to use it as the icon.
but when i set the form's icon property to
the new icon file,
it displays an icon unlike the one i drew.
what am i doing wrong?
how can i set my app icon?
assaf
... more >>
Font size rendering on different machines
Posted by steveboey NO[at]SPAM hotmail.com at 10/17/2004 2:06:36 PM
Hi all,
I have a web app which uses the DrawString method in the Graphics
class to create a PNG graphic with text on it. The problem I'm having
is with the font sizing/spacing. For example, on my local machine, I
could fit 50 characters a rectangle of x inch. But when I deploy it
to the se... more >>
how to draw an notify icon?
Posted by assaf at 10/17/2004 1:40:39 PM
hi all
i am drawing a notify icon.
i added a 'NotifyIcon' control to my form.
in the visual studio designer,
it looks ok.
however, when i run the app,
it looks a little different.
for example,
i use only red in the icon.
and when i run,
black pixels appear!
what am i missing?
why... more >>
EnumerateMetafile usage issue
Posted by Nalin Jayasuriya at 10/17/2004 2:19:01 AM
Hi,
I have created a Metafile (in GraphicsUnit.Points units). I need to play
back portions of the contents of this Metafile. Playing back the whole file
works ok.
I used the 'EnumerateMetafile' method and specified the source and
destination rectangles. No source or destination rectangle... more >>
Strange DrawString output
Posted by Yoav Ben-Yosef at 10/16/2004 6:24:01 PM
Hello,
I'm using DrawString to write text on a panel surface. Here is a screenshot
of the form: http://www.geocities.com/benyosefyoav/image002.jpg
It seems that when using proportional font (MS Sans Serif) the space char
width changes. Is there any way to fix this?
TIA
... more >>
Fading
Posted by gregbacchus NO[at]SPAM hotmail.com at 10/16/2004 5:33:20 AM
I want to make a control onto which i can draw points (or lines), but
continuously all the previous points are fading into black at a
constant rate. I am trying to show what a laser beam moving around
would look like - emulating the optical persistance that our eyes
observe when looking at brigh... more >>
Storing Point in ArrayList
Posted by TJO at 10/15/2004 9:35:26 AM
I amy capturing Points in an ArrayList in the following way.
MouseDown: begin capturing points in a new ArrayList
MouseMove: add Points to ArrayList
MouseUp: Add Point ArrayList to an ArrayList of Lines and clear the Point
ArrayList
The problem is that after adding a couple lines in the Li... more >>
Strangeness with OnPaint
Posted by dominique at 10/14/2004 3:26:02 PM
Hi,
In windows forms (vb.net), i use my own controls subclassed from base
controls and i override the Onxxx methods.
for example:
Public Class MyBouton
Inherits System.Windows.Forms.Button
..
Protected Overrides Sub OnPaint(ByVal pe As
System.Windows.Forms.PaintEventArgs)
... more >>
Closest point on GraphicsPath
Posted by Michael Crago at 10/14/2004 5:52:38 AM
Hi there,
I am trying to locate the point on a GraphicsPath that is closest to where
the mouse clicked. I can determine if the mouse point is 'close' to the
GraphicsPath using IsOutlineVisible() and a wide pen. But how do I determine
which point in the GraphicsPath it was actually closest to?
... more >>
Using 16 bit greyscale?
Posted by Teis Draiby at 10/14/2004 3:34:02 AM
I am developing a GDI+ painting program to paint bitmaps for height mapping
in a 3D application. When using a greyscale to define the heights I will
only get 256 different levels with the 8bit per color channel normally
provided. Can I switch to 16 bit per color channel, or even better; switch
t... more >>
Creating a Graphics Path from a String of Text
Posted by Edward Jones at 10/13/2004 3:25:00 PM
Hi,
I have created a Graphics Path of text using the AddString method, which
I then use to draw text to the form using High Quality Smoothing
property. However, I would then like to use this path to create a
transparent form region to basically make the background transparent.
However, w... more >>
how to erase a line on a picturebox control
Posted by Sam at 10/13/2004 12:03:40 PM
Hi All,
Does anyone know how to erase a line on a pictureture box control? Basically
I have lines drawn on a picturebox control using line method method and the
lines' color is black. It's two points are pt1 and pt2. I use
graphics.drawline(Pens.White,pt1,pt2) to overwrite it, but there is ano... more >>
Obtaining a portion of an image without loss of quality
Posted by Steve Bugden at 10/13/2004 10:59:03 AM
Hello,
I'm trying to obtain a portion of an image and save it as a jpeg file. I
have some code to do this (attached) which works but the quality of the image
is not as good as the image created simply by saving the bitmap.
I assume therefore that method I have used to obtain a portion of t... more >>
Rotating a Picturebox
Posted by Charles A. Lackman at 10/12/2004 11:23:08 PM
Hello,
I am trying to rotate a picturebox control. I have done some experimenting
with rotating the image inside the picturebox, but I am trying to get the
affect of grabbing the corner of the picturebox and moving the mouse to
change the angle. I am sure I can implement the code to grab ... more >>
Need advice with UserControl using graphics.drawimage -> flickering
Posted by Michael W. at 10/12/2004 10:32:54 PM
I am writing a Custom Cntrol to show a scrolling compass.
I am creating the image in a separate bitmap and then simply scrolling left
and right
by calling graphics.drawimage to copy the bitmap to the user control with
appropriate offset.
The speed is ok, but there is a lot of flickering.
... more >>
Panel refresh with pictureboxes very slow
Posted by microsoft at 10/12/2004 8:49:11 PM
hai ng
i have following problem. i am developp an animated matchviewer for an
online managergame (soccer).
controls on form:
23 pictureboxes
1 panel
Each picturebox includes an animated gif. this gif has two pictures and
transparency background (made with photoshop). Parent for all pict... more >>
Flicker free solution in GDI+ does not work
Posted by nesculcas NO[at]SPAM hotmail.com at 10/12/2004 4:49:12 AM
Hello,
I'm working on VC7 and i'm trying to make a simple animation that
have an image in the background and the animation is a text that is
scrolling from right to left. I'm doing this in GDI+ and i'm using the
technique DrawCachedBitmap to avoid the flicker, but i'm still getting
the flic... more >>
How to change border Color
Posted by sri292 NO[at]SPAM -NOSPAM-rediffmail.com at 10/12/2004 4:13:33 AM
How to change system color for listview ?
or
How to change Item Border color for listview ?
LVS_EX_BORDERSELECT
LVM_SETOUTLINECOLOR
I tried in C# by sending SendMessage, but its not working
Can any body suggest me ?
Thanks & Regards
Sri
---
Posted using Wimdows.net Nnt... more >>
Text different sizes...
Posted by Nobody at 10/11/2004 1:20:19 PM
Can someone tell me why the text in the follow code is drawn two different
sizes? I'm trying to create a GraphicsPath with an Ellipse and some text
centered in it. I want the Ellipse (but not the inside of the text) to be
part of the control's region. This works, but the String added to the... more >>
Scribble GraphicsPath Floodfill
Posted by JZ at 10/11/2004 10:30:13 AM
Hi,
I wonder is anyone can suggest an approach and possibly some sample code.
I've got a small scribble program, where the user can draw freehand lines
using graphicspath, also add pieces (images).
I've seen fillpath but this won't work if the user tried to floodfill a
piece.
I think I... more >>
Graph Help
Posted by James Jenkins at 10/10/2004 11:56:33 PM
Hi - What are your suggestions for best accomplishing a moving (right to
left) graph which is being dynamically updated per second. any suggestions
very welcome..
thanks
JJ
... more >>
Fastest BitBlt in C#/.NET
Posted by _AV at 10/10/2004 1:28:07 PM
I need to do ultra-fast bitblts in a C# program. Is it necessary to go
back to the older GDI DLL, or is are there fast calls within GDI+?
Basically what I'm doing is creating an array of 32-bit ints (pixels) in
memory, writiing individual pixels in the array, and then blitting it to
the scree... more >>
PropertyItem.Type limited by MS ?
Posted by Robert Seidl at 10/9/2004 11:56:10 PM
Re. setting propertyitems on Bitmaps
I found that setting PropertyItem.Type > 10 while legal in the TIFF =
world - causes Generic GDI+ exceptions when writing the bitmap with =
those properties to a file.
Is this a half baked implementation of the type range by MS or am i just =
missing som... more >>
Draw ontop of DirectX (fullscreen) applications
Posted by michael NO[at]SPAM bodekaer.dk at 10/9/2004 5:47:29 AM
Hi,
I would like to make an application which can draw a small rectangle
and some text inside the rectangle, on top of all applications.
I could easily do this by using a Windows.Forms.Form and then set it
to show OnTop.
But the problem is that many fullscreen games (not Counter-strike
tho... more >>
|