|
I think this code is meant to reduce flicker for user-painted graphics. If you're just putting controls onto the tabpage and seeing flickering whenever you move/resize, this code won't help you at all, and might actually slow you down.
You might just have too many controls, which leads to too much layout logic. I would suggest trying to limit the number of controls and nested containers. For instance, putting panels inside panels inside panels, each with their own anchors, docks, and layout engines, will really slow you down whenever you resize.
|
|
|
|
|
In the 2.0 Framework there was a lot of work incorporating Double Buffering into the framework. For the form that holds the flickering control, try adding this at initialization time:
this.SetStyle( ControlStyles.OptimizedDoubleBuffer );
this.SetStyle( ControlStyles.AllPaintingInWmPaint );
These two settings go hand-in-hand. Also when loading controls on the tab,
this.TabControl.SuspendLayout();
LoadControl(TabControl);
this.TabControl.ResumeLayout();
|
|
|
|
|
hi ,
i can not find a method called LoadControl()
thanx
Generator
|
|
|
|
|
That was just shorthand in the example. That is where you are loading the controls into the new tab. Basically you suspend layout, load the controls, resumelayout and then the TabControl displays the controls all at once. Did you ever look at the Window Generated code for a form??? Look at it. This is what is standard code when a design-time-generated form is populated. Look at the code as an example and follow it.
|
|
|
|
|
hi ,
ok i looked at the generated code but i use setstyle before and no change on tab just change on form
so what can i do explain please
"Iam sorry but i didnot get the point"
Generator
-- modified at 3:35 Saturday 5th May, 2007
Generator
|
|
|
|
|
hi all,
first thanx for ur help
second a friend to me solve our problem of double buffered
as follows
class customTabPage : TabPage
{
customTabPage():base()
{
this.DoubleBuffered = true;
}
}
Generator
|
|
|
|
|
I need to get the serial number of a thumb drive that contains a specific file. Then, I need to make sure the serial number in the file is the same as the device's. Then, I need to check periodically that the device is still there, and that the serials still match.
Anyone want to help me figure this out? Boss wants me to get this done yesterday.
|
|
|
|
|
simplicitylabs wrote: Boss wants me to get this done yesterday
I think that is an unrealistic expectation.
|
|
|
|
|
You mean, time travel isn't really possible??? Who's going to explain that to my boss??
|
|
|
|
|
Dilbert. Is that you?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
simplicitylabs wrote: You mean, time travel isn't really possible??? Who's going to explain that to my
Have a look at this link[^]. The article is about Retrieving Non-Volatile USB Serial Number.
|
|
|
|
|
I go for the deadpan joke and it is the two follow ups the get the votes. Nice!
I suppose that type of joke doesn't work well on a forum.
|
|
|
|
|
Have a pair of 3s. 5 for humor averaged with a 1 for begging.
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
|
My apologies for the begging. A desperate man will do most anything to accomplish his mission.
It did, however, fuel a rather humorous exchange.
How's this: I have seen most of what I am looking for out and about, but not everything I need. If there is an example out there somewhere of using a USB thumb drive for a software key, I would appreciate the pointer.
Thanks.
|
|
|
|
|
I was teasing Colin for begging to get a 5 vote, not you.
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
|
|
I have used datagrid control,but I don't want others copy my data from datagrid cells,and I want these cells look like the label control, user only can see ,but can't copy! sorry for my poor english
|
|
|
|
|
|
hello!
hope you all are doing fine! i was just wondering if there is any way to get the process id of an application, from within an application! like i want to know what PID is assigned to the application when it is executed! if the application is executed multiple times, each instance displays its own PID! any solution for that??
Thanx in advance! !
Adeel
--
|
|
|
|
|
System.Diagnostics.Process.GetCurrentProcess().Id will return to you the PID of your application instance
|
|
|
|
|
Hi,
I have 2 forms. In the first form I declare a array :
public string[] Name_Menues = new string[10];
Name_Menues[1] = "Mareya" ;
Name_Menues[2] = "Mareya1";
Name_Menues[3] = "Mareya2";
Now I wana to show the value of this array in form2
messagebox.show(Name_Menues[1]);
But when I run it there is some problem and i think i use a wrong code.
please say what should I do??????
|
|
|
|
|
Alireza3839 wrote: But when I run it there is some problem
What exactly is "some problem"? It's hard to say what's wrong without any kind of error message.
If the array was not available in that scope, the code would not even compile, so you would not be able to run it at all. What are you doing to make the array available in the second form? Are you passing the array along in any way, or are you just creating another array with the same name, hoping that it would become the same array?
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: or are you just creating another array with the same name, hoping that it would become the same array?
You are so used to this, ain't you
|
|
|
|