all groups > dotnet drawing api > november 2004
Filter by week: 1 2 3 4 5
Animated Graphics
Posted by David Angelovich at 11/30/2004 9:02:31 PM
Hi
What's the best way to do animated graphics in VB.NET?
I need to make a white square bounce around the screen...
I was thinking of drawing the square then using a timer to redraw 30 times
per second, then moving the square on each redraw...
Is there a better way though...? I'm looking ... more >>
creating bitmap from string
Posted by Jason at 11/29/2004 2:41:03 PM
I'm loading a jpg using XMLHttp, but am not sure how to convert the result
into a bitmap?
I've tried converting ResponseText into a byte array, and then loading that
into a memory stream, and then creating the bitmap from that, but it's not
working.
I don't want to have to create a tempo... more >>
Problem with Text
Posted by theavey NO[at]SPAM gmail.com at 11/29/2004 2:40:39 PM
In the following code the text will not display if I use the
stringFormat in the Drawstring and will separate the two strings if I
do not use the stringFormat:
graph = e.Graphics;
pen = new Pen(Color.Black,2);
//graph.DrawLine( pen,100,100,200,100);
drawFont = new System.Drawing.Font("Aria... more >>
image from rtf
Posted by Steve Bugden at 11/29/2004 3:47:01 AM
Hi,
I'm just wondering if it is possible to create an image from RTF formatted
text?
If it isn't possible, is there anyway of determining the height of an rtf
string for a given width? I have the text in a richtextbox control and would
like to set the height so that all of the text is di... more >>
Can't import .OCX assembly into Web Matrix Project.
Posted by Jason Robertson at 11/29/2004 2:34:30 AM
Hi,
I am using Web Matrix Project as .NET programming environment. Can you show
me detailed steps how to import the .ocx library into the Web Matrix
Project. I can't seem to be able to import other assembly than .dll, .exe or
..mcl . I am pretty new to the .NET programming environment, and ma... more >>
Need help on printing best-fit based on original aspect ratio
Posted by n_sp_m_sales NO[at]SPAM scantiva.com at 11/28/2004 6:22:53 PM
I would like to print an image as large as I can on any size of paper
(user selected or default printer settings). The following code is
based on Bob Powell's C# example. However, the image is too small
Help!!!!
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e
As... more >>
print panel
Posted by Patrick at 11/28/2004 6:03:02 PM
Hi Ng,
I have a panel which I want to print with the printDocument object. How can
it be done?
Thanks in advance and best regards,
Patrick Braunschweig... more >>
scale background image
Posted by Patrick at 11/28/2004 5:55:01 PM
Hi Ng,
i have a background image on a panel. Now I want the image to be scaled to
the panel size. Is this possible? Can I also make the image transparent?
Thanks in advance and best regards,
Patrick Braunschweig... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to know if a certain control or window is visible on screen and not covered by other window(s)? please help.
Posted by Jose Michael Meo R. Barrido at 11/27/2004 9:37:18 PM
Custom Rounded Rectangle Usercontrol does not redraw controls on it. Please help.
Posted by Jose Michael Meo R. Barrido at 11/27/2004 6:05:14 PM
I made a custom runded rectangle usercontrol. I used a function i found on
the internet. the function works fine(see "GetRoundRect" below).
I use the fullowing code to make my usercontrol rounded....
*****************************************************
Protected Overrides Sub OnPaint(ByV... more >>
prevent smoothing when stretching image
Posted by Norvin Laudon at 11/27/2004 10:38:12 AM
Hi,
I'm painting images of various sizes into a picture box, and have the
"SizeMode" property set to "StretchImage". This looks OK when the image I am
painting is larger than the picturebox.
But when the image is smaller than the picture box, the image seems to have
some sort of filtering (bi... more >>
Custom double buffer
Posted by Kuba Florczyk at 11/26/2004 2:02:13 AM
Hi
I've got some problem doing double buffer.
Here is my problem:
I've got custom control on which i paint some data (chat messages, lets call
it ChatControl), this control is puted on a scrollable panel.
Of course i've set right styles on a ChatControl:
//styles
this.SetStyle(Control... more >>
Image.FromFile vs Image.FromStream
Posted by Jorge Carlos Paredes Jimenez at 11/25/2004 2:08:22 PM
Hi everyone,
I have some questions, I'll appreciate if someone can answer some of they,
thanks in advance!!
A days ago a read in some forum that Image.FromStream improves some
performance over
Image.FromFile since Service Pack 1, it is really true?
Now, Image.FromStream since SP1 has one a... more >>
Create Bitmap from MemoryStream
Posted by Scanbull at 11/25/2004 7:13:02 AM
Hi,
in C#, I have a MemoryStream filled with a jpg-Image, how can I create a
Bitmap from that?
Thanks
Friedhelm Drecktrah... more >>
Mandelbrot set
Posted by mboizeau NO[at]SPAM free.fr at 11/25/2004 6:33:18 AM
Here is a C# code to draw a Mandelbrot set:
http://oraclevsmicrosoft.blogspot.com/2004/11/mandelbrot-in-c.html
Hope this help
OracleVsMicrosoft... more >>
Help on the cardinal spline
Posted by CristianMori at 11/25/2004 5:23:02 AM
Hi everyone
I need to know the formula used in .net for the cardinal spline since i need
to generate an array of values of the curve after drawing it.
Thanks... more >>
Exception in DibGraphicsBufferManager.CreateCompatibleDIB
Posted by Max Christian at 11/24/2004 6:06:40 PM
I got an exception in CreateCompatibleDIB in a stable, deployed
application today -- the stack trace is at the bottom of this message.
The thing is, the trace shows that none of my code was running so I'm at
a loss as to what to do about it.
In case it's relevant, I'm overriding a Picture... more >>
Help with Image Panning Code
Posted by Brad Shook at 11/24/2004 4:07:33 PM
I am working on panning an Image inside a panel using the mouse move event
for the picture. It is sort of working. Will someone take a look at what I
have and tell me how to tweek the code. Right Now I am only working with the
X axes. I fugre the y would be almost Identical to the X so I diden't ... more >>
Changing Cursor not working.
Posted by Brad Shook at 11/24/2004 2:05:53 PM
I am trying to change the cursor in a vb windows program with the following
code.
Me.Cursor.Current = Cursors.Hand
It is not working.
Does anyone have any suggestions?
Thanks,
Brad Shook
... more >>
Transparent User Controls flickering with repaint
Posted by brandonshuey NO[at]SPAM sbcglobal.net at 11/24/2004 12:18:52 PM
I have been struggling with this for awhile now and tried many
approaches, I'm hoping someone out there can give me a hand.
The problem is I want transparent controls (label, groupbox, etc) to
paint on a gradient panel. The flickering come when I move a
different window over my form and drag ... more >>
ControlPaint class
Posted by Patrick at 11/23/2004 7:41:06 PM
Hi Ng,
I'm trying to imitate the Windows Form Designer in VS. Is there a method in
the ControlPaint class to show this selection rectangle when you click on a
control to select it?Or can it be implemented on another way.
Thanks in advance and best regards
Patrick... more >>
grid painting on panel II
Posted by Patrick at 11/23/2004 7:39:04 PM
Hi Ng,
i want to draw a grid on a panel and I tried out this here, but it didn't
work out (I definded this in the constructor of the panel):
this.SetStyle(ControlStyles.UserPaint, true);
ControlPaint.DrawGrid(System.Drawing.Graphics.FromHwnd(this.Handle),
this.ClientRectangle, new Size(8,... more >>
Date Time Picker
Posted by Charles A. Lackman at 11/23/2004 5:32:06 PM
Hello,
I have a DateTimePicker on my form and I need to make every Even week Red
and every Odd week Yellow.
Any Suggestions will be greatly appreciated (Detailed help is even more
appreciated).
Thanks,
Chuck
... more >>
ANN: Bob Powell's Beginners Guide to GDI+
Posted by Bob Powell [MVP] at 11/23/2004 4:51:58 PM
Many of you use the GDI+ FAQ or Windows Forms Tips and Tricks site every
day. There are also hundreds of people who have mailed me asking for a
totally basic beginners guide that assumes minimal knowledge of .NET to get
started.
In response to these requests I have created a new series of arti... more >>
Can't create a metafile from existing image
Posted by Garann Means at 11/23/2004 8:55:38 AM
Hi,
I'm trying to turn a series of images into metafiles for use as PowerPoint
AutoShapes. I've tried doing this with a simple ASP.NET application that
takes an uploaded image and spits out a .WMF file, but the files it creates
can only be opened by certain image viewers, and not by PowerPo... more >>
Problem in GDI+
Posted by vikash NO[at]SPAM nagarro.com at 11/22/2004 10:24:19 PM
Hi all,
I am currently working on a C# windows application and in that i need
to do some graphics manipulation in C# .net
but at certain point dont know why, i am getting the follwing sort of
unpredicatable errors in my code
<MESSAGE>The operation completed successfully</MESSAGE>
<FUNCT... more >>
grid painting on panel
Posted by Patrick at 11/22/2004 8:05:01 PM
Hi Ng,
i have a grid which has to be painted on a panel. This panel serves as an
editor to add controls. The grid consists of horizontal and vertical lines,
illustrated with dots (by the way, how can I draw dots, the line shown below
consists of two dots). If I write an algorithm like this
... more >>
Exceptions occuring related to Graphics
Posted by Christopher Secules at 11/22/2004 5:30:18 PM
I am writing an application that uses remoting and the GDI graphics class to
update a bitmap that is getting displayed on the Client (UI). The server
receives commands from a controller over the serial port, and when a
complete command comes in, it interprets it. Interpretation of these
comman... more >>
A generic error occurred in GDI+.
Posted by Niraj Ranka at 11/19/2004 7:01:17 PM
Hello,
In Asp.Net, i am merging two images and saving the file. I am getting the
error "A generic error occurred in GDI+. " when i try to save the file.
Can any one, please give me the reason for it, i had also given the write
permission to the folder for aspnet user...
Thanx in advance... more >>
Drawing a string at the bottom of the immage with 5px offset
Posted by yosh NO[at]SPAM liquidzone.net at 11/19/2004 6:09:23 PM
How can i calculate where i should put my text if i want it at the bottom of a image?
i have gotten so far that i can write it at the top of the image with 5px offset but i dont really know
how to get the string drawn at the bottom on different images with different sizes and resolutions and so ... more >>
ThemeUI DrawThemeParentBackground
Posted by Nak at 11/19/2004 2:18:17 PM
Hi there,
I recently asked a question in the VB.NET newsgroup about resolving an
issue related to using the ThemeUI. If you draw a theme part without
calling DrawThemeParentBackground first you end up with a black border.
Now I am making a class that loads msstyles files and draws... more >>
Help please, up against a brick wall with GetBounds function!
Posted by DotNetJunkies User at 11/19/2004 6:35:07 AM
Hi, I’m having trouble with the GetBounds function of a GraphicsPath. See code below.
The first Arc’s Bounding rectangle is just plain wrong, it’s 106.0523 wide, it can’t be any wider than 100, because thats the size of the rectangle used to draw it!
The second Arc is correct and is ther... more >>
Article : Security Tools Part -- 1 (.Net FrameWork Tools Series)
Posted by Namratha Shah \(Nasha\) at 11/19/2004 4:22:35 AM
Hey Group,
Today we look in to creating software digital certificates but we take a
plunge in that we will look at certain aspects of Crytography.
Cryptography is about keys for encryption. These keys can be symmeteric or
asymmetric. When we say symmetric keys what we mean is that the same k... more >>
Saving an image to a stream
Posted by rnorthedge NO[at]SPAM hotmail.com at 11/19/2004 1:35:38 AM
Hello,
I am fairly new to GDI+ so forgive me if this is a simple question. I
have searched on the newsgroups and cannot find an answer.
In C# I am creating a new Bitmap object:
Bitmap oBannerImage = new Bitmap(610, 60);
Graphics oBannerGraphics = Graphics.FromImage(oBannerImage);
and ... more >>
convert 8bpp greyscale to 32bppARGB
Posted by Norvin Laudon at 11/18/2004 1:02:02 PM
Hi,
I'm trying to convert an 8bpp indexed greyscale image to a 32bpp ARGB image.
The steps I follow:
1. open 8bpp image using FromFile
2. create a new 32bppARGB image
3. get 32bpp Graphics using Graphics.FromImage
4. paint the 8bpp image onto the 32bpp using DrawImage.
My problem is the... more >>
Calculating real life width and height of a image
Posted by yosh NO[at]SPAM liquidzone.net at 11/18/2004 12:30:31 AM
How can i calculate the real life width and height of a image in mm or inch using
image.width, image.height and image.verticalresolution or something?
my values are always alittle off...
Math.Round(((25.4 * image.width) / image.verticalresolution))
where 25.4 is one inch in mm afaik
do... more >>
Mapping client to screen coordinates
Posted by atk at 11/17/2004 11:25:32 AM
Hello,
the application I am working on consists of a graphing UserControl and a
test Forms app. The user can plot points and connect them with lines on the
graphing surface of the control. The goal is to map those points'
coordinates to the X,Y coordinates of the mouse when it hovers over such... more >>
Drawing at highest z-layer???
Posted by jason NO[at]SPAM mailinator.com at 11/17/2004 6:29:51 AM
Hi --
I have a very simple question, the answer of which has eluded me for
quite some time: How can I draw at the topmost layer of forms and
controls from .NET (or from unmanaged code, that would be fine too)??
Any GDI+ drawing I've done only appears on the background of the
form/control/wh... more >>
Problem with ColorMatrix
Posted by monroe NO[at]SPAM ciudadparagon.com at 11/17/2004 4:25:19 AM
Hi all,
Ok, this is possibly a newbie question, but I'm kind of a newbie
anyway, so here it goes :)
I have a Bitmap I need to control through a ControlMatrix. I can
easily make changes to the brightness or contrast of the picture. If I
got it right, being X the elements I need to change, i... more >>
Can't save meta file
Posted by Amendra TheUltimate via .NET 247 at 11/17/2004 1:05:53 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 >>
Getting image information witout loading the image itself
Posted by yosh NO[at]SPAM liquidzone.net at 11/16/2004 4:38:24 AM
Can i get image information witout loading the image. since my images are quite big it takes a while
to load, and i just need to get the width, height and resolution of the image so i can calculate
the size in millimeters of the image with the formula: Math.Round(((25.4 * pixels) / resolution))
... more >>
Fastest possible way to load a image file?
Posted by yosh NO[at]SPAM liquidzone.net at 11/16/2004 4:34:20 AM
Hi, making a application that deals with 3 image files that are quite large. they are about 8000x8000px
in size, i have tryed to load them all into memory but i always get a out of memory exception
so i have given up on that idea... so now i have to load one image, process it and write the output
... more >>
DrawReversiblePoint?
Posted by Peder Y at 11/15/2004 8:11:59 PM
....is it possible to draw other things than recrangles and lines using
i.e. ControlPaint.DrawReversibleXX()? How could I draw a revsersible
bezier curve?
Thanks!
- Peder -... more >>
Retained mode drawing or controls?
Posted by Peder Y at 11/15/2004 7:32:08 PM
Hi!
What are the pros and cons for creating a drawing program with either
objects that draw themselves in a retained mode drawing system, or using
controls derived from Control? We are creating a quite extensive drawing
program and are wondering if one approach is better than another. A
"pa... more >>
Font Width
Posted by Andrea Piccinini at 11/15/2004 12:35:47 PM
Hello,
Can I get a character width whitout using MesureString?
Thanks,
Andrea
... more >>
simple writing problem to a picture
Posted by Patrick F at 11/15/2004 8:59:03 AM
Hi, 2 questions.
1)
I created a small picture in photoshop and now im trying to add some text
upon it with my .aspx program, here is the before i added the text(picture
from photoshop) and when i added the text with .aspx (c#):
http://www.pafo.net/view.gif
What can i do to make it look ... more >>
Request to Mr Bob Powell
Posted by Peder Y at 11/14/2004 9:13:43 PM
Hi Bob!
Would it be possible to get a copy of your newsletter articles? I don't
know if it was a pay-service or not, but in the latter case I'd really
like to read them. My email is pedery (at) ifi.uio.no. Thanks!
- Peder -... more >>
poor jpg quality
Posted by Kevin Marshall at 11/13/2004 10:43:43 PM
I am using the following code to create a thumbnail of a jpg image, its
works but the quality of the resulting image is not very good, if I do the
same thing in a graphics program like fireworks its much better, does anyone
know how to get .NET to make better quality images, it does not matter... more >>
iHTMLElementrender.drawtodc causes error in VB.net application
Posted by ddd at 11/13/2004 10:39:40 PM
Hi,
I am having problems with using the DrawToDC of the
MSHTML.iHTMLElementRender in a VB.net application. For some reason I am
getting a "catastrophic error". I am basing the code on c# examples, and I
am not sure what exactly I am doing wrong. From the C# posts it seems that
the drawtodc ha... more >>
Rotate 3D cube
Posted by Sam at 11/12/2004 12:57:49 PM
Hi All
I have a function that takes 4 arguments: a point coordinate (x,y,z), an
angle, and the other 2 arguments are point coordinate that define an
arbitrary axis. Does anyone know how to define the 2 points (or an
algorithm) that define the vector of the axis so that when I move my mouse
i... more >>
|