原文自http://bbs.csdn.net/topics/20421621。
PrivateDeclareFunctionGetWindowLongLib"user32"Alias"GetWindowLongA"(ByValhWndAsLong,ByValnIndexAsLong)AsLong
PrivateDeclareFunctionSetWindowLongLib"user32"Alias"SetWindowLongA"(ByValhWndAsLong,ByValnIndexAsLong,ByValdwNewLongAsLong)AsLong
PrivateConstGWL_STYLE=(-16)
PrivateConstBS_LEFTAsLong=&H100&
PrivateSubForm_Load()
DimTempLngAsLong
TempLng=GetWindowLong(Command1.hWnd,GWL_STYLE)
TempLng=TempLngOrBS_LEFT
SetWindowLongCommand1.hWnd,GWL_STYLE,TempLng
EndSub