By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,990 Members | 2,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,990 IT Pros & Developers. It's quick & easy.

WS_EX_COMPOSITED in .NET

P: n/a
When using C, I can do something like :

CreateWindowEx(WS_EX_COMPOSITED,
cWindowClass, cTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

To make sure there is no "flickering" when the window is painted. Can I
do this with VB.NET, is so, how?

Thanks!

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Mitchell Vincent" <mv******@newsgroup.nospam> schrieb:
To make sure there is no "flickering" when the window is painted. Can I
do this with VB.NET, is so, how?


Extend your form's/control's constructor like this:

\\\
Public Sub New()
Me.SetStyle( _
ControlStyles.ResizeRedraw Or _
ControlStyles.DoubleBuffer Or _
ControlStyles.AllPaintingInWmPaint, _
True _
)
Me.UpdateStyles()
End Sub
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2

P: n/a
Herfried K. Wagner [MVP] wrote:
"Mitchell Vincent" <mv******@newsgroup.nospam> schrieb:
To make sure there is no "flickering" when the window is painted. Can
I do this with VB.NET, is so, how?

Extend your form's/control's constructor like this:

\\\
Public Sub New()
Me.SetStyle( _
ControlStyles.ResizeRedraw Or _
ControlStyles.DoubleBuffer Or _
ControlStyles.AllPaintingInWmPaint, _
True _
)
Me.UpdateStyles()
End Sub
///


Thanks!
--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #3

P: n/a
Herfried K. Wagner [MVP] wrote:
"Mitchell Vincent" <mv******@newsgroup.nospam> schrieb:
To make sure there is no "flickering" when the window is painted. Can
I do this with VB.NET, is so, how?

Extend your form's/control's constructor like this:

Another question. Since this apparently isn't done by default, what are
the downsides?

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #4

P: n/a
"Mitchell Vincent" <mv******@newsgroup.nospam> schrieb:
To make sure there is no "flickering" when the window is painted. Can I
do this with VB.NET, is so, how?


Extend your form's/control's constructor like this:


Another question. Since this apparently isn't done by default, what are
the downsides?


I assume that it's memory usage. Using double buffering will cause the
control to be drawn to an internal bitmap and this bitmap to be drawn onto
the control's surface.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.