Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: interface implementation Pin
George_George3-May-08 2:43
George_George3-May-08 2:43 
AnswerRe: interface implementation Pin
tgrt3-May-08 14:51
tgrt3-May-08 14:51 
GeneralRe: interface implementation Pin
George_George3-May-08 18:15
George_George3-May-08 18:15 
GeneralRe: interface implementation Pin
tgrt4-May-08 4:07
tgrt4-May-08 4:07 
QuestionA static riddle (or: how to avoid lazy instantiation?) Pin
Luca Leonardo Scorcia3-May-08 1:45
professionalLuca Leonardo Scorcia3-May-08 1:45 
AnswerRe: A static riddle (or: how to avoid lazy instantiation?) Pin
carbon_golem3-May-08 4:15
carbon_golem3-May-08 4:15 
Questionopening pdf file in windows application using c# Pin
maruthi2-May-08 23:50
maruthi2-May-08 23:50 
AnswerRe: opening pdf file in windows application using c# Pin
Ed.Poore2-May-08 23:59
Ed.Poore2-May-08 23:59 
My guess is that Type.GetTypeFromProgID is returning a null.  Try seperating this out a bit and setting a couple of checks / breakpoints to try and find out more about what's going on:
Type acroapp = Type.GetTypeFromProgID("AcroExch.AcroExch");
Type acrodoc = Type.GetTypeFromProgID("AcroExch.AVDoc");

// Check that both exist
if ((acroapp == null) || (acrodoc == null))
  throw new Exception("Acrobat not installed on this system.");

// Now we can try to create instances
Acrobat.CAcroApp app = (Acrobat.CAcroApp)Activator.CreateInstance(acroapp);
Acrobat.CAcroAVDoc doc = (Acrobat.CAcroAVDoc)Activator.CreateInstance(acrodoc);
// Again check that we could create an instance
if ((app == null) || (doc == null))
  throw new Exception("Error initialising Acrobat");

// Now we should be able to load it
app.Show();
doc.Open(FileName, "Computing Mileage");
At least laying it out like this will tell you what's going wrong (or give you more of a hint).

If you see the first exception then check your TypeIDs for Acrobat, if you see the second then check the acrobat documentation is my only suggestion.



GeneralRe: opening pdf file in windows application using c# Pin
maruthi3-May-08 0:29
maruthi3-May-08 0:29 
GeneralRe: opening pdf file in windows application using c# Pin
Ed.Poore3-May-08 0:49
Ed.Poore3-May-08 0:49 
GeneralRe: opening pdf file in windows application using c# Pin
maruthi3-May-08 1:10
maruthi3-May-08 1:10 
GeneralRe: opening pdf file in windows application using c# Pin
Ed.Poore3-May-08 1:24
Ed.Poore3-May-08 1:24 
GeneralRe: opening pdf file in windows application using c# Pin
Ed.Poore3-May-08 1:26
Ed.Poore3-May-08 1:26 
AnswerRe: opening pdf file in windows application using c# Pin
Ed.Poore3-May-08 1:34
Ed.Poore3-May-08 1:34 
GeneralRe: opening pdf file in windows application using c# Pin
maruthi3-May-08 1:46
maruthi3-May-08 1:46 
QuestionHow to create new VPN Connection through C#.net Pin
Seema Gosain2-May-08 20:14
Seema Gosain2-May-08 20:14 
AnswerRe: How to create new VPN Connection through C#.net Pin
Christian Graus2-May-08 21:12
protectorChristian Graus2-May-08 21:12 
AnswerRe: How to create new VPN Connection through C#.net Pin
zeyad_aamer27-Jan-13 4:49
zeyad_aamer27-Jan-13 4:49 
Questionnot able 2 update in database Pin
sow_mj2-May-08 18:22
sow_mj2-May-08 18:22 
AnswerRe: not able 2 update in database Pin
Christian Graus2-May-08 21:10
protectorChristian Graus2-May-08 21:10 
QuestionSaving text manipulated data Pin
Casper Hansen2-May-08 17:13
Casper Hansen2-May-08 17:13 
AnswerRe: Saving text manipulated data Pin
Christian Graus2-May-08 17:22
protectorChristian Graus2-May-08 17:22 
AnswerRe: Saving text manipulated data Pin
Casper Hansen3-May-08 2:37
Casper Hansen3-May-08 2:37 
AnswerRe: Saving text manipulated data Pin
Casper Hansen3-May-08 14:48
Casper Hansen3-May-08 14:48 
QuestionThreading events Pin
MarkB7772-May-08 16:56
MarkB7772-May-08 16:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.