Click here to Skip to main content
16,005,389 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How set paper size Pin
Tomic13-Oct-06 10:29
Tomic13-Oct-06 10:29 
GeneralRe: How set paper size Pin
Dave Kreskowiak13-Oct-06 13:04
mveDave Kreskowiak13-Oct-06 13:04 
QuestionDownload in Internet Explorer Pin
Zaegra13-Oct-06 6:50
Zaegra13-Oct-06 6:50 
AnswerRe: Download in Internet Explorer Pin
Dave Kreskowiak13-Oct-06 7:29
mveDave Kreskowiak13-Oct-06 7:29 
GeneralRe: Download in Internet Explorer Pin
Zaegra13-Oct-06 20:37
Zaegra13-Oct-06 20:37 
GeneralRe: Download in Internet Explorer Pin
Dave Kreskowiak14-Oct-06 4:07
mveDave Kreskowiak14-Oct-06 4:07 
QuestionProject referencing DLL that may not be there Pin
rahvyn613-Oct-06 4:48
rahvyn613-Oct-06 4:48 
AnswerRe: Project referencing DLL that may not be there Pin
Dave Kreskowiak13-Oct-06 5:31
mveDave Kreskowiak13-Oct-06 5:31 
That won't work. The .DLL has to be there otherwise your app will fail when the JIT compiler goes to compile the METHOD that tried to call that library. Using a Try/Catch block will have no effect because that method that contains it will never run. All external references are resolved upon JIT compile, not at execution of a class' constructor.

You'll have to check for the existance of the .DLL at the start of your code and set a flag as to whether or not it's there. Then, you'll need to write a wrapper around your two methods, one that uses the .DLL and one that doesn't, plus a dispatcher method to choose between the two methods. The Dispatcher will be the function that your outside call actually calls. The dispatcher will check this flag to see if the .DLL exists, then pass the parameters to the version that's appropriate and pass any return values back to the caller.
                 Caller
                   ^ |
                   | |
                   | v
.DLL flag------>Dispatcher
                ^ |    ^ |
                | |    | |
                | v    | v
              Method  Method



Dave Kreskowiak
Microsoft MVP - Visual Basic


GeneralRe: Project referencing DLL that may not be there Pin
rahvyn613-Oct-06 5:35
rahvyn613-Oct-06 5:35 
GeneralRe: Project referencing DLL that may not be there Pin
Dave Kreskowiak13-Oct-06 5:44
mveDave Kreskowiak13-Oct-06 5:44 
Questionscanners Pin
deepak02613-Oct-06 4:09
deepak02613-Oct-06 4:09 
AnswerRe: scanners Pin
Dave Kreskowiak13-Oct-06 4:23
mveDave Kreskowiak13-Oct-06 4:23 
QuestionKey press for individual comboboxes Pin
Racos13-Oct-06 2:59
Racos13-Oct-06 2:59 
AnswerRe: Key press for individual comboboxes Pin
Dave Kreskowiak13-Oct-06 4:21
mveDave Kreskowiak13-Oct-06 4:21 
GeneralRe: Key press for individual comboboxes Pin
Racos13-Oct-06 7:41
Racos13-Oct-06 7:41 
GeneralRe: Key press for individual comboboxes Pin
Dave Kreskowiak13-Oct-06 7:45
mveDave Kreskowiak13-Oct-06 7:45 
GeneralRe: Key press for individual comboboxes Pin
Racos13-Oct-06 8:05
Racos13-Oct-06 8:05 
GeneralRe: Key press for individual comboboxes Pin
Dave Kreskowiak13-Oct-06 8:16
mveDave Kreskowiak13-Oct-06 8:16 
GeneralRe: Key press for individual comboboxes Pin
Racos13-Oct-06 8:49
Racos13-Oct-06 8:49 
QuestionVB.Net Datagrid Pin
srah13-Oct-06 1:35
srah13-Oct-06 1:35 
AnswerRe: VB.Net Datagrid Pin
johngod22-Oct-06 12:55
johngod22-Oct-06 12:55 
Questionhow to print the contents of webbrowser Pin
Ali 11013-Oct-06 1:15
Ali 11013-Oct-06 1:15 
QuestionSerial communiacion with a PPC Pin
cosmomen13-Oct-06 0:54
cosmomen13-Oct-06 0:54 
AnswerRe: Serial communiacion with a PPC Pin
Dave Kreskowiak13-Oct-06 4:25
mveDave Kreskowiak13-Oct-06 4:25 
Questionhow to print a file Pin
Ali 11012-Oct-06 21:50
Ali 11012-Oct-06 21:50 

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.