473,729 Members | 2,243 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 3418
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
12812
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
2384
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
1747
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
1637
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
1279
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
1906
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
2287
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
1084
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
5922
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
9426
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...
1
9200
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
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
8144
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...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6016
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
4525
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
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2162
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.