473,396 Members | 1,917 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,396 software developers and data experts.

When minimized, 'Graphics' hides

Hello Everyone,

If this problem was already mentioned on this group, please forgive me
but I couldn't find it.

I've made a simple app to train using the class Graphics. The Form
property FormBorderStyle I've set as "None", then I've used class
Graphics to create some Elipses and Rectangles.
Also I've created Button to minimize window - with Event to this button
as:
{
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
}

When I run this and click on minimize button, it minimizes to task bar,
everything is ok, but when I click to show it again, all my Graphics
objects are hidden... I don't know what to do with it...

Thanks in advance,
V

Aug 22 '06 #1
1 1113
voytello wrote:
Hello Everyone,

If this problem was already mentioned on this group, please forgive me
but I couldn't find it.

I've made a simple app to train using the class Graphics. The Form
property FormBorderStyle I've set as "None", then I've used class
Graphics to create some Elipses and Rectangles.
Also I've created Button to minimize window - with Event to this button
as:
{
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
}

When I run this and click on minimize button, it minimizes to task bar,
everything is ok, but when I click to show it again, all my Graphics
objects are hidden... I don't know what to do with it...
When are you doing your drawing? If you just do it once, then the next
time the form is repainted (form restored, another window moved over
your form then moved away), your changes will be lost. The proper place
to do drawing is in the Paint event.

You might find <http://www.bobpowell.net/faqmain.htmuseful - note what
the #1 question is...
--
Larry Lard
la*******@googlemail.com
The address is real, but unread - please reply to the group
For VB and C# questions - tell us which version
Aug 22 '06 #2

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

Similar topics

0
by: Tai | last post by:
Hi all I have 2 forms, frmMain and frmChild. In frmMain, I declare a variable f as frmChid then Call f.ShowDialog() I want when the child form is minimized, the Main form is also minimized...
2
by: Tai | last post by:
Hi all I have 2 forms, frmMain and frmChild. In frmMain, I declare a variable f as frmChid then Call f.ShowDialog() I want when the child form is minimized, the Main form is also minimized...
1
by: Tai | last post by:
Hi all I have 2 forms, frmMain and frmChild. In frmMain, I declare a variable f as frmChid then Call f.ShowDialog() I want when the child form is minimized, the Main form is also minimized...
1
by: Novice | last post by:
I'm afraid I will incur the wraith of Mr. Powell on this one - but I did read his #1 FAQ and some others and I still can't figure this out. I created this little c# app. and I have a PictureBox...
2
by: Carsten Klotz | last post by:
Hi, does someone know, if it's possible capturing the content of a panel, when its form has state "minimized"? Details: A panel contains a Webbrowser object (AxSHDocVw.AxWebBrowser). My...
3
by: Don | last post by:
If you have a form that calls another form via the following code: Dim myForm as Form2 myForm = New Form2 myForm.Owner = Me MyForm.ShowDialog and you minimize the second form, the first form...
5
by: vooose | last post by:
Consider a Form with dimension Size=(300,300) that is then minimized. Subsequent calls to Size return (160,24). The Form is then restored and Size returns (300,300) Is there any property or...
2
by: tony | last post by:
Hello! I have a mainManu where I can chose to display some window forms. When the mainMenu is minimized I need to minimize every window form that is started from the mainMenu. So I need to...
3
by: shrestha.mahesh | last post by:
I have used System.Drawing.Graphics and Form.CreateGraphics to draw line in my form during runtime. Everything is working fine but when the form is minimized or some other windows are temporarily...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.