Click here to Skip to main content
15,919,132 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Application crash Pin
vijay248217-Nov-10 21:39
vijay248217-Nov-10 21:39 
AnswerRe: Application crash Pin
David Mujica17-Nov-10 7:27
David Mujica17-Nov-10 7:27 
GeneralRe: Application crash Pin
vijay248217-Nov-10 21:41
vijay248217-Nov-10 21:41 
GeneralRe: Application crash Pin
Simon_Whale17-Nov-10 23:00
Simon_Whale17-Nov-10 23:00 
AnswerRe: Application crash Pin
Luc Pattyn17-Nov-10 12:22
sitebuilderLuc Pattyn17-Nov-10 12:22 
GeneralRe: Application crash Pin
vijay248217-Nov-10 23:09
vijay248217-Nov-10 23:09 
GeneralRe: Application crash Pin
Luc Pattyn18-Nov-10 1:41
sitebuilderLuc Pattyn18-Nov-10 1:41 
GeneralRe: Application crash Pin
Eddy Vluggen18-Nov-10 8:31
professionalEddy Vluggen18-Nov-10 8:31 
The exception is too general, that might hide problems later on. It'd be preferable to loop through the processes, and to exit if "db2krun" is running. Like this;
VB.NET
Dim pProcess() As Processes = System.Diagnostics.Process.GetProcessesByName("db2krun")
If pProcesses.Count > 0 Then
     MsgBox("The Database is currently being used by Ariane. Easy ECN will exit now.")
     Application.Terminate
End If

Most importantly, this code would cause your application to exit, as opposed to killing the other application. Imagine a grumpy old man, on a day without coffee. I've been typing in this Ariane for what feels like hours, and just when I'm about to hit the "save" button, and some guy kills the application! What's more, some applications refuse to restart if they're killed at the wrong moment.

The nice thing to do, is to refuse to start at all; the user hasn't any unsaved work in your application, it just began initializing.
I are Troll Suspicious | :suss:

QuestionVB.Net and SQL Server Reporting Pin
Central_IT17-Nov-10 3:21
Central_IT17-Nov-10 3:21 
AnswerRe: VB.Net and SQL Server Reporting Pin
Dave Kreskowiak17-Nov-10 4:18
mveDave Kreskowiak17-Nov-10 4:18 
QuestionDelete/Remove test certificate [SOLVED] Pin
vijay248216-Nov-10 22:44
vijay248216-Nov-10 22:44 
AnswerRe: Delete/Remove test certificate Pin
Dave Kreskowiak17-Nov-10 3:31
mveDave Kreskowiak17-Nov-10 3:31 
GeneralRe: Delete/Remove test certificate Pin
vijay248217-Nov-10 4:24
vijay248217-Nov-10 4:24 
GeneralRe: Delete/Remove test certificate Pin
Dave Kreskowiak17-Nov-10 5:09
mveDave Kreskowiak17-Nov-10 5:09 
GeneralRe: Delete/Remove test certificate Pin
vijay248217-Nov-10 5:27
vijay248217-Nov-10 5:27 
GeneralRe: Delete/Remove test certificate Pin
Dave Kreskowiak17-Nov-10 5:45
mveDave Kreskowiak17-Nov-10 5:45 
GeneralRe: Delete/Remove test certificate Pin
vijay248217-Nov-10 21:35
vijay248217-Nov-10 21:35 
QuestionNeed some help trying to figure this out. Pin
crain198116-Nov-10 13:23
crain198116-Nov-10 13:23 
AnswerRe: Need some help trying to figure this out. Pin
Dave Kreskowiak16-Nov-10 14:55
mveDave Kreskowiak16-Nov-10 14:55 
GeneralRe: Need some help trying to figure this out. Pin
crain198116-Nov-10 16:26
crain198116-Nov-10 16:26 
GeneralRe: Need some help trying to figure this out. Pin
Dave Kreskowiak16-Nov-10 17:15
mveDave Kreskowiak16-Nov-10 17:15 
GeneralRe: Need some help trying to figure this out. Pin
crain198118-Nov-10 13:01
crain198118-Nov-10 13:01 
GeneralRe: Need some help trying to figure this out. Pin
Dave Kreskowiak18-Nov-10 13:26
mveDave Kreskowiak18-Nov-10 13:26 
GeneralRe: Need some help trying to figure this out. Pin
crain198118-Nov-10 14:35
crain198118-Nov-10 14:35 
GeneralRe: Need some help trying to figure this out. Pin
Dave Kreskowiak18-Nov-10 16:58
mveDave Kreskowiak18-Nov-10 16:58 

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.