trying to get this component stuff figured out
Here is the code I have;
Code:
Option Explicit
Public Function goImage(myFileName As Variant) As Boolean
On Error Resume Next
Dim Picture1 As Object
myFileName = CStr(myFileName)
Picture1.Picture = LoadPicture(myFileName)
If Err.Number <> 0 Then
goImage = False
Else
goImage = True
End If
End Function
I've put this in a class called ImageFun, in a project named Fun.dll. After compiling this .dll and registering it on the server, I tried calling it from ASP with the following:
Code:
set foo=Server.CreateObject("Fun.ImageFun")
Which gives me the error: "Invalid class string"
Does that make sense?
Another question: Since it's an activeX dll, there is no form. I'm assuming that normally Picture1 would be the name of a Picture control that you would embed on a form. In my code I simply declare Picture1 as an object. Is this sufficient? Or do I have to declare it as something else?
Thanks
dvst8
[Edited by dvst8 on 06-26-2000 at 08:56 PM]