ActiveX Params

niallmerrigan
niallmerrigan used Ask the Experts™
on
Hi

I am developing an online scanning solution.  I have done the scanning part, saving the file, and transferring it to a remote server.  

I need to pass some information to my control so that I can tell it where to send teh file and what ids to use.  I scoured the web looking for this and I found I should use the PropertyBag.

I created the following (one is show for example)

Using the Package and Deployment Wizard I created a internet deployment package and marked the file safe for initialisation and safe for scripting.  

I use the following code to instansiate the activex control on the web page

<OBJECT ID="ctlScan"
CLASSID="CLSID:126450C7-DA60-4807-989B-3C385061D98B"
CODEBASE="Scan.CAB#version=1,5,0,0">
<PARAM NAME=DOCID VALUE="3655">
</OBJECT>

The cab is located on the server with the html code.  

It attempts to load the file and succeeds but no form is displayed

I am at a loss as to what is happening

Can someone help me here


Public Property Get DocID() As String
    DocID = lblDocID.Caption
End Property

Public Property Let DocID(ByVal New_DocID As String)
    lblDocID.Caption() = New_DocID
    PropertyChanged "DocID"
End Property

'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    lblDocID.Caption = PropBag.ReadProperty("DocID", "")
    lblDest.Caption = PropBag.ReadProperty("Destination", "")
    m_IPAddress = PropBag.ReadProperty("IPAddress", m_def_IPAddress)
    m_WebAddress = PropBag.ReadProperty("WebAddress", m_def_WebAddress)
End Sub

'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("DocID", lblDocID.Caption, "")
    Call PropBag.WriteProperty("Destination", lblDest.Caption, "")
    Call PropBag.WriteProperty("IPAddress", m_IPAddress, m_def_IPAddress)
    Call PropBag.WriteProperty("WebAddress", m_WebAddress, m_def_WebAddress)
End Sub


Thanks

Niall

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
I battled forever to get those suckers to work.  But first, a couple questions...

What does your ActiveX load into?  Internet Explorer?  Stand alone?

Does it load if you take out the Read/Write Properties functions?

Is this an ActiveX EXE?  ActiveX DLL?  Control?  Document DLL?  Document EXE?

Author

Commented:
I actually solved the problem since

Its an OCX

When you use the OBJECT Tag and have a fairly sizeable control (or any control for that fact) you need to specify height and width in the form of two params.  

For example

<PARAM NAME="_ExtentX" VALUE="15875">
<PARAM NAME="_ExtentY" VALUE="10742">

It was been drawn I just couldnt see it.  It seems you need these when your control takes params.  Strange behaviour

Can a moderator please return the points to me and use this as the answer to the question

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- PAQ'd and points refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

twalgrave
Cleanup Volunteer

per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial