473,473 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

OnPaint() works differently between 2K and XP? (post again)

Hi,

I wrote a progam, which pop up a form that with OnPaint() overrided. It
works great in XP but bad in 2K. In 2K, most of the form content will not
be displayed until I drag the form a little. And I set a breakpoint to the
OnPaint... The breakpoint was hit when the form popuped... But if I shrink
the VS.NET to make it can't overlap with the popup form, the form content is
still not displayed after the OnPaint() returned. If I move the form a
little, the content will be displayed all right even without the former
breakpoint reached.

I tried that in both .NET framework 1.1 and 1.0.

Is that a bug of .NET framework in Windows 2K? How can I avoid this
problem?

And I wrote a small test program
http://weixiang.nease.net/data/TestOnPaint.rar

Thank you very much,
Wei Xiang

Nov 15 '05 #1
1 1127
Could anyone help me?

"weixiang" <am**@sh163.net> wrote in message
news:un**************@tk2msftngp13.phx.gbl...
Hi,

I wrote a progam, which pop up a form that with OnPaint() overrided. It
works great in XP but bad in 2K. In 2K, most of the form content will not
be displayed until I drag the form a little. And I set a breakpoint to the OnPaint... The breakpoint was hit when the form popuped... But if I shrink the VS.NET to make it can't overlap with the popup form, the form content is still not displayed after the OnPaint() returned. If I move the form a
little, the content will be displayed all right even without the former
breakpoint reached.

I tried that in both .NET framework 1.1 and 1.0.

Is that a bug of .NET framework in Windows 2K? How can I avoid this
problem?

And I wrote a small test program
http://weixiang.nease.net/data/TestOnPaint.rar

Thank you very much,
Wei Xiang

Nov 15 '05 #2

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

Similar topics

5
by: DraguVaso | last post by:
Hi, I have my custom Inherited DataGrid. I override the OnPaint-event to speed up things and avoid flikkering using Double Buffering. To draw the normal things of the DataGrid I have to call the...
11
by: Sagaert Johan | last post by:
I have made a custom control that draws a rectangle when the mouse is down, and does nothing when the mouse is up. I set/reset a flag in MouseDown/Mouse up and use this to do the drawing in the...
5
by: weixiang | last post by:
Hi, I wrote a progam, which pop up a form that with OnPaint() overrided. It works great in XP but bad in 2K. In 2K, most of the form content will not be displayed until I drag the form a...
5
by: Ron Vecchi | last post by:
I have a custyom control that has a property which wraps a collection. When I add controls to the collection the OnPaint method of these newly added controls never get fired. But if I take the...
4
by: | last post by:
Please, help. I created my contol, ButtonX, which subclasses System.Forms.Windows.Button class. I am doing my own paiting, by overriding OnPaint and OnPaintBackground (without calling base...
3
by: Colin McGuire | last post by:
Hi, I am just learning "how-to" by reading some of the existing article solutions in this newsgroup. I happened to come across this one. Tom Spink knows what he is talking about and I am wondering...
20
by: BB | last post by:
Hello all, I am trying to override OnPaint in a custom textbox control (so I can drawstring a caption, etc.). In the code below, I get the "painting the form" message as expected, but not the...
4
by: grayaii | last post by:
Hi, I have a simple form that handles all its paint functionality like so: this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); And the entry point to this...
14
by: raylopez99 | last post by:
KeyDown won't work KeyPress fails KeyDown not seen inspired by a poster here:http://tinyurl.com/62d97l I found some interesting stuff, which I reproduce below for newbies like me. The main...
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
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
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.