CodeItBetter Programming Another VB Programming Blog

How to Check and uncheck check box through code

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
'System & API - How to Check and uncheck check box through code
Private Const BM_SETCHECK = &HF1&
Private Const BST_UNCHECKED = &H0&
Private Const BST_CHECKED = &H1&
Private Const BST_INDETERMINATE = &H2&
 
Private Sub Command1_Click()
    x = FindWindow("#32770", vbNullString)
    Button = FindWindowEx(x, 0&, "button", "New")
 
    Call SendMessageLong(Button, BM_SETCHECK, BST_UNCHECKED, 0&)
End Sub

Related posts:

  1. How to keep your form always on bottom
  2. How to open a folder in explorer in particular folder view
  3. How to Show/Hide the Start Button from the task bar
  4. How to close the child windows in an external application.
  5. How to check which option button is selected in a group of option buttons with one line of code
  6. Check & Terminate Process using Window Title
  7. How to add CheckBox to ComboBox
  8. How to visually click Command button through code
  9. How to check the window state of an external application
  10. How to set Option Button and Check Box Style Property At run time

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.