ReadOnly Property

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 8 years and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
nirmalks
Posts: 38
Last visit: Tue Mar 26, 2024 6:28 pm

Re: ReadOnly Property

Post 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
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: ReadOnly Property

Post 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.
User avatar
nirmalks
Posts: 38
Last visit: Tue Mar 26, 2024 6:28 pm

Re: ReadOnly Property

Post 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
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: ReadOnly Property

Post by jvierra »

What are you doing that causes flickering?
User avatar
nirmalks
Posts: 38
Last visit: Tue Mar 26, 2024 6:28 pm

Re: ReadOnly Property

Post 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
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: ReadOnly Property

Post by jvierra »

I have never heard of that. It must be your code causing that.
This topic is 8 years and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked