What lib has Status Bar?

Discussion in 'AutoCAD' started by Mark Propst, Jan 14, 2004.

  1. Mark Propst

    Mark Propst Guest

    Hi,
    This is a dumb question I know.
    (vb6)
    I wanted to try a sample I d'led that puts a progress bar in a status bar on
    a form.
    I added a form but can't find a status bar control. I assume it 's in some
    library I need to reference but how do I find what library's contain what
    controls? An hour in the msdn searching shows how to use a status bar but
    says nothing about where they live.
    Is there a search trick to list controls in all those libraries that show up
    in Project|references?
    If a person like me doesn't know where the control is, how do I go about
    finding it? (other than posting dumb questions like this one.)

    Thanks,
    the eternal newbie
     
    Mark Propst, Jan 14, 2004
    #1
  2. Mark Propst

    Mark Propst Guest

    maybe there isn't a control available?
    this is the only thing i can find in help about creating status bar.
    "You can create a status bar by using the CreateStatusWindow function or by
    using the CreateWindowEx function and specifying the STATUSCLASSNAME window
    class."
    etc.
    more research...back to f1
     
    Mark Propst, Jan 15, 2004
    #2
  3. Hola Mark.
    Go to "Components" and add "Microsoft Windows Common Controls 6.0 (sp4)"

    I believe it´s mscomctl.ocx but not "absolutely" sure about this
     
    Jorge Jimenez, Jan 15, 2004
    #3
  4. Mark Propst

    Mark Propst Guest

    Gracias Jorge!
    mio dice "Microsoft Windows Common Controls 6.0" (not sp4) maybe i'm due for
    an update?
    but anyway, there it is that little devil!
    So the bigger question is, how would I find that without you having helped
    me?
    isn't there a search function for controls in librarys? or were you just
    born with that knowledge?
    :)`
    Gracias otro vez
    Saludos
    Marcos
     
    Mark Propst, Jan 15, 2004
    #4
  5. Mark, I can´t remember all the details (long time ago)
    But one of the first things you have to do, when learning a language is to
    find out what tools your IDE is packing.
    So I remember loading each component, one by one, just to know where to find
    them and what was their main function.
    At the beginning I didn't care much about how to use them, just interested
    in knowning what they were for
    Knowing this, when you start a project you already have a pretty good idea
    about what to use.

    I believe some of these controls were updated in SP4 and others in SP5, but
    again, I'm not sure.

    --
    Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica


     
    Jorge Jimenez, Jan 15, 2004
    #5
  6. Mark Propst

    Mark Propst Guest

    Thanks again!
    Buenos noches.
    M
     
    Mark Propst, Jan 15, 2004
    #6
  7. Search for this "Creating a Common Control Status Bar - Overview" at http://vbnet.mvps.org/ hopefully it will help.
    Regards - Nathan
     
    Nathan Taylor, Jan 15, 2004
    #7
  8. Mark Propst

    developer Guest

    I happen to be using it in one of my apps. I don't know which one for sure, but it would have to be one of these four: Visual Basic For Applications, Visual Basic runtime objects and procedures, Visual Basic objects and procedures, or OLE Automation. I would bet on the latter, since the others are probably included by default. OLE Automation is the file STDOLE2.TLB
     
    developer, Jan 15, 2004
    #8
  9. Mark Propst

    Mark Propst Guest

    Thanks for the link Nathan,
    Trying the samples I'm getting the following error:


    Trying to run progress bar api sample
    code copied/pasted from: http://vbnet.mvps.org/
    "Creating a Common Control Progress Bar via API"

    I'm getting the following error



    this is in the form code:

    error highlights "PROGRESS_CLASS" in the following line:

    hProgBar = CreateWindowEx(0, PROGRESS_CLASS, vbNullString, _
    WS_CHILD Or WS_VISIBLE Or _
    IIf(Check1, PBS_SMOOTH, 0) Or _
    IIf(Check2, PBS_VERTICAL, 0), _
    0, 0, 0, 0, _
    hwnd, 0, _
    App.hInstance, ByVal 0)

    error text:"Compile error Variable not defined"

    although there is a bas module in the project with the following line:

    Public Const ICC_PROGRESS_CLASS As Long = &H20 'progress

    I noticed the diff between "ICC_PROGRESS_CLASS" and "PROGRESS_CLASS"

    but if I change
    hProgBar = CreateWindowEx(0, PROGRESS_CLASS, vbNullString, _
    WS_CHILD Or WS_VISIBLE Or _
    IIf(Check1, PBS_SMOOTH, 0) Or _
    IIf(Check2, PBS_VERTICAL, 0), _
    0, 0, 0, 0, _
    hwnd, 0, _
    App.hInstance, ByVal 0)
    to
    hProgBar = CreateWindowEx(0, ICC_PROGRESS_CLASS, vbNullString, _
    WS_CHILD Or WS_VISIBLE Or _
    IIf(Check1, PBS_SMOOTH, 0) Or _
    IIf(Check2, PBS_VERTICAL, 0), _
    0, 0, 0, 0, _
    hwnd, 0, _
    App.hInstance, ByVal 0)
    I get Ambiguous name detected error....

    what am I missing?

    tia
    Mark


    http://vbnet.mvps.org/ hopefully it will help.
     
    Mark Propst, Jan 15, 2004
    #9
  10. Sorry I can't help there Mark. I haven't actually tried anything with statusbars before.

    I have just right clicked in my Toolbox and selected Additional Controls which then lists:
    Microsoft StatusBar Control, version 5.0 (SP2)
    Location C:\WINNT\system32\comctl32.ocx
    &
    Microsoft StatusBar Control, version 6.0
    Location C:\WINNT\system32\MsComCtl.ocx

    Regards - Nathan
     
    Nathan Taylor, Jan 15, 2004
    #10
  11. Mark Propst

    Mark Propst Guest

    That's interesting,
    if i right click in the toolbox I get "Components" "Add tab" "Dockable" and
    "Hide" , no "Additional Controls"...do you have a special add in loaded?
     
    Mark Propst, Jan 15, 2004
    #11
  12. I was in VBA so I just went to VB5 and Components is the equivalent of Aditional Controls.
    Regards - Nathan
     
    Nathan Taylor, Jan 15, 2004
    #12
  13. Mark Propst

    Mark Propst Guest

    I should have known that!
    :)
     
    Mark Propst, Jan 19, 2004
    #13
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 (here). After that, you can post your question and our members will help you out.