I create vb6 software to control external program since create from visual c++ how can i get state value of checkbox from external program.Please help me....
Printable View
I create vb6 software to control external program since create from visual c++ how can i get state value of checkbox from external program.Please help me....
How you obtain the CheckBox's hWnd is up to you...Code:Private Const BM_GETCHECK As Long = &HF0
Private Declare Function GetCheckValue Lib "user32.dll" Alias "SendMessageW" (ByVal hWnd As Long, Optional ByVal uMsg As Long = BM_GETCHECK, Optional ByVal wParam As Long, Optional ByVal lParam As Long) As CheckBoxConstants
'Sample usage
Select Case GetCheckValue(Check1.hWnd)
Case vbUnchecked:
Case vbChecked:
Case vbGrayed:
End Select
I leave it up to you to supply the CheckBox's hWnd...Code:Private Const BM_SETCHECK As Long = &HF1
Private Declare Function SetCheckValue Lib "user32.dll" Alias "SendMessageW" (ByVal hWnd As Long, Optional ByVal uMsg As Long = BM_SETCHECK, Optional ByVal Value As CheckBoxConstants = vbUnchecked, Optional ByVal lParam As Long) As Long
'Sample usage
SetCheckValue Check1.hWnd, , vbUnchecked 'Skip 2nd parameter
SetCheckValue Check1.hWnd, , vbChecked 'Ignore last parameter
SetCheckValue Check1.hWnd, , vbGrayed 'Choose only from the values presented
rino is right he is double posting , no patience ?
I want to control .Net external program by vb6.Please help me to get checkbox value form external program.Thk:duck:
Triple threads merged.
One thread for one topic posted in one forum section is the rule.
Do not create another thread on this topic.
Why not respond to some of the suggestions already made?