Page 2 of 2

Re: ReadOnly Property

Posted: Thu Mar 17, 2016 5:39 am
by nirmalks
Hi there!

Now I'm able to reduce flickering for most of the controls on the form, but somehow DoubleBuffered property doesn't work for Combobox and Treeview controls.

I've been reading over Internet and came across this code:

protected override CreateParams CreateParams {
get {
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
return cp;
}
}

How do I use above code in PowerShell or Is there any way to set DoubleBuffered property for individual controls on a form?

Thank You,
Nirmal

Re: ReadOnly Property

Posted: Thu Mar 17, 2016 5:55 am
by jvierra
DoubleBuffered is set on the form and inherited by al controls that support it.

The code you have posted shows how to customize this in user controls inherited from controls that support the option.

Re: ReadOnly Property

Posted: Thu Mar 17, 2016 6:51 am
by nirmalks
Yes, you're right, but I can't stop flickering on controls like Combobox and Treeview.

Is there any way to stop flickering for these specific controls?

Thanks again!
Nirmal

Re: ReadOnly Property

Posted: Thu Mar 17, 2016 7:08 am
by jvierra
What are you doing that causes flickering?

Re: ReadOnly Property

Posted: Thu Mar 17, 2016 8:02 am
by nirmalks
Here are two things that are really bothering me:

- When I select a node in Treeview, it flickers
- When I hover mouse over Combobox, it filckers.

It looks like these controls are sending some messages to the system or they refreshes itself.

Thanks,
Nirmal

Re: ReadOnly Property

Posted: Thu Mar 17, 2016 8:36 am
by jvierra
I have never heard of that. It must be your code causing that.