How to improve scrolling performance ?

O

Oberfuhrer

Hello all VB.net friends !

i have done most of my programming in assembly, at least so far. Recently i
decided to learn a high level language for windows programming. I didnt take
long to realize that VB.net would be my perfect friend.

I have already rewritten most of my assembly controls in VB, but i am not
satiesfied with the scrolling performance, though.

In assembler, where you can write directly to the video memory, this
is a trivial task. Of course, to copy in video memory nowadays, you
just need to send a command to the video card, and there we go.

The only problem is that such commands are well hidden in a driver,
and a simple assembly programmer are usually not given the secret
details to do this stuff on his own.

It seems to me that the windows graphics object (GDI) more or less
has the same performance as my assembly routines, that is, bytes are
copied from system memory to video memory.

in particular i have written a list control, which displays data in
rows and columns. Each row has a collection of cell objects, which
live their own life, with their own set of properties; backcolor,
forecolor, font etc.

I have been thinking for a while how to implement fast scrolling
for this list and similar controls, and indeed the performance may
be improved by clever programming.

For instance, to hide a textline in assembler, i simply give
each pixel in the font the same backcolor as the control.
This method is of course much, much faster than the straight
forward approach where you just overwrite all pixels in a rectangle
covering the text. I tried this is windows, but the performance
was too slow...

I am very eager to have other programmers tips and suggestions
on how to implement fast scrolling in Vb.net, in particular
text and picture scrolling, where you have to move all scanlines..



Nice day !
Walther
 
C

Carlos J. Quintero [VB MVP]

Hi,

I don´t know the answer, but you can increase the chances of getting one
posting also in these newsgroups which are related to your question, since
it is not really a VB.NET question:

microsoft.public.dotnet.framework.drawing
microsoft.public.dotnet.framework.windowsforms
microsoft.public.dotnet.framework.windowsforms.controls

Also, posting in a non "dotnet" newsgroup related to graphics can help, and
once you know the techniques, tips, etc. you can adapt them to .NET or keep
then in Win32 APIs.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top