[size=2][color=#0000ff]Private[/color][/size][size=2] components [/size][size=2][color=#0000ff]As[/color][/size][size=2] Container
[/size][size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Declare[/color][/size][size=2][color=#0000ff]Function[/color][/size][size=2] GetWindowLong [/size][size=2][color=#0000ff]Lib[/color][/size][size=2] "user32" [/size][size=2][color=#0000ff]Alias[/color][/size][size=2] "GetWindowLongA" ([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] hwnd [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] nIndex [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2]) [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size]
[size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Declare[/color][/size][size=2][color=#0000ff]Function[/color][/size][size=2] SetWindowLong [/size][size=2][color=#0000ff]Lib[/color][/size][size=2] "user32" [/size][size=2][color=#0000ff]Alias[/color][/size][size=2] "SetWindowLongA" ([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] hwnd [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] nIndex [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] dwNewLong [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2]) [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size]
[size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Declare[/color][/size][size=2][color=#0000ff]Function[/color][/size][size=2] SetWindowPos [/size][size=2][color=#0000ff]Lib[/color][/size][size=2] "user32" ([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] hwnd [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] hWndInsertAfter [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] x [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] y [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] cx [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] cy [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] wFlags [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size][size=2]) [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Long[/color][/size]
[size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] WS_THICKFRAME = &H40000
[/size][size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] GWL_STYLE = (-16)
[/size][size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] SWP_NOZORDER = &H4
[/size][size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] SWP_NOSIZE = &H1
[/size][size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] SWP_NOMOVE = &H2
[/size][size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] SWP_FRAMECHANGED = &H20 [/size][size=2][color=#008000]' The frame changed: send WM_NCCALCSIZE[/color][/size]
[size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] SWP_DRAWFRAME = SWP_FRAMECHANGED
[/size]
Private Sub windows_forms_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load[indent]Dim window_style As Long window_style = GetWindowLong(PictureBox2.Handle.ToInt32, WL_STYLE)
window_style = window_style Or WS_THICKFRAME
SetWindowLong(PictureBox2.Handle.ToInt32, GWL_STYLE, window_style)
SetWindowPos(PictureBox2.Handle.ToInt32, Me.Handle.ToInt32, 0, 0, 0, 0, SWP_NOZORDER Or SWP_NOSIZE Or SWP_NOMOVE Or SWP_DRAWFRAME)
[/indent] End Sub