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

Home Posts Topics Members FAQ

Cant understand this...

I have a peculiar problem,

I have a tabpage with a label control on it. When i set a background
image to the tabpage and drag the label around it has paint issues in
that it is slow, granted the image i am using is 5mb!!! HOWEVER...

I have inherited the tabpage created an Image reference in it, and
overrriden the onPaint method to draw the image

now if i press a button that sets the background image of the control
and drag it works really slow, however if i then set the backimage to
null and set my own image reference IT works FINE!!! No issues even a
5MB image. If i just set my own internal image first it isnt smooth
however setting it after the backimage ON/OFF does cause it to work.
However i cant set and unset the background image in code as that
does not make it work properly it has to happen in that order and via
a button etc. Could it be something todo with focus????

Could someone explain to me why this is happening? As i am unable to
understand what is happening, and a solution to my problem?
Thanks!!!!!!!!
Below is the code to my tabpage
public class TabWork : TabPage
{

public Image imagex;

public TabWork()
{

}

protected override void OnPaint(PaintEventArgs e)
{
if(imagex!=null)
{
e.Graphics.DrawImageUnscaled(imagex, 0, 0, imagex.Width,
imagex.Height);
} base.OnPaint (e);
}

protected override void OnPaintBackground(PaintEventArgs pevent)
{
base.OnPaintBackground (pevent);
}
}
Nov 15 '05 #1
0 1095

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

Similar topics

7
by: William.Zhang | last post by:
the following code: template <class T> class test{ typedef T::XXX x; }; int main(){ return 0; }
6
by: Klaas | last post by:
I want the backgrond of my whole page in gradient. In the source tab I have: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> </head>
6
by: ancelotp | last post by:
hi, i'm new to sql i'd appretiate if someone would helpme out with this doudt i have CODE: CREATE TABLE entry ( uno int(6) NOT NULL auto_increment, fname varchar(30) NOT NULL, sname...
1
by: erotikaboi | last post by:
Guys, Firstly let me say I am a photographer so if you can offer me a solution I will really appreciate it in simple english not techiespeak as I wont understand it. Thanks. Ok, I am using Access...
3
H0kage
by: H0kage | last post by:
Hello everyone got an assignment for college where i cant find the way to make JDeveloper to understand where the words are separated.This What The Assignment Asks.Any Tip or example to help me...
17
by: so many sites so little time | last post by:
all right so the script is pretty simple it goes it retrives what the id of the post is and it lets you edit it well no it doesnt. now if you go to www.kirewire.com/pp2/index/php you will see a...
8
by: Jim Florence | last post by:
Hi, I've just add a couple of dropdowns to my ASP form, set up a sqldatasource and bound to the dropdown and it all works great. I want the first item of the dropdown to be blank soa fter...
1
by: figaro | last post by:
Hi All, I have developed an application in .net, now the thing is I have to display the data on a report. I thought of using a crystal report. Here I understand that I have to add Crystal...
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
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,...
1
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
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?

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.