Solved

Help w/ UserControl and RaiseEvent

Posted on 2006-06-21
3
221 Views
Last Modified: 2010-04-30
Can somebody please tell me why the dblclick event is not working.

Public Enum ButtonColor
    btnRED
    btnGREEN
    btnYELLOW
End Enum

Event DblClick()

Public Property Let Color(ByVal Color As ButtonColor)
   
    Select Case Color
        Case ledGREEN
            Green.Visible = True
            Red.Visible = False
            Yellow.Visible = False
       
        Case ledRED
            Green.Visible = False
            Red.Visible = True
            Yellow.Visible = False
       
        Case ledYELLOW
            Green.Visible = False
            Red.Visible = False
            Yellow.Visible = True
    End Select

End Property

Public Sub UserControl_DblClick()
   
    RaiseEvent DblClick

End Sub

Public Sub UserControl_Resize()

    UserControl.Width = 240
    UserControl.Height = 240

End Sub

0
Comment
Question by:pat_cunningham
3 Comments
 
LVL 11

Expert Comment

by:leclairm
ID: 16953100
Are you declaring the object with events???

dim withevents yourobject as classwithcustomevent

0
 

Author Comment

by:pat_cunningham
ID: 16953144
I just figured it out.  I had images that covered the entire usercontrol and the dblclick event that was being call was the images'.
0
 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 250 total points
ID: 16954605

you can ask for a refund,
see this help topic for more info:

http://www.experts-exchange.com/help.jsp#hi70
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question