Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 25th, 2005, 07:47 PM
vnt vnt is offline
Registered User
 
Join Date: May 2005
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





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





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