473,406 Members | 2,705 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,406 software developers and data experts.

Lines disappear when minimizing or other windows are placed on top of it.

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.

Aug 22 '06 #1
3 1976
Instead of using CreateGraphics, try handling the Paint event and using the
Graphics member of the PaintEventArgs. Then do your drawing there. That way
your lines will be redrawn anytime the Form is repainted.

Tony

"sh*************@gmail.com" wrote:
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.

Aug 22 '06 #2

sh*************@gmail.com wrote:
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.
For additional information, please see the following link:

http://www.bobpowell.net/faqmain.htm

Be sure to check out question #1

Aug 23 '06 #3
Thank a lot for the both responses. Form.Paint event solved the
problem.
Chris Dunaway wrote:
sh*************@gmail.com wrote:
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.

For additional information, please see the following link:

http://www.bobpowell.net/faqmain.htm

Be sure to check out question #1
Aug 23 '06 #4

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

Similar topics

1
by: Bil Click | last post by:
I am coding classic ASP pages in Visual Studio .Net 2003. I have a file called counties_option.asp that just has a list of options: <OPTION VALUE="030">ANSON</OPTION> <OPTION...
11
by: Galen Somerville | last post by:
In my opinion, one of the worst failures of Net (VB2005 Pro) was not providing an XOR line draw feature, as in VB6. A major feature of my app is allowing the user to draw Markers (vertical...
1
by: EnjoyNews | last post by:
Hi I have a little problem with java ajax... On my site I have a google adsence placed in a list. After the first 10 records it shows a adsence commecial. But.. on my search page I use Ajax...
6
by: ebasshead | last post by:
Hi Everybody, Firstly thank you for all the help this site has given me over the past year in getting my database to hum, its been awesome. I'm currently building an itemised invoice report to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...
0
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...

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.