Hello all,
Im using below code to change the command button icon at run time. When the form is loaded button's icon will be showing but again icon will disappear when focus is changed to other controls on the form. Icon will be shown whenever focus is on that button.
Is there any other way to set button icon at runtime??
Thanks in advance
Private Const GWL_STYLE& = (-16)
Private Const Graphical_Style As Long = (1409351691)
Private Sub Form_Load()
Dim lWindowStyle As Long
lWindowStyle = SetWindowLong(Command2.hwnd, GWL_STYLE, Graphical_Style)
Command2.Picture = LoadPicture("D:\Icons\Po.ico")
End Sub