|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Check if libraries or program existHi, I would like know if something libraries or programs exist, and send
error with a description if the program don't find the libraries, how can make that?. For example: In the use of interop libraries of Office, I declare that libraries in the begin of code: Imports Microsoft.Office.Interop But when the user don't have that libraries, the program don't run (inmediate crash, they don't start), and the user never know the failure point. Thanks in advance for any help. Freddy Coal
Show quote
Hide quote
On Nov 19, 9:53 am, "Freddy Coal" <freddyc...@gmaiwithoutspam.com> I believe if you use ClickOnce deployment you can set prerequisiteswrote: > Hi, I would like know if something libraries or programs exist, and send > error with a description if the program don't find the libraries, how can > make that?. > > For example: > > In the use of interop libraries of Office, I declare that libraries in the > begin of code: > > Imports Microsoft.Office.Interop > > But when the user don't have that libraries, the program don't run > (inmediate crash, they don't start), and the user never know the failure > point. > > Thanks in advance for any help. > > Freddy Coal that must be installed with the application. If they do not exist (and can't be downloaded) a more descriptive error message will be shown to the user. Also, I don't believe the program should crash until it tries to reference the missing library. If that's true, you should be able to use a simple try...catch block to handle the errors and display a more helpful error message. Thanks, Seth Rowe Seth, How put external programs like prerequisites with ClickOnce?. The Try
cath, only work inside class, I have global variables, exist a way to put external Try Catch?. For example, I have this code: '-------------------- Imports EARTHLib Public Class FC_Form Dim camara As New CameraInfoGE Dim GEarth As New EARTHLib.ApplicationGE Private Sub FC_Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub '--------------------- In the code I'm using Google Earth, but if the user don't have the application, the program crash, the program don't start. Thanks in advance for your help. Freddy Coal. Show quoteHide quote "rowe_newsgroups" <rowe_em***@yahoo.com> wrote in message news:79a9e79c-16b6-4d44-970d-644f61bbdfeb@c30g2000hsa.googlegroups.com... > On Nov 19, 9:53 am, "Freddy Coal" <freddyc...@gmaiwithoutspam.com> > wrote: >> Hi, I would like know if something libraries or programs exist, and send >> error with a description if the program don't find the libraries, how can >> make that?. >> >> For example: >> >> In the use of interop libraries of Office, I declare that libraries in >> the >> begin of code: >> >> Imports Microsoft.Office.Interop >> >> But when the user don't have that libraries, the program don't run >> (inmediate crash, they don't start), and the user never know the failure >> point. >> >> Thanks in advance for any help. >> >> Freddy Coal > > I believe if you use ClickOnce deployment you can set prerequisites > that must be installed with the application. If they do not exist (and > can't be downloaded) a more descriptive error message will be shown to > the user. > > Also, I don't believe the program should crash until it tries to > reference the missing library. If that's true, you should be able to > use a simple try...catch block to handle the errors and display a more > helpful error message. > > Thanks, > > Seth Rowe
Show quote
Hide quote
"Freddy Coal" <freddycoal@gmaiwithoutspam.com> schrieb Dim camara As CameraInfoGE> Seth, How put external programs like prerequisites with ClickOnce?. > The Try cath, only work inside class, I have global variables, exist > a way to put external Try Catch?. > > For example, I have this code: > > '-------------------- > Imports EARTHLib > > Public Class FC_Form > > Dim camara As New CameraInfoGE > Dim GEarth As New EARTHLib.ApplicationGE > > Private Sub FC_Form_Load(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles MyBase.Load > End Sub > '--------------------- > > In the code I'm using Google Earth, but if the user don't have the > application, the program crash, the program don't start. Dim GEarth As EARTHLib.ApplicationGE Sub New try camara =new CameraInfoGE GEarth =new EARTHLib.ApplicationGE catch ex as exception 'handle exception end try end sub Armin
Show quote
Hide quote
On Nov 20, 10:58 am, "Freddy Coal" <freddyc...@gmaiwithoutspam.com> To be honest, I've only used ClickOnce prerequisites for Microsoftwrote: > Seth, How put external programs like prerequisites with ClickOnce?. The Try > cath, only work inside class, I have global variables, exist a way to put > external Try Catch?. > > For example, I have this code: > > '-------------------- > Imports EARTHLib > > Public Class FC_Form > > Dim camara As New CameraInfoGE > Dim GEarth As New EARTHLib.ApplicationGE > > Private Sub FC_Form_Load(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles MyBase.Load > End Sub > '--------------------- > > In the code I'm using Google Earth, but if the user don't have the > application, the program crash, the program don't start. > > Thanks in advance for your help. > > Freddy Coal. > > "rowe_newsgroups" <rowe_em***@yahoo.com> wrote in message > > news:79a9e79c-16b6-4d44-970d-644f61bbdfeb@c30g2000hsa.googlegroups.com... > > > On Nov 19, 9:53 am, "Freddy Coal" <freddyc...@gmaiwithoutspam.com> > > wrote: > >> Hi, I would like know if something libraries or programs exist, and send > >> error with a description if the program don't find the libraries, how can > >> make that?. > > >> For example: > > >> In the use of interop libraries of Office, I declare that libraries in > >> the > >> begin of code: > > >> Imports Microsoft.Office.Interop > > >> But when the user don't have that libraries, the program don't run > >> (inmediate crash, they don't start), and the user never know the failure > >> point. > > >> Thanks in advance for any help. > > >> Freddy Coal > > > I believe if you use ClickOnce deployment you can set prerequisites > > that must be installed with the application. If they do not exist (and > > can't be downloaded) a more descriptive error message will be shown to > > the user. > > > Also, I don't believe the program should crash until it tries to > > reference the missing library. If that's true, you should be able to > > use a simple try...catch block to handle the errors and display a more > > helpful error message. > > > Thanks, > > > Seth Rowe products like Office and Sql Server, and never any third party libraries. You best bet is to search Google or MSDN and try to find some instructions. Armin has already shown you how to properly instantiate the "unstable" code, so you might not need to worry about the prereq's if it does what you require. Thanks, Seth Rowe
Type inference
Read very large file in bytearray and upload to MSSQL VB calling DLL only with _stdcall? Getting a subset of DataRows from a DataTable Web Server Read/Write Problem with ToolStripTextBox Insert smaller images into one Image object Edit And Continue doesn't work :-( Form - controls is placed different on Vista than in XP day/month/year parts of a date |
|||||||||||||||||||||||