UdoG
asked on
Automatic Triple State Checkbox
How can i get a Automatic Triple State Checkbox in VB 5
Changing the Style with SendMessage(ChkBox.hWnd,BM _SETSTYLE, BS_AUTO3ST ATE,1) will not work in VB 5
Changing the Style with SendMessage(ChkBox.hWnd,BM
ASKER
I knew that i can change the value per code.
I want the 3 states change automatic by clicking on the checkbox.
I want the 3 states change automatic by clicking on the checkbox.
That won't work as the CLICK event is disable when the box is greyed. If you try to do something like:
sub Check1_Click()
temp = check1.value
temp = temp + 1
check1.value = temp mod 3
end sub
It'll crap out when temp = 2 as the CLICK event stops firing.
sub Check1_Click()
temp = check1.value
temp = temp + 1
check1.value = temp mod 3
end sub
It'll crap out when temp = 2 as the CLICK event stops firing.
ASKER
With this code i create a newer ending loop.
Because the line check.value = x send the click event again
Because the line check.value = x send the click event again
Like I said, it ain't gonna work 'cause there's no way out once it's *GREYED*!
ASKER
OK, but this won´t help me.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Check1.Value = vbUnchecked ' 0
Check1.Value = vbChecked ' 1
Check1.Value = vbGrayed ' 2
I hope this is what you want.