473,528 Members | 2,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

gdi drawing

Hi, i have a gdi drawing program that on a mouse move event, if the left
mouse button is pushed then draw a line...very simple. only problem is that
if anything goes over my drawing surface or i minimize the form, my graphics
go away...how can i prevent this or save my graphics from going away?
--
-iwdu15
Nov 23 '05 #1
3 1126
iwdu15 wrote:
Hi, i have a gdi drawing program that on a mouse move event, if the left
mouse button is pushed then draw a line...very simple. only problem is that
if anything goes over my drawing surface or i minimize the form, my graphics
go away...how can i prevent this or save my graphics from going away?


You could save the drawing to a bitmap. Do a <Favorite Search Engine>
search for examples how to do this. One example can be found here.

http://www.experts-exchange.com/Prog..._20850641.html

Chris
Nov 23 '05 #2
i tried that, but then once i revert back from the bitmap, i cant erase
anything that was in the bitmap
--
-iwdu15
Nov 23 '05 #3
Dear iwdu15,

Don't know if it will help you, but have a look at:
http://www.bobpowell.net/picturebox.htm
Also note that bobpowell's page has a lot more on gdi+ (it is a great
site!), so have a look at the rest too.

Michel van den Berg
"iwdu15" <iw****@discussions.microsoft.com> schreef in bericht
news:3A**********************************@microsof t.com...
i tried that, but then once i revert back from the bitmap, i cant erase
anything that was in the bitmap
--
-iwdu15

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2744
by: Tomi Holger Engdahl | last post by:
I am looking for a solution to add on-line drawing tool to a phpBB discussion board. The idea would be that the users can draw their own simple drawings with the tool and attach them easily as images in the discussion. The idea is to easily add small drawings to the postings. The drawign tool should be easy to use and learn. It should...
2
12295
by: Champika Nirosh | last post by:
Hi, I want to create drawing board application that can draw Line, rectagle, circle and free hand drawing. Each drawing need to be transparent, moveable (draggable), have bring to front and send to back feature etc. How can I do this .. where should I start?
1
3213
by: Hadar | last post by:
Hi, I'm getting "object is currently in use elsewhere" when I use System.Drawing.Graphics.MesureString. This is what I do: My controls use a utility class the helps it to mesure strings. To get the best performance for the utility class, its members, as well as the System.Drawing.Graphics object, are static:
7
8689
by: Marc Pelletier | last post by:
Hello all, I have a class which includes a method to create a chart. I want to be able to call this method from asp.net code as well as windows application code, so I have sketched it out as returning a bitmap instance. In my asp.net code I think I should call this method to return a bitmap and then somehow stream it using the response...
2
6677
by: active | last post by:
I find Bitmap.Save works for WMF files but Bitmap.FromFile does not. If I use FromFile on a WMF file that came with VS I get an exception. If I use it on a WMF file created with Bitmap.Save I don't get an exception but it appears the Bitmap is blank. Can anyone share some knowledge on this?
3
2597
by: Chris Saunders | last post by:
I am fairly new to .Net and C# but am familiar with the Win32 API. I wish to set the pixels of the client area of a window one at a time with a specific color. I have so far discovered that System.Drawing.Bitmap has a SetPixel() method but I can't seem to find out how to have the bitmap displayed. I would actually like to have the pixels...
5
3346
by: Jerry J | last post by:
I want to use the System.Drawing.Image class. According to the help file, this is an abstract base class. Because it is supposedly abstract, I created another class that inherits from it. However, when I did this I got the following error: 'System.Drawing.Image.Image()' is inaccessible due to its protection level Looking at other online...
1
3938
by: YouPoP | last post by:
I am doing an app (C# 2.0) where you can draw in a panel with your mouse in "real time". I actually have 2 problems; 1- it does not really is "real time", if your mouse move fast or very fast the line is added after a very small delay. 2-Because I use AddLine(), it adds very short lines from one point to another and it does not give a very good...
2
2313
by: ThatsIT.net.au | last post by:
I have this code that writes a pie chart in a asp.net page, but I want to use it in a server control. When I try I get a error on the last line "Response.OutputStream" Obviously there is no response object but how do I write it to screen? Dim objBitmap As New System.Drawing.Bitmap(400, 440) Dim objGraphics As System.Drawing.Graphics...
7
3544
by: raylopez99 | last post by:
I have a logical drawing space much bigger than the viewport (the screen) and I'd like to center the viewport (the screen) to be at the center of the logical drawing space. After following the excellent transforms specified on Bob Powell's site, I still wonder if there's an easier way of centering it than the following procedure? Here is...
0
7329
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7254
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7483
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7655
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7238
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
1708
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
893
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
555
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.