Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help for Coding
Message
 
To
13/02/2000 21:56:24
General information
Forum:
Visual Basic
Category:
ActiveX controls
Title:
Miscellaneous
Thread ID:
00331608
Message ID:
00331662
Views:
15
>Hi,
> I am making an ActiveX Control in which I get the
>following error when I tried to place it on the form in
>the same project.
> Also it is not allowing me to add the ActiceX control
>on the Other project say (project2) though it is apparing
>on the ToolBox
>
>Error
>*****
>Cannot define a Public user-dfined tyep within a private
>object module.
>
>And this is my code in Class Modle.
>
>Type POINTAPI
> X As Long
> Y As Long
>End Type
>
>Declare Function GetCursprPos& Lib "user32" (lpPoint As POINTAPI)
>Declare Function WindowFromPoint& Lib "user32" (ByVal lpPointX As Long, ByVal lpPointY As Long)

Add the Private statement in front of these lines like this:
Private Type POINTAPI
    X As Long
    Y As Long
End Type

Private Declare Function GetCursprPos& Lib "user32" (lpPoint As POINTAPI)
Private Declare Function WindowFromPoint& Lib "user32" (ByVal lpPointX As Long, ByVal lpPointY As Long)
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform