|
-
Aug 20th, 2000, 12:29 PM
#1
I cant seem to get the activex dll to work,
I declared all the subs as public, then when I tried to compile VB said something about
"private object modules cannot be used in public object modules as parameters or return types for public procedures, as public data members, or fields as public user defined types"
and when I declared all the subs as private I couldnt access any of them when I made a referance to the DLL.
-
Aug 20th, 2000, 12:34 PM
#2
I see the problem, but I dont know how to fix it
Code:
'this gives the error
Sub FormDrag(frm As Form)
ReleaseCapture
Call SendMessage(frm.hwnd, 161, 2, 0)
End Sub
'this doesnt
Sub FormDrag()
ReleaseCapture
Call SendMessage(frm.hwnd, 161, 2, 0)
End Sub
and I need the arguments.
-
Aug 20th, 2000, 01:15 PM
#3
transcendental analytic
You could pass frm as Object instead of Form, but then you could pass any object, you could of course use typename and check if it's a form
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 20th, 2000, 01:18 PM
#4
thank you, I will try that immediately!
-
Aug 20th, 2000, 01:30 PM
#5
when I check to see if the object is
"Form"
OR
Form (without the quotes)
it thinks its not a form and the code doesnt work, but if I dont check to see if its a form then it works.....
whats wrong?
-
Aug 20th, 2000, 02:38 PM
#6
transcendental analytic
I think it returns the form name, since it's the name of the class
Here's another better solution
Code:
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
'you put this
Sub FormDrag(frm As Form)
Dim length As Long, classname As String * 255
length = GetClassName(Me.hwnd, classname, 255)
If Left(classname, length) <> "ThunderForm" Then Exit Sub
ReleaseCapture
Call SendMessage(frm.hwnd, 161, 2, 0)
End Sub
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 20th, 2000, 02:41 PM
#7
thank you very much
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|