Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX - How-to...???

Status
Not open for further replies.

JerryKreischer

Programmer
Jul 31, 2003
20
US
I have an ActiveX DLL that I need for a specialized App that will reset the date/time of the client's machine - wriiten in VB6...
I have 1 public property -

Private mvarClientDate As Variant

Public Property Let ClientDate(ByVal vData As Variant)
mvarClientDate = vData
End Property

Public Property Get ClientDate() As Variant
ClientDate = mvarClientDate
End Property


I have a module that contains a 'Sub Main()'

Public Sub Main()
Dim cls As New ClientTime
On Error Resume Next
If IsDate(cls.ClientDate) Then
Date = Format(cls.ClientDate, "MM/DD/YYYY")
Time = Format(cls.ClientDate, "HH:MM:SS")
Else
MsgBox "Could not set date/time..."
End If
End Sub



I also have the OBJECT info re: the control defined in my page:

function CreateTimeClient() {
document.write(' <OBJECT ID=&quot;TimeClient&quot; CLASSID=&quot;CLSID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&quot;\n');
document.write(' TYPE = &quot;application/x-oleobject&quot;\n');
document.write(' CODEBASE=&quot; document.write('<param name=ClientDate value=&quot;01/01/2004 06:00:00 AM&quot; />');
document.write(' </OBJECT>\n');
}


When I execute this, the param (ClientDate) is not being passed to the DLL (I have used other MSGBOXs to verify this)...


Does anyone know what I'm missing??? Do I somehow have to 'Get' the param value?? How??

Thanx in advance
Jerry
 
I think the problem it's your Active X object.
have you tested it?
I knw that with VB must be an Active X test container.

________
George, M
 
The DLL does work...When the page is displayed, the MSGBOX dislays the error message &quot;Could not set date/time...&quot;

I've also used other MsgBox's to show the date and time values of what was passed...

I remember I used to code programs that took command line entries, ie: App1.exe 'Test'

I'm sure there's a way for me to get the Param values from the OBJECT HTML - but I don't know how!!!

JK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top