473,503 Members | 3,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is the way a picurebox draws itself different from how a panel does it

I have a usercontrol that contains two pictureboxes

One is on top of the other.

The bottom one is the parent of the top one.

The top one is transparent.

I invalidate the top one often

I don't need all the bells and whistles of a picturebox so I change the top
one to a panel

Now when I invalidate I get much flashing.

Is there something about the way a picurebox draws itself that is different
from how a panel does it?

Can I fix the panel?

Even if I can, does it make more sense to use the picturebox?

Thanks in advance
Feb 2 '06 #1
3 1271
> Is there something about the way a picurebox draws itself that is
different from how a panel does it?
Considering your experience, I would say that is the logical conclusion.
(IOW, yes)
Can I fix the panel?
Yes, but -
Even if I can, does it make more sense to use the picturebox?
Yes, it does.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

" **Developer**" <RE*************@a-znet.com> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl...I have a usercontrol that contains two pictureboxes

One is on top of the other.

The bottom one is the parent of the top one.

The top one is transparent.

I invalidate the top one often

I don't need all the bells and whistles of a picturebox so I change the
top one to a panel

Now when I invalidate I get much flashing.

Is there something about the way a picurebox draws itself that is
different from how a panel does it?

Can I fix the panel?

Even if I can, does it make more sense to use the picturebox?

Thanks in advance

Feb 2 '06 #2
I think the picture box uses a technique called double-buffering which uses
more memory when drawing but provides the ability to have a faster rate of
draw. This is set as a property on the control so you may be able to set it
on the panel. If you cant, you can set it on your user control.

HTH

Ciaran
" **Developer**" <RE*************@a-znet.com> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl...
I have a usercontrol that contains two pictureboxes

One is on top of the other.

The bottom one is the parent of the top one.

The top one is transparent.

I invalidate the top one often

I don't need all the bells and whistles of a picturebox so I change the
top one to a panel

Now when I invalidate I get much flashing.

Is there something about the way a picurebox draws itself that is
different from how a panel does it?

Can I fix the panel?

Even if I can, does it make more sense to use the picturebox?

Thanks in advance

Feb 2 '06 #3
Thanks, I'll try that
"Ciaran" <ci****@theodonnells.plus.com> wrote in message
news:43**********************@ptn-nntp-reader02.plus.net...
I think the picture box uses a technique called double-buffering which uses
more memory when drawing but provides the ability to have a faster rate of
draw. This is set as a property on the control so you may be able to set it
on the panel. If you cant, you can set it on your user control.

HTH

Ciaran
" **Developer**" <RE*************@a-znet.com> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl...
I have a usercontrol that contains two pictureboxes

One is on top of the other.

The bottom one is the parent of the top one.

The top one is transparent.

I invalidate the top one often

I don't need all the bells and whistles of a picturebox so I change the
top one to a panel

Now when I invalidate I get much flashing.

Is there something about the way a picurebox draws itself that is
different from how a panel does it?

Can I fix the panel?

Even if I can, does it make more sense to use the picturebox?

Thanks in advance


Feb 3 '06 #4

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

Similar topics

1
1139
by: Peter Oliphant | last post by:
A Panel does not have a caption, and so doesn't really need a Text property. Yet, it does have this property. Furthermore, on-line MSDN says it is 'overridden'. The 'detail' of this also just says...
0
1067
by: George Ter-Saakov | last post by:
I have a composite control. Which has 2 parts. Under some conditions first part must be shown sometimes another. So naturally I used 2 Panel object. And hide one of them. The problem is that...
6
1062
by: Brian Henry | last post by:
This is a little off topic, but does anyone know where I can find information on how windows draws forms and dialogs on screen? I know it depends on 2D hardware, and GDI/GDI+. Does anyone know...
0
1025
by: Monty | last post by:
Does anyone else have the following 2 problems? 1. I have placed a button (but it could just as easily be a textbox or an image over a panel and set the format of the button to Order/Bring to...
1
2102
by: Rich | last post by:
Hello, I have a form with a panel which contains a radiobutton. When I click the radiobutton, I invoke the Paint event of the panel using me.Invalidate. The paint event gets called and runs...
8
5334
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
5
1831
by: simon | last post by:
well i have admin panel and agent panel. when i open admin panel and log in it works fine. but when agent opens agent panel in different pc and login and acts something like open a page or so,...
3
2479
by: Ryan Liu | last post by:
Hi, I have a big urgent problem to solve. I used to use Windows 2000 Chinese version, now I installed Windows XP (English) system. The problem is not about 2000 or XP, it is about English...
162
10062
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
0
7192
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
7261
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
7315
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...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7445
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
5559
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
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
369
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.