473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dynamically create an ActiveX control with a UI and put it in my page?

I've got an ActiveX control that I created and use in an HTML file. In that case, I have it in an <object> tag in the body. Works great.

Now I'm wanting to defer the creation of the object until some time AFTER the page loads. So I'm putting a place for it in the <body> using a <div id="myOCX"></div> placeholder.

I created a Javascript function that can create the ActiveX control, and it actually works. I can see that I get some logging information in some files. The problem is that the ActiveX control isn't visible. I don't see it. Normally the HTML file had something like this:

Expand|Select|Wrap|Line Numbers
  1. <OBJECT
  2.       classid="clsid:xxxxxxxx-9473-40C2-951E-84B24727AD65"
  3.       width="100%"
  4.       height="100%"
  5.       align="center"
  6.       hspace="0"
  7.       vspace="0"
  8. >
The intent is to fill up the container it's in.

So if I have a Javascript function like this:

Expand|Select|Wrap|Line Numbers
  1. function makeOCX() {
  2.    var newOCX = new ActiveXObject("gwdOCX.TheOCX");   // note - this works 
  3. }
How do I make this the right size and get it to show up in the placeholder <div> I set up for it?
Dec 19 '07 #1
1 2238
gits
5,390 Expert Mod 4TB
hi ...

i'm not familiar with activeX but typically you could be able to do the following:

Expand|Select|Wrap|Line Numbers
  1. function makeOCX() {
  2.    var newOCX = new ActiveXObject("gwdOCX.TheOCX");   // note - this works 
  3.    newOCX.visible = true;
  4. }
  5.  
may be you could set the dimensions the same way ... newOCX.width = 'whatever', etc. ...

hope it helps,

kind regards
Dec 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: mikeyjudkins | last post by:
Ive been banging my head on the wall for hours with this one, hopefully someone will know what Im doing wrong here :\ The Goal: I have an xml file that is generated on the fly via JSP which I...
3
by: fumihiko | last post by:
Hi, I created an activex control (C++), and it uses another COM dll (C++). This COM dll links with a static library that dose some calculation. (both are debug multithreaded dll) I created a...
6
by: Vinay | last post by:
Hi all, Can we create an ActiveX (.OCX) control in ATL project type? Is project type for creation of .OCX file can only be ActiveX MFC type? If yes, Could you suggest me some Links? My...
0
by: bcox | last post by:
I would like to be able to set parameter values for an ActiveX control hosted on an ASP.NET .aspx page from a C# code behind file. The ActiveX registration code is contained in <OBJECT></OBJECT>...
8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
3
by: EJ1003 | last post by:
Hello I would like to create Activex Control uisng C# and use it in ASP.Net webform. User Control is not solving my requirement so I am going for Activex Control. Please guide me on this, how...
1
by: Reza Nabi | last post by:
Bakground: I have a webform (LoadCtl.aspx) which loads the user control to a placeholder dynamically based on the ctlName querystring passed in the URL. Webform (LoadCtl.aspx) also passes a...
4
by: qualitynice | last post by:
HELP :-)... I'm creating an embedded activex object in an asp.net page using the HtmlGenericControl class. I'm doing this because when I tried to embed it directly in the aspx page, it stopped...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.