473,801 Members | 2,386 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.WindowStat e = System.Windows. Forms.FormWindo wState.Minimize d;
}

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 1129
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.WindowStat e = System.Windows. Forms.FormWindo wState.Minimize d;
}

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.n et/faqmain.htmusef ul - note what
the #1 question is...
--
Larry Lard
la*******@googl email.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
1404
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 automatically. I tried some way to call frmMain.WindowState = FormWindowState.Minimized. The result is my 2 forms are minimized but the side effect is the Child form is gone. Dim f As New frmChild f.ShowDialog()
2
2599
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 automatically. I tried some way to call frmMain.WindowState = FormWindowState.Minimized. The result is my 2 forms are minimized but the side effect is the Child form is gone. Dim f As New frmChild f.ShowDialog()
1
2112
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 automatically. I tried some way to call frmMain.WindowState = FormWindowState.Minimized. The result is my 2 forms are minimized but the side effect is the Child form is gone. Dim f As New frmChild f.ShowDialog()
1
3647
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 in my Form. I load this image from the filesystem into the PictureBox and then I draw random little lines on the image. Then when I minimize and reopen the application the little lines are gone. Is there a way to save my lines in memory and...
2
2734
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 actual application automatically navigates to some websites, makes a screenshot and transforms them into small thumbnails. At the moment I'm using the imported function BitBlt from gdi32.dll. This solutions only works, if the
3
5438
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 remains visible (albeit completely disabled).
5
4323
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 method that returns the size of the form when restored? (so you can obtain the "real" size of the Form when it is minimized) Regards
2
5086
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 catch the event that is trigged when the little underscore(the minimize icon) up to the right is clicked. I need to catch this event because all my child window forms must also be minimized
3
2005
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 placed on top of the form, the lines disappear. Any help will be very much appreciated.
0
9697
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9555
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10515
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9100
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7589
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6827
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5479
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3771
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2956
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.