Referencing a ActiveX control within VB

R

Ron

I've added a custom ActiveX control to my InfoPath form and now what to
reference it within VB to set values etc. How do I declare/reference the
object that is in the InfoPath form in VB? I can see in the xsl it has been
assigned a name of CTRL3...
 
M

Matthew Blain \(Serriform\)

What exactly are you trying to do?

You cannot access the ActiveX control directly because InfoPath works on XML
data by generating, and regenerating, an HTML view. It is the view which
contains an instance ActiveX control. During the process of updating the
view, the ActiveX control may get destroyed and recreated multiple times

An ActiveX control which is not designed for InfoPath can bind one value to
the data. InfoPath adds some interfaces your control can call to access the
InfoPath object model and thus bind to more than one node or otherwise store
the data you need.

--Matthew Blain
http://tips.serriform.com/
 
R

Ron

I've added a custom control to InfoPath to enable some additional
functionality for the user. It is a third party control that captures a
"electronic" (Not digital signature) from the user using a writing tablet
(not a Tablet PC). I suspect that the control (from a third party) might need
to be modified. It did not support any binding when it was added through the
custom control wizard. In any case, I'm wondering how to reference the
control through managed code such as VB.
 
A

Andrew Ma [MSFT]

Yes, you will probably want to write a wrapper to expose a property to bind
to.
Also, the property should fire property change events for InfoPath to pick
up the changes (if it doesn't, then the data will only get put into the XML
on save).
How does the data get stored in this third party control?

--
Andrew J. Ma
Software Test Engineer
Microsoft Office InfoPath
http://blogs.msdn.com/ajma
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
 
R

Ron

In the end I utilized the object within a HTML resource file that I added
into the resource files and then called through a button control. Here is the
code that gets executed when the button control is invoked.
var Signed = XDocument.UI.ShowModalDialog("MemberSignature.htm",
XDocument, 500, 600);
where membersignature is the HTML resource file containing the object which
is then invoked through jscript.

Hope this helps,
Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top