473,322 Members | 1,736 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,322 software developers and data experts.

Late Binding in C# - Add control to winform

Hello,

I user c# 2.0 and want to add acrobat-reader to my application, so I
have to create a Control from AcroPDF.dll to my app. I could do this by
early binding, but I want to program to run without acrobat reader
being installed.

Now I want to create an instance of this controls and add it to my form
at runtime.

I think I have to do something like that:
Type acroT;
acroT =
Type.GetTypeFromProgID("AxAcroPDFLib.AxAcroPDF"); //or AcroPDF.PDF
object acroObj = Activator.CreateInstance(printerType);
this.Contols.Add(acroObj);
As acroObj is a com-object, I can't add it to the form that easy.
How could I do this (without early-binding or adding some references
which need to be deployed)?

Thank you!
Regards,
Uwe

Sep 27 '06 #1
0 1553

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

Similar topics

1
by: noone | last post by:
I like to write my code with optionstrict set to on, except for the late binding errors I get when there is a reason to change some value in a control on a postback, like: Label4.Text =...
7
by: PC Datasheet | last post by:
I have this: Dim Cbr As Object Dim Ctl As Object Set Cbr = Application.Commandbars("CourseCalendarMonth") Set Ctl = Application.Commandbars("CourseCalendarMonth").Controls("CalendarMonth") Is...
9
by: Zlatko Matić | last post by:
I was reading about late binding, but I'm not completely sure what is to be done in order to adjust code to late binding... For example, I'm not sure if this is correct: early binding: Dim ws...
2
by: Mystery Man | last post by:
We are developing a C# application that has many interfaces to the Microsoft suite (eg Word, Excel, Outlook, Powerpoint, etc). We need to support Office 97, 2000, 2002 and any future versions. ...
5
by: eBob.com | last post by:
In another thread VJ made me aware of Tag. Fantastic! I've been wanting this capability for a long time. But it seems that I cannot use it with Option Strict On. In an event handler I have ......
30
by: lgbjr | last post by:
hi All, I've decided to use Options Strict ON in one of my apps and now I'm trying to fix a late binding issue. I have 5 integer arrays: dim IA1(500), IA2(500), IA3(500), IA4(500), IA5(500) as...
3
by: Dean Slindee | last post by:
Is there any way to avoid the late binding error in this code snippet? Opton Strict ON Public Sub ComboBoxFlatClearForEdit(ByRef obj As Object) Dim objControl As New Control For Each...
2
by: Dean Slindee | last post by:
Can someone explain how to remedy the two late binding errors below when Option Strict On: Public Function ControlDataRowArrayListPaint(ByRef frm As Form, _ ByRef ctl As Control, _ ByRef dr...
3
ADezii
by: ADezii | last post by:
The process of verifying that an Object exists and that a specified Property or Method is valid is called Binding. There are two times when this verification process can take place: during compile...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.