473,554 Members | 3,024 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 1282
> 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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP10.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****@theodon nells.plus.com> wrote in message
news:43******** **************@ ptn-nntp-reader02.plus.n et...
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******** ******@TK2MSFTN GP10.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
1143
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 it's overridden with no other information about it. Does this mean it allows reference to it, but it does nothing? In any case, it is good that...
0
1073
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 hidden Panel object renders itself as <br>. Not sure what is the purpose of it. But it ads extra line which is not acceptable. Is there another...
6
1069
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 where I can find documentation on how it does it? thanks
0
1026
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 front. While working is design view it will for some reason just be "sent to back". 2. Sometimes, after designing for over an hour or so, I notice that...
1
2105
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 through code to draw a line. But the line does not draw on the panel until I press either the Alt key or Tab key. Here is my code: Sub...
8
5341
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 this code there is a panel panel1, that I populate with a lable in the foreground. Then when I click on "button1" a backgroundworker thread in async...
5
1835
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, both admin panel and agent panel expires session and asks for re-login. What would be possible reason for this? Please anyone can help !!! ...
3
2483
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 and Chinese. All forms of my compiled C# desktop application, as well as in Visual Studio
162
10111
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 prefix them with 2 underscores, but I hate prefixing my vars, I'd rather add a keyword before it. Python advertises himself as a full OOP language,...
0
7584
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...
0
7512
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...
0
7783
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. ...
0
8023
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7879
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5144
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...
0
3548
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...
0
3536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2009
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 we have to send another system

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.