Results 1 to 4 of 4

Thread: Using VB6 for Application

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    9

    Question

    I'm using VB6 for Application with MS Word.

    The BorderStyle property offers only 2 types
    And I want to create a FixedToolWindow which I can't find in VBA...

    How could I extend BorderStyle property in my VBA ?

    Thanks

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't think you can do it with the MS Forms 2.0 library. If you try adding a reference to your VB5/VB6 object libraries, you might be able to do it that way. Other than that, you're going to need to create the window specifically.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    9
    What object library should I add to find it ?

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Erm...not sure. Try using SetWindowLong:
    Code:
    Dim hWnd As Long
    Private Sub UserForm_Initialize()
        On Error Resume Next
        hWnd = FindWindow("ThunderDFrame", "UserForm1")
        SetWindowLong hWnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW
        Me.hide
        Me.Show
    End Sub
    This seems to work, but I get an 'Object variable or With block not set' error when the window is closed.
    Oh well, to use it, set "UserForm1" to the caption of your window.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

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



Click Here to Expand Forum to Full Width