473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

keep the graphics

jin
Sorry, is there any way that after we draw some line or graphics on the
windows form, after the windows minimized, the line and graphics won't
dissappear?

I'm appreciate for any reply, thank you
Nov 17 '05 #1
3 1006
Jin,

When paint something on the form, the form doesn't remember what you
painted. Rather, when it needs to, the form repaints itself at regular
intervals.

What you need to do is store the information about where the line should
be drawn on your form. Then, call the Invalidate method on your form. When
you do that, it will cause a repaint. Then, from your form, you would
override the OnPaint method or sign up for the Paint event. Then, in these
methods, you would paint the line on your form according to the information
you stored.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"jin" <ji*@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
Sorry, is there any way that after we draw some line or graphics on the
windows form, after the windows minimized, the line and graphics won't
dissappear?

I'm appreciate for any reply, thank you

Nov 17 '05 #2
Check out the GDI+ FAQ.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"jin" <ji*@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
Sorry, is there any way that after we draw some line or graphics on the
windows form, after the windows minimized, the line and graphics won't
dissappear?

I'm appreciate for any reply, thank you

Nov 17 '05 #3
I've done this before (with MFC but still applies here) by overriding
the OnPaint method, and blit a bitmap to the screen. If the user had
changed any of the application data i would need to re-render the
bitmap before letting OnPaint display it (instead it just showed a
rendering message). Bitmaps are a good way of caching if the drawing
process is intensive.

Hope this helps

Chris

Nov 17 '05 #4

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

Similar topics

12
by: Sanjay | last post by:
hi, We are currently porting our project from VB6 to VB .NET. Earlier we used to make scale transformations on objects like pictureBox , forms etc.Now Such transformations are made on the...
14
by: Pmb | last post by:
At the moment I'm using Borland's C++ (http://www.borland.com/products/downloads/download_cbuilder.html#) I want to be able to take an array of points and plot them on the screen. Is there a way...
5
by: Arthur Hsu | last post by:
Hello, I have an ImageButton that refers to an external image. How can I keep that image's aspect ratio when I set the ImageButton's size to 120x120? TIA, Arthur
1
by: Peter Morris [Droopy eyes software] | last post by:
Hi all In my login form (forms authentication) I check that the login is valid, retrieve an "Author" object, and keep track of the author's roles. string roles; if (author.IsAdministrator)...
5
by: Charles A. Lackman | last post by:
Hello, I have created a complete PrintDocument and need to create an image from it. How is this done? e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality...
6
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
12
by: Xah Lee | last post by:
Of Interest: Introduction to 3D Graphics Programing http://xahlee.org/3d/index.html Currently, this introduction introduces you to the graphics format of Mathematica, and two Java Applet...
11
by: cty0000 | last post by:
I have some quiestion... I want to draw line,point,rectangles and etc... on the from So I code like this.. public update() { g = this.CreateGraphics(); g.FillRectangle(Brushes.White, x1,...
8
by: Abhiraj Chauhan | last post by:
I need someone to make an example of how to create a graphics window in VB.net 2008. I understand the basics of how to draw a rectangle and lines etc. What I need is an example of how to make a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.