create CustomControl in code

  • Thread starter Sergey Poberezovskiy
  • Start date
S

Sergey Poberezovskiy

Hi,

How do I create a CustomControl in code?
using Application.CreateControl only creates a
placeholder, but how to associate it with an ActiveX
control?

Any help is greatly appreciated.
 
S

Sergey Poberezovskiy

Arvin,

Thanks for your reply.

In Access Help constant acCustomControl is one of the
available to use in Application.CreateControl method; I
assume that there has to be a way to set newly created
control.

And up to the version 2003 Microsoft does set up these
controls in code - when re-creating database from Source
Safe - I do not know how though...

Any pointers, APIs, undocumented features would help.
 
A

Arvin Meyer

I spent an hour looking, but couldn't find any. Stephen Lebans would
certainly be the one who'd know if there was a way. I see his post and still
am in the same boat that you are. I've looked through all the Hidden members
for a way, and found nothing. The only method I see is the same one that
Stephen points out in the KB article. That entails building a template form
and using the OLE information from the form. That doesn't make a whole lot
of sense to me unless I was continually creating and destroying instances,
something I almost never do. It appears to me that you could just as easily
show/hide an existing form.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
S

Sergey Poberezovskiy

Guys,
My problem is that I use Access through Automation, and
the only way I can get access to OLEData property is via
Application.Eval("Forms!Form1!Ctl1.OLEData")

Unfortunately it only returns a pointer, something like
"ᰕ6"
of String type back to the caller and not Byte() as it
does from within Access. I want to get that Byte() array
through Automation - any ideas?..
 
Top