473,320 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

WS_EX_COMPOSITED in .NET

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
4 4359
"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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
4
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, On a simple form, I have a ListBox control. This listbox control is loaded with around 800 text items of somewhat short length. There are also some other controls on the form, buttons. When...
11
by: Andrus | last post by:
1. Run code 2. Resize window Observed: Listbox flashes during resize. How to remove this flashing ? Andrus.
8
by: Rainer Queck | last post by:
Hello NG, I had/have a bad flicker Problem with my Application. On starting some applications, while my app was running, the whole Display started to flicker. Even the desktop Icons! Looking...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.