开发者

What is the output of SSCheck.Value in VB6?

I have third party control SSCheck which I found recently not supporting in m开发者_运维问答y project. Maybe its DLL or OCX is corrupt or deleted. I didn't get the exact cause of that problem. Now my question is:

Which built-in control can I used to replace the SSCheck control? Maybe the answer is CheckBox. If CheckBox is the answer, then please suggest me the output for SSCheck.Value so I can adjust code accordingly.


The SSCheck control is a checkbox intended as a replacement or enhancement for the standard CheckBox control in the VB6 toolbox. It was provided as part of the Sheridan SSControls as threed32.ocx, which is no longer supported. I assume this is why you're running into problems with it.

You're correct in thinking that the best solution is simply to replace these third party controls in your application with standard controls. Particularly in the case of SSCheck, it should be a very straightforward, almost drop-in replacement.

The Value property of the SSCheck control is a Boolean type, meaning it takes either "True" or "False" as indicators of its checked state. However, the Value property of the standard CheckBox control takes one of the following Integer values:

0    (vbUnchecked)
1    (vbChecked)
2    (vbGrayed)

which you can set either at run-time in your code (in which case, it's probably preferred that you use the provided VB constants), or at design-time in the Properties Window.

So the only thing you'll have to do is make sure that you change anywhere in your code where you set SSCheck.Value to use an Integer (or one of the pre-defined constants) value, rather than a Boolean value. For example, instead of this:

SSCheck1.Value = True
SSCheck2.Value = False

you would have this:

RegularCheck1.Value = vbChecked
RegularCheck2.Value = vbUnchecked

You will notice that the standard checkbox control looks just a little bit different than SSCheck when it is checked. SSCheck draws the check as a little X, unlike the standard Windows controls, which use an actual checkmark:

What is the output of SSCheck.Value in VB6?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜