ces
Nov 13th, 2000, 09:33 AM
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)???
gwdash
Nov 16th, 2000, 08:52 PM
try this:
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