all groups > dotnet drawing api > december 2003
Filter by week: 1 2 3 4 5
trouble creating an image from an array of bytes
Posted by NP at 12/31/2003 5:47:41 PM
I am trying to create an image from an array of bytes stored in a
base64binary dataset field and I keep getting the same error: System
argument exception. Invalid parameter used.
The field definitely contains an image because it is obtained from an image
file and placed into the database.
The e... more >>
Learning to place graphics
Posted by Gary Morris at 12/30/2003 9:25:03 PM
Happy New Year!
Just recently, I tried my hand at some GDI+, starting
slowly, and I'm having some trouble now. I tried just a
few drawings in a window, and some other stuff, which
wasn't too hard, but now I'm wanting to create a program
that will allow me to:
1) Select a button from a too... more >>
Loosing graphics reference
Posted by Crirus at 12/30/2003 6:16:26 PM
I have a bitmap and a graphics object wraped on it
When I use MakeTransparent on the bitmap, the graphics object dont draw on
it anymore.. I have to recreate the graphics from the bitmap.
Anyone can explain this?
Thank, Crirus
... more >>
GDI+ in a ASP.NET custom control
Posted by Gerben van Loon at 12/29/2003 8:30:35 PM
Hi,
Hope someone can help me on this. I like to make an own ASP.NET charting
control, so I need to render some graphics in a custom made control. I
already found this example:
protected override void Render(HtmlTextWriter output)
{
Bitmap objBitmap = new Bitmap(200,200);
Graphics ... more >>
Jagged icons in VB.NET Imagelist? ARGH!
Posted by Moogy at 12/29/2003 6:23:33 PM
Every time I load a nice-looking Windows XP Icon into my VB.NET Imagelist,
it turns out ugly and jagged around the edges. I believe this is from the
Alpha pixels being mapped to mask pixels instead of keeping their alpha
transparency value.
The ImageList is 32bbp with a size of 16x16.
So, ... more >>
Screen Grab of Application
Posted by James Hancock at 12/29/2003 4:53:26 PM
How would I go about getting a screen grab of my entire application (it's
parent form) programatically without using the Clipboard?
Thanks!
James Hancock
... more >>
Graphics and Sockets
Posted by Sueffel at 12/29/2003 4:29:38 PM
T2theSwgdGhpcyBpcyBraW5kYSBhIHNvY2tldHMgaXNzdWUgSSdtIHN1cmUsIGJ1dCBpdCBvbmx5
IGhhcyBwcm9ibGVtcyB3aXRoIGdyYXBoaWNzLiAgQmFzaWNhbGx5LCBJJ20gYnVpbGRpbmcgYSBw
cm94eSBzZXJ2ZXIsIGFuZCBldmVyeXRoaW5nIHBhc3NlcyB0aHJvdWdoIGV4Y2VwdCBncmFwaGlj
cy4gIEknbSBiZWluZyByZXR1cm5lZCB0aGUgc3RhbmRhcmQgQnl0ZSBhcnJheSwgYW... more >>
How do you increase the nonclient area to support a border in a UserControl
Posted by Paul at 12/29/2003 4:01:15 PM
I am mainly learning and wanted to develop a simple control - like the panel control, but want to make custom borders. Now the easy way is to simply use the controlpaint.drawborder, but this draws in the user area and not the non-client area, thus not giving the same effect as Microsofts panel cont... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Wrap a GraphicsPath around a square draw area
Posted by Crirus at 12/29/2003 10:49:59 AM
Hello
I have a square area to draw on...
I have a GraphicsPath that define the region of clipping so the draw occur
only on that region
The region is one or more circles
The problem I'm facing with is drawing a wraped region...
I can have one circle falling outside one side of the drawing su... more >>
Unespected behaviour of graphicsPath
Posted by Crirus at 12/29/2003 10:33:28 AM
Hi!
I just made a test on graphicsPath
I added 3 circles to a GraphicsPath and filled with one color into a panel
paint event..
What I noticed is that the overlapped part of 2 circles is not filled as it
is not inside the path...
How can I add multiple closed figures as circles to a GP a... more >>
Wrong alignment print printdocument
Posted by Frederik Vanderhaegen at 12/29/2003 10:07:32 AM
Hi,
Does anyone knows how to fix following problem:
I've created a printpreview with the printpreview control.
This looks perfect but the printresult is different from the preview.
I tested the program with a HP Deskjet 895CXI (win xp) and a HP Laserjet 4L
(win2k) and on those two printer... more >>
How to spell the word 'GIF', 'gif' or 'jif' ?
Posted by Shao Yong at 12/29/2003 9:25:33 AM
DrawImage Strange srcRect
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 12/29/2003 7:31:31 AM
Hi,
It seems that nobody talk about this problem before. So
it may be a problem of mine.
When I use the void Graphics.DrawImage(Image image,
Rectangle destRect,
Rectangle srcRect,
GraphicsUnit srcUnit
);
if the size of the srcRect is different from the destRect
I must reduce ... more >>
Copy a form's Paint Event
Posted by james at 12/28/2003 8:12:13 PM
I hope I can explain this right. I found some VB.NET code (converted from a
C# program) that uses Windows Image Aquisition to scan images from an
attached scanner. It only works in Windows 2000 and XP.
The code copies the bits from the scanner to an array and then overrides the
form's paint eve... more >>
Use GDI+ on the Web
Posted by O_awwad at 12/28/2003 8:54:22 AM
can i use GDI+ to draw a line ( for example ) on a web
page ( or a web form ) ?
thanks for any help
telbana2@yahoo.com... more >>
About resize bitmap problem
Posted by billgay_hk NO[at]SPAM yahoo.com.hk at 12/28/2003 12:18:01 AM
I want to resize bitmap use old bitmap coordinate using C#
for example.
i want to get old bitmap (25,25) to (100,100) this rectangle to place
on the new bitmap
then return the new bitmap.
is it possible to do it?
Any one can help me?
thx... more >>
How can I report a bug to MS?
Posted by A at 12/27/2003 4:40:08 PM
I think what I am encountering is a bug, how can I report
it to Microsoft?
The problem is here:
Intersect method of a Region means to update the region
data with its intersection with another Region,
GraphicsPath, Rectangle, or RectangleF. If the second
object is totally inside the reg... more >>
Constructing a clip region from points inside the region
Posted by Crirus at 12/27/2003 3:45:54 PM
I have all points that are inside a region
But they are a lots of points there... how to convert them to a region as
GraphicsPath that can be shrinked to a graphicsPath points and types..I need
the smallest string that reflect the region
--
Cheers,
Crirus
--------------------------... more >>
Bug in DrawReversibleFrame ?
Posted by phoenix at 12/26/2003 2:55:51 PM
Hello,
I'm having trouble to get the 2nd parameter of DrawReversibleFrame
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html
/frlrfsystemwindowsformscontrolpaintclassdrawreversibleframetopic.asp)
working. When setting that color most of the times it doesn't use the ri... more >>
Another Drag & Drop Question
Posted by mustafashabib NO[at]SPAM hotmail.com at 12/26/2003 2:28:46 AM
Hi All!
I am implementing drag and drop for a PictureBox control in my
application. Basically, on the mousedown event for my control I do
something along these lines (what follows is just the essential stuff,
oh and I'm using c#):
DragDropEffects myEffect =
myPictureBox.DoDragDrop((Bitmap)... more >>
How to store images in a dataset
Posted by db at 12/24/2003 4:33:13 PM
How can I store images in a dataset? I have a column 'Thumbnail' with object
as datatype, but how do I store the images there?
db
... more >>
Scaling Images In Polygon
Posted by pratush NO[at]SPAM indiatimes.com at 12/24/2003 1:36:08 AM
hi.
I am a bit new to graphics programing. I am trying in vb.net to make a
3 walled structure which'll give the look of 3d. for that purpose, I
am using same rectangle filled with textured brush for 3 walls. For
the center wall rectangle is to be drawn as is. For the side walls,I
need a prespec... more >>
Windows 98SE .Net printing Problems
Posted by jnogravity NO[at]SPAM yahoo.com at 12/23/2003 9:39:03 PM
Hello.
I created a VB.Net (framework version 1.1) application that runs on
Win 98, 98SE and XP. The problem is that printing does not work on
98SE with the HP Deskjet 1120c printer. The print preview and print
both cause what seems to be an OS error message indicating that the
application cau... more >>
Graphics region
Posted by Crirus at 12/23/2003 2:11:37 PM
I need a easy way to store in the most compressed format a graphic path
formed from multiple circles
That is, eventualy, a string... I need that string to be converted back to a
graphics path later...
Any thoughts?
--
Cheers,
Crirus
------------------------------
If work were a g... more >>
Negative Rectangles
Posted by Matt Budd at 12/23/2003 12:16:39 PM
Hello all..
I am trying to figure out why I can't fill a rectangle that has negative
height/width, but I can with an ellipse:
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics loGraphics = e.Graphics;
RectangleF loNegRect = new RectangleF(50, 50, -40, -40);
lo... more >>
Image to byte array
Posted by Dirk Huber at 12/22/2003 1:34:58 AM
Hi,
i load an image and manipulate it. How can i get it to an
byte array to store it to a blob field of a database?
Thank you!
Dirk... more >>
Add rectangle regions to image
Posted by Dirk Huber at 12/22/2003 1:21:45 AM
Hi,
in VB.NET i am looking for the possibility to increase
size of an bitmap by adding white regions e.g. on top and
bottom.
(I load an image having 400x300 Px from file and want to
add white stripes to change size to 400x400 Px.)
Thank you!
Dirk... more >>
Reduce bit depth
Posted by Andrew at 12/19/2003 2:24:51 PM
Hello,
I'm developing an application that produces some images in black and white,
but my code creates a 32 bit image. From what I've read the Graphics object
will only draw on 32 bit images. However, once I'm done drawing on the
bitmap I would like to reduce this to 1 bit before saving.
... more >>
Transparent Label
Posted by Scott Eguires at 12/19/2003 8:33:00 AM
I have a form that I am drawing text onto in the top left
corner. The problem is when I drop a label or even a
button and make the background color transparent it shows
the text that I have drawn in the label even if the label
is somewhere else on the screen. It appears it draws the
back... more >>
Parser Error
Posted by Gss at 12/19/2003 7:18:24 AM
Hai Everybody,
I faced the following error when i browse my web
application in windows xp.
Parser Error Message: The type initializer
for "System.Drawing.SafeNativeMethods" threw an exception.
Source Error:
Line 140:
<asp:datagrid id="DGCompanyList" tabIndex="1"
Width="95%... more >>
Drawing question
Posted by Raju Shrestha at 12/19/2003 5:45:46 AM
When I draw a line on a control (say a Panel) using Graphics's
DrawLine(new Pen(Color.Red, 1), x1, y1, x2, y2) method, it draws the
line with Red color erasing the previously drawn shape(s) along the line
on the Panel.
I want to draw the line such that the drawing color on a particula pixel... more >>
unhandled exception system.drawing.dll
Posted by stevebugdenlondon NO[at]SPAM hotmail.com at 12/19/2003 2:19:50 AM
Hi All,
When running the following code:
'************************************************
Dim ColorDB As New ColorDialog()
ColorDB.ShowDialog(Me)
'************************************************
I sometimes (roughly half of the time) get the following
error:
**********************... more >>
Convert Int Array to Image
Posted by Robert at 12/18/2003 6:58:36 PM
I have a 2d array of integers and would like to 1)
convert this to an RGB image; and 2) convert this to a
Grayscale image; that has as many pixels as the size of
the array and in an arbitrary format. Does anyone know
have any examples of how to do this?
Thanks.... more >>
How make a better compression of Gif image output?
Posted by Shao Yong at 12/18/2003 3:38:25 PM
I use the Bitmap.Save method to save a bitmap image as Gif format. I found
the size of the file is more larger than the image after saved by ACDSee
without quality lost.
How to perform the gif image optimization.
... more >>
VB.NET Mapping Control
Posted by Schooner at 12/18/2003 11:17:20 AM
Looking for a mapping control to allow plotting of lat long points and doing
various zooms and pans for a given region.
... more >>
How to get RECT or DC of context menu ?
Posted by Yuri O. at 12/17/2003 9:56:59 PM
Hi
I'm wondering whether is existing any working way of
getting real metrics about the active ContextMenu.
For example ContextMenu(.net) expose window handler
which I tried to use in GetWindowRect call - failed result;
Next i tried to get its DC - failed result too.
Finally I tried to get so... more >>
DrawString with heading and trailing spaces!
Posted by Christian Lammel at 12/17/2003 5:47:24 PM
Hi (again),
i (still) try to draw a string with heading and trailing spaces with an
underlined font.
Font font = new Font("Tahoma", 8, FontStyle.Underline,
GraphicsUnit.Point );
g.DrawString( " A B ", font, textBrush, 0, 0, format );
but it seems that the function cuts the spaces away. But... more >>
DrawImage and paint problem
Posted by decrypted at 12/17/2003 5:11:56 PM
I am writting a scanning module into an application that allows for
cropping. I built a custom select box that draws as you mousdown+mousemove
(just like the windws explorer drag select effect). To draw the box itself,
I am using a graphics object taken from my Picturebox and calling
g.drawrecta... more >>
Drawing performance with doublebuffering;
Posted by whoami2001ca NO[at]SPAM yahoo.ca at 12/17/2003 11:06:50 AM
Hello.
I am exploring .NET programming using C# and GDI+. My end program is
going to be a vector drawing program (similiar to Adobe Illustrator,
although not that complex). I've started learning about GDI+, and it
seems to have all the functions I want (alpha, gradients, beziers,
antialiasing... more >>
Need to draw rectangle to desktop or MDIparent at least
Posted by Shukri at 12/17/2003 3:25:12 AM
I have a MDI application - I want to be able to drag
MDIchildren around in the MDIparent, but for the dragging
process, I want to draw an outline rectangle of the
MDIchild form, and move the outline around, not the
MDIchild form itself. The MDIchild's location will be set
to where the outl... more >>
Problem with InvokePaint location
Posted by Chris Goodwin at 12/17/2003 3:24:40 AM
I'm trying to print a form by raising the InvokePaint
method for the controls on the form. The problem is all
controls print at the location 0,0 (ie the top left
corner of the form). To test what was happening I created
a form containing a checkbox, a picturebox and a button.
I placed the ... more >>
graphics to clipboard
Posted by Bob Henry at 12/16/2003 5:29:39 PM
Hi
In VisualBasic.net 2003, I have drawn graphics to a picturebox using
drawline etc... I now want to put that in the clipboard. I think I have to
convert it to a bitmap file first, but I can't figure out how to do that or
do something more direct. Any help?
... more >>
Error Fill[Item] alpha to Ppea.Graphics
Posted by Ross Bennett at 12/16/2003 4:37:13 PM
Ahoy, Folks!
I've been trying to track down a problem we've been having with rendering a
semi-opaque rectangle in the Graphics object within a PagePrintEventArg
parameter that is presented to us in the PagePrintEventHandler we've
written.
It's difficult to determine the extent of the proble... more >>
Overlaying a Translucent string on an existing image
Posted by M K at 12/16/2003 4:00:32 PM
I have a web site that allows users to view images. Since the images are
higher quality (not our best images) we want to prevent users from getting a
clean copy. So I adapted some code to overlay the word Copyright on the
image, before it is streamed out to the user. This works, but the string is... more >>
Gray edges on PNG image
Posted by Guogang at 12/16/2003 2:33:55 PM
I am using GDI+ to save a PNG image to stream and send to client's IE.
PNG image should have the same quality as BMP. But, I find that there is
light gray edge on PNG image shown in IE. Other than that, the image is the
same as bitmap image. If I save the same image to stream as BMP image, then... more >>
how to keep the drawing on picturebox when new drawing is added?VB.Net
Posted by MJ at 12/16/2003 11:10:35 AM
i have form1 and form2, form1 has a picturebox which i
already drew something on it(e.g. rectangle)
i active form2 to chose another shape to add below the
rect, after form2 closed, the new shape should be added
below the rect and the rect should be remained in its
original position on the p... more >>
Overflow or underflow in the arithmetic operation when showing form
Posted by Codemonkey at 12/16/2003 10:03:32 AM
Hi,
When I first installed Visual Studio 2003, I noticed I was getting the
following error when showing a form:
A first chance exception of type 'System.ArithmeticException' occurred in
system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation
It is bei... more >>
PixelFormat for double buffering
Posted by Crirus at 12/16/2003 8:13:05 AM
I use a bitmap as double buffer to draw a big control
I'm wandering wich pixel format will help me to speed up the drawings .. I
dont use many colors, because I save the images used in best compresion jpeg
mode that Photosop knows
--
Cheers,
Crirus
------------------------------
If ... more >>
.NET printing problems - migrating to GDI?
Posted by G.V. at 12/16/2003 12:35:16 AM
Hello Gurus :),
We have a .NET desktop application which runs on various win98/ME/2000/XP
computers with various printers.
..NET printing seems to be very unstable, and stability on Win 98/ME
platforms is at unacceptable level.
On Win 98/ME printing or print preview crashes on a wide range of... more >>
Double Buffering To Stop Control Flicker
Posted by banderbe NO[at]SPAM yahoo.com at 12/15/2003 11:51:36 PM
I have a form on which I've placed a TabControl which contains two
TabPages. When I resize my application, the TabControl flickers.
I've read a number of posts that say to stop this you should derive
from the control in question, in this case TabControl, and in your new
sub-class, call SetSty... more >>
|