Results 1 to 2 of 2

Thread: Removing a control's border

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Location
    Fort Lauderdale, Florida
    Posts
    2

    Question

    The WebBroswer control that ships with Microsoft's Internet Controls library does not have a BorderStyle property (or something similar) that allows you to make the control flat and remove the border. I've been trying to figure out a way of doing this. Does anyone know how to remove the border from an existing window (such as the WebBroser control) using APIs (or using any other method)???

  2. #2
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    try this:
    Code:
    Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    
    Private Const GWL_STYLE = (-16)
    Private Const WS_BORDER = &H800000
    Private Const WS_VISIBLE = &H10000000
    
    
    Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
    
    Private Sub Command1_Click()
    Dim wndInfo As Long
    wndInfo = GetWindowLong(Command1.hwnd, GWL_STYLE)
    SetWindowLong Command1.hwnd, GWL_STYLE, wndInfo Xor WS_BORDER
    End Sub
    The hwnd prop of my WebBrowser control gave me an error, though
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

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