Consulting

Page 3 of 3 FirstFirst 1 2 3
Results 41 to 52 of 52

Thread: Solved: Custom Floating Menu Bar

  1. #41
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    You don't need an API to get screen resolution. You can use ...

    System.HorizontalResolution and
    System.VerticalResolution
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  2. #42
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    I like the idea of using a fraction of the screen though - I never thought of that
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  3. #43
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    If you want the "tall" toolbar, as per Tony's example, add MyBar.Width = 40 as the last line in the macro, otherwise it gets reset when buttons are added

  4. #44
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Having opened some of my UserForms on an 800 x 600 display, I knew I had to find a flexible solution!

  5. #45
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Incidentally, toolbar settings are user-level, held in the registry - you can't control their location by template, except by using code to position them at document new or document open.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  6. #46
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    That's when we're implementing the toolbars, Tony.

    I don't know how to change MD's code to *not* be an API call though.
    ~Anne Troy

  7. #47
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    I never noticed your previous post Tony; I must look into these System items, I searched the help for ages to find the API method. I would go with Tony's Version and delete the API
    [VBA]
    With Mybar
    .Top = System.VerticalResolution * 0.3
    .Left = System.HorizontalResolution * 0.3
    End With
    [/VBA]

  8. #48
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Sweet. 0.2 was perfect
    ~Anne Troy

  9. #49
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Interested to see the "final product"! Will you email me a copy please.
    MD

  10. #50
    VBAX Regular
    Joined
    Sep 2004
    Posts
    65
    Location
    Grits 'n Sals

    I must admit that when I began my project the traditional Toolbar was easier for me than to learn than creating commandbars in code. But I was just wondering if their was an advantage of creating them in code, given that mine a templates operating in Word as distinct from a VB program using Application.Word

  11. #51
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    I just know that when they're NOT built using code, people complain "the toolbar doesn't go with the template" and "the toolbar is left after I close the doc" and stuff like that. I have just always understood that building toolbars in code is much more stable.

    MD, I didn't see your post before, sorry. Sending.
    ~Anne Troy

  12. #52
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Looks good DB!

Posting Permissions

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