Help with updating STATUSSTRIP element from MOD procedure

3 posts, 0 answers
  1. John
    John avatar
    1 posts
    Member since:
    Jun 2008

    Posted 26 Nov 2008 Link to this post

    I have a STATUSSTRIP placed on a form called DESKTOP, which is always ON TOP and present.  This form calls and runs everything in my VB.NET application, and happens to be the STARTUP form.  I call an PROC which is one of my MODULES instead of CLASS.  This PROC happens to run for a long time.  I would like for the PROC to post an update to the STATUSSTRIP located on my DESKTOP form (calling form) using the STATUSSTRIPLABEL.VALUE1 and STATUSSTRIPLABEL.TEXT properties.  How would I accomplish this?

    I tried using DESKTOP.STATUSSTRIP.TEXT = "Something..." and it would not work from my SUB.  Basically, my code would look like this on the FORM side.

    PRIVATE SUB DESKTOP_ONLOAD() HANDLES FORM_LOAD

        ....
        Call gsDoSomething
        ...
        
        ME.STATUSSTRIPLABEL.TEXT = "Ready..."
        
    END SUB

    The PROC being called will live in a MODULESOMETHING.VB file in my project and its code will resemble...

    PUBLIC SUB gsDoSomething()

        ....
        DESKTOP.STATUSSTRIPLABEL.TEXT = "Doing something..."
        ...

    END SUB

    Any help or suggestion would be greatly appreciated.
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 26 Nov 2008 Link to this post

    Hi,

    I am sending you a modified version of my previous sample. In this sample I pass as an argument the Desktop form instance to the PROC containing the long-running operation.

    Hope this helps.

    Sincerely yours,
    Peter
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. sayyed mahdi khadishi
    sayyed mahdi khadishi avatar
    5 posts
    Member since:
    Sep 2009

    Posted 04 Sep 2009 Link to this post

    hi
    it's very bad that i should run Application.DoEvents() for ever change Text
    standard statusbar don't need it.
    good luck
Back to Top