Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 25th, 2005, 07:47 PM
vnt vnt is offline
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Graphic disapeared

Hi all,

I have the following code:

private void DrawLine(int pNumber, string pLabel)
{
FontStyle Style = FontStyle.Regular;
Font Arial = new Font(new FontFamily("Arial"), 9, Style);
Graphics Graph = this.CreateGraphics();
SolidBrush Brush = new SolidBrush(Color.Blue);
Pen MyPen = new Pen(Color.LightBlue);

Graphics Graphics = this.CreateGraphics();
Graphics.DrawString(pLabel, lArial, Brush, mXOffset, mYOffSet + 2);
Graphics.DrawRectangle(MyPen, mXOffset, mYOffSet, mWidthText, mHeigh);
// ....
}

When use these to draw something in a Form. They are ok (visible)
but when i minimize and maximize, all graphics disapeared.

Why is that? is that b/c they are created in a local function?


Thank you
Trevor
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphic Validation chemi J2EE 0 January 3rd, 2006 01:00 PM
CSS Graphic Linking Neo-MatrixX CSS Cascading Style Sheets 1 October 5th, 2005 07:50 AM
div is disapeared when go to other page then back alyeng2000 Javascript 3 February 13th, 2004 02:51 PM
How to interpret a graphic ? faridahhani BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 June 19th, 2003 04:39 AM
graphic to text faridahhani C# 0 June 19th, 2003 03:36 AM



All times are GMT -4. The time now is 06:34 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.