Advertisement
C_Volume2 Windows API Call/ Explanation #80331

Make a Sizeable Control

This code allows you to make a non-sizeable control in VB 6.0, to a sizeable control.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Public Sub SetControlResize(X As Control, Y As Form)
  Dim style As Long
 
 'get the current style attributes for the control
  style = GetWindowLong(X.hwnd, GWL_STYLE)
 
 'modify the style to show the sizing frame
  style = style Or WS_THICKFRAME
 
 'set the control to the chosen style
 If style Then
  Call SetWindowLong(X.hwnd, GWL_STYLE, style)
  Call SetWindowPos(X.hwnd, Y.hwnd, 0, 0, 0, 0, SWP_FLAGS)
 End If
End Sub
Original Comments (3)
Recovered from Wayback Machine