473,624 Members | 2,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

adding acrobat control programatically

greetings,

i am trying to develop an application which is supposed to show pdf. i
have added the activeX control from the acrobat in my application.
everything was working fine, until i got to test it on another system
which had acrobat 6.0 installed.... there my application gave error
while loading. I have acrobat 7.0.
the solution i this is to get acrobat contorl programatically and not
through adding components at design time.
i belive solution is somewhere in these lines of code, but am unable to
use it properly....

AcrobatType = Type.GetTypeFro mCLSID("AcroPDF ");
object o =Activator.Crea teInstance (AcrobatType);

looking for guidance,

Feb 3 '06 #1
1 3413
Khadim,

What you need to do is create a class that derives from AxHost. Then,
from your constructor, you have to call the constructor of the base class,
passing the CLSID of the control you want to host.

You can then add this control to your application. However, any of the
properties/methods exposed by the adobe active x control specifically will
not be exposed. You can access the underlying COM object through the GetOcx
method, but you will have to cast it to the appropriate COM interface on the
object. If between versions, the interfaces are not the same, you will have
to switch on the version number for each call to the interface.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Khadim" <as***********@ gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
greetings,

i am trying to develop an application which is supposed to show pdf. i
have added the activeX control from the acrobat in my application.
everything was working fine, until i got to test it on another system
which had acrobat 6.0 installed.... there my application gave error
while loading. I have acrobat 7.0.
the solution i this is to get acrobat contorl programatically and not
through adding components at design time.
i belive solution is somewhere in these lines of code, but am unable to
use it properly....

AcrobatType = Type.GetTypeFro mCLSID("AcroPDF ");
object o =Activator.Crea teInstance (AcrobatType);

looking for guidance,

Feb 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
12802
by: Chris | last post by:
Dear all, I would like to figure out a way to add controls to a form using specs stored in a table. Any assistance in fleshing this idea out would be greatly appreciated. I'm using VB6. Right now I am thinking I would loop through the specs table (containing control name, control type, width, max length, etc) and print lines of code to a text file. The code would look something like the following:
4
2374
by: Tonya | last post by:
Hi, Does anyone know how i can add controls to a progress bar. I have searched the internet but could not find any examples. what i want to add is a progress bar and a button. thx
0
1744
by: philipp | last post by:
I have the following problem: My client application (c#, WindowsForms) uses the IE Browser ActiveX Control to display either HTML or PDF files. This is fine so far. If the Acrobat Reader is configuered appropriately, the pdf-Files are displayed right in that Browser Control. Only problem is, when closing the Application there is a memory access violation. It occurs outside of my application, only when its Thread is just about to...
5
1634
by: Patrick | last post by:
Hello I have the following problem. I have an aspx Page. This page contains an ASP-Table Object. So in that table, I have a linkbutton. So, I can't edit the event of that button trough the WYSIWYG editor, so I co to the CodeBehind and add the Event in the InitializeComponent() Method like this this.lbTest.Click += new System.EventHandler(this.lbTest_Click); so far, all works fine. now if i go to the WYSIWYG editor, add another...
1
1277
by: francois | last post by:
Hi, I would like to add a USER control (not custom control) programmatically to my aspx page. I am using something like the following in my page_load code : * Bos.UserControls.HeaderFinance header = new HeaderFinance(); this.Controls.Add(header); *
3
1900
by: sam | last post by:
Hi! This is sam.. I would like to know acrobat reader controls in vb. Is there any such(Acrobat reader) controls available in visual basic or third patry .. I need to use it in my project . Any worthy answer will be appriciated. sam
2
2286
by: Khan | last post by:
Hi, I'm using acrobat reader contorl in my vb.net application to display pdf files. I'm using version 8.0 of acrobat, but if i run my application on other machine which has different version of acrobat reader (let's say version 5.0) it is giving me an error. If the acrobat version is same on both machines, no error. How can i make it to run on different machines which have different versions of acrobat reader.
0
1075
by: vidhyapriya | last post by:
hi i am using Acrobat reader in ASP.Net....in add reference->COM->Acrobat Control for ActiveX....in that pdflib.dll file is added....i cant find any acrobat reader control in toolbax...how to use this acrobat reader in design view.... i need to know to use this in asp.net itself i am using VS2005....Acrobat Reader7.0...
2
5920
by: niarj | last post by:
hi all, i have bookmark a pdf from a text file . i am getting error while ...createing a child bookmark . i like to make bookmark like ... --->> niraj jha --->> niraj jha 1(first child).
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8471
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.