Results 1 to 2 of 2

Thread: Click event creating a control

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2007
    Location
    Sweden
    Posts
    50

    Resolved Click event creating a control

    Hi!
    I´m creating a control with a label and a button in it.
    When I add the control to a windowsproject and move to the Click event
    for the button and type code there but nothing happens.
    Here is my code:

    Code:
        Public Property InfoLabel() As String
            Get
                Return lblInfoLabel.Text
            End Get
            Set(ByVal value As String)
                lblInfoLabel.Text = value
            End Set
        End Property
    
        Public Event ApplyButton_Click()
        Sub CauseEvent()
            RaiseEvent ApplyButton_Click()
        End Sub
    In the windowsproject:
    Code:
        Private Sub Tweak1_ApplyButton_Click(ByVal sender As Object) Handles Tweak1.ApplyButton_Click
            MsgBox("Click")
        End Sub
    But nothing happens??
    Last edited by jojo116; Jul 28th, 2007 at 10:29 AM.

  2. #2

    Thread Starter
    Member
    Join Date
    Feb 2007
    Location
    Sweden
    Posts
    50

    Re: Click event creating a control

    Got it

    Code:
        Private Sub ApplyButton_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles ApplyButton.Click
            RaiseEvent ApplyButton_Click()
        End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width