473,654 Members | 3,074 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 1289
> 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
1144
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 it does have this property, since I wrote a RadioButton 'holder' with GroupBox and needed to create...
0
1076
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 control which when hidden is HIDDEN and does not render anything.
6
1073
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
1028
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 when I have selected an object, like a panel or really just anything, the properties with not...
1
2114
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 rad_Click(...)handles... Me.Invalidate()
8
5352
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 mode is started. When the backgoundworker thread completes the thread returns a panel to populate...
5
1838
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 !!! platform: OS: windows 2000 server, IIS 6.0 Script : ASP, Javascript
3
2491
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
10216
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, but why does it miss one of the basic principles of OOP? Will it ever be added to python?
0
8376
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
8815
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
8708
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8489
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7307
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
6161
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
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
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
2
1596
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.