Click here to Skip to main content
15,898,222 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to check System DSN name is present ? Pin
adpatel441-Jul-11 2:19
adpatel441-Jul-11 2:19 
GeneralRe: How to check System DSN name is present ? Pin
Dave Kreskowiak1-Jul-11 3:23
mveDave Kreskowiak1-Jul-11 3:23 
QuestionRs232 Pin
Mangore7518-Dec-08 2:16
Mangore7518-Dec-08 2:16 
AnswerRe: Rs232 Pin
Ashfield18-Dec-08 3:46
Ashfield18-Dec-08 3:46 
AnswerRe: Rs232 Pin
Dave Kreskowiak18-Dec-08 3:53
mveDave Kreskowiak18-Dec-08 3:53 
GeneralRe: Rs232 Pin
Mangore7518-Dec-08 18:50
Mangore7518-Dec-08 18:50 
GeneralRe: Rs232 Pin
Dave Kreskowiak19-Dec-08 1:20
mveDave Kreskowiak19-Dec-08 1:20 
QuestionSendMessage not working for CheckBox Pin
scot_in18-Dec-08 1:04
scot_in18-Dec-08 1:04 
Hi,

I am trying to change the status of checkbox using SendMessage. For some reasons it's not working. Can anyone fix this for me? below is my code:


Imports System.Runtime.InteropServices

Public Class Form1
    Private Const BM_GETCHECK As Long = &HF0
    Private Const BM_SETCHECK As Long = &HF1
    Private Const BS_AUTOCHECKBOX As Long = &H3
    Private Const BST_CHECKED As Long = 1
    Private Const BST_UNCHECKED As Long = 0



    <DllImport("user32.dll")> _
    Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    End Function


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim CheckBox As Control
        CheckBox = CheckBox1
        Dim value As IntPtr

        value = CheckBox.Handle

        SendMessage(value, BM_SETCHECK, BST_CHECKED, 0)

    End Sub
End Class



Thanks in advance,

Scot
AnswerRe: SendMessage not working for CheckBox Pin
Dave Kreskowiak18-Dec-08 3:55
mveDave Kreskowiak18-Dec-08 3:55 
GeneralRe: SendMessage not working for CheckBox [modified] Pin
scot_in18-Dec-08 17:19
scot_in18-Dec-08 17:19 
AnswerRe: SendMessage not working for CheckBox Pin
arnold_w4-May-21 5:30
arnold_w4-May-21 5:30 
QuestionClass/Object Question Pin
RGVChris18-Dec-08 0:56
RGVChris18-Dec-08 0:56 
AnswerRe: Class/Object Question Pin
Jay Royall18-Dec-08 1:44
Jay Royall18-Dec-08 1:44 
GeneralRe: Class/Object Question Pin
RGVChris18-Dec-08 1:52
RGVChris18-Dec-08 1:52 
GeneralRe: Class/Object Question Pin
Dave Kreskowiak18-Dec-08 3:52
mveDave Kreskowiak18-Dec-08 3:52 
GeneralRe: Class/Object Question Pin
RGVChris18-Dec-08 4:04
RGVChris18-Dec-08 4:04 
GeneralRe: Class/Object Question Pin
Dave Kreskowiak18-Dec-08 4:08
mveDave Kreskowiak18-Dec-08 4:08 
GeneralRe: Class/Object Question Pin
Jay Royall18-Dec-08 4:12
Jay Royall18-Dec-08 4:12 
GeneralRe: Class/Object Question Pin
RGVChris18-Dec-08 4:21
RGVChris18-Dec-08 4:21 
QuestionHow to create consolidate setup for an application built in VB 2005 Pin
kennylal18-Dec-08 0:47
kennylal18-Dec-08 0:47 
AnswerRe: How to create consolidate setup for an application built in VB 2005 Pin
Dave Kreskowiak18-Dec-08 3:45
mveDave Kreskowiak18-Dec-08 3:45 
Questionexplore the folders in vb Pin
phokojoe17-Dec-08 23:26
phokojoe17-Dec-08 23:26 
AnswerRe: explore the folders in vb Pin
Ashfield18-Dec-08 0:05
Ashfield18-Dec-08 0:05 
AnswerRe: explore the folders in vb Pin
LloydA11119-Dec-08 8:34
LloydA11119-Dec-08 8:34 
QuestionHotel reservation Pin
WebMaster17-Dec-08 23:14
WebMaster17-Dec-08 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.