SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Guest

    How can I Get the text of a VB Application Status Bar?

    Hi,

    I'm trying to get the ''Static'' text of a VB app. status bar. I have noticed that the method GetText() does not work in this situation (with the VB application I mean). I have tried to use GetCaption(), but I have noticed that this method will only return the name of this object.
    I tried to use record actions, and then verify this Window, but Silk will only read the Caption of this Status Bar.

    Things that I have tried:
    1. MyVB5.StatusBar.GetText () // this method is not accepted in a VB application 4Test Language.
    Note: I have used this method with regular applications, but I found out that it doesn't work with VB applications.

    2. MyVB5.StatusBar.GetCaption ()

    Therefore, I was wandering if anyone else got any other suggestions .

    Thanks
    Naz.

  2. #2
    Junior Member
    Join Date
    Dec 2003
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How can I Get the text of a VB Application Status Bar?

    Try to use new class of VB status bar field with undocumented functions. I used code like this:

    [-] private winclass OLEStatusBarPanel : Control // undetectable dynamic text
    [ ]
    [ ] integer iPanelNumber //virtual
    [ ] integer iStartCharToRead = 1 //virtual
    [ ]
    [ ] unsupported builtin STRING AgentGetText (INTEGER iStartChar optional, INTEGER iNumChars optional)
    [ ]
    [-] hidecalls STRING GetText ( INTEGER iStartChar optional, INTEGER iNumChars optional )
    [ ]
    [ ] string sText = WindowParent ( this )._GetItemProp (
    ''Panels'', this.iPanelNumber, '''', ''Text'' )
    [+] if sText == null // this happens for first file loaded if cursor resides ouside draw area
    [ ]
    [ ] sText = '''' // because NULL can crash delicate routines
    [ ]
    [ ]
    [+] if iStartChar == null
    [ ] iStartChar = this.iStartCharToRead
    [ ]
    [ ] sText = SubStr ( sText, iStartChar, iNumChars )
    [ ] return ApplyY2KRules ( sText, ''GetText'' )
    [ ]

    Assign proper value for iPanelNumber for each definition of field on status bar.

    OLEStatusBarPanel Message
    const iPanelNumber = 1
    OLEStatusBarPanel CAPS
    const iPanelNumber = 2

    and so on.

    Good luck!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:27 AM.

Copyright BetaSoft Inc.