How to improve scrolling performance ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oberfuhrer

    #1

    How to improve scrolling performance ?

    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


  • Carlos J. Quintero [VB MVP]

    #2
    Re: How to improve scrolling performance ?

    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.publi c.dotnet.framew ork.drawing
    microsoft.publi c.dotnet.framew ork.windowsform s
    microsoft.publi c.dotnet.framew ork.windowsform s.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:
    MZ-Tools has a single goal: To make your everyday programming life easier. As an add-in to several Integrated Development Environment (IDEs) from Microsoft, MZ-Tools adds new menus and toolbars to them that provide many new productivity features.



    "Oberfuhrer " <henricxyz@yaho o.no> escribió en el mensaje
    news:I8KdnWWp_Y ZlfNfeRVnzvA@te lenor.com...[color=blue]
    > 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
    >
    >[/color]


    Comment

    Working...