S
SLE
Hi there,
The Main() of a Windows Forms application launches a dummy, invisible form:
Sub Main()
Dim f As FormFoo
Try
f = New FormFoo
f.ShowDialog()
'
'-- perform some post-processing
'
Catch ex As Exception
...
Finally
If Not IsNothing(f) Then
f.Dispose()
End If
End Try
....
End Sub
Public Class FormFoo
Inherits System.Windows.Forms.Form
...
Private Sub FormFoo_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
With Me
If .Visible Then
.Hide()
End If
End With
End Sub
End Class
This works as expected, however when the user issues a logoff or shutdown,
my application ends (normally) but the system won't initiate the
shutdown/logoff :-|
Any clues?
Thanks,
The Main() of a Windows Forms application launches a dummy, invisible form:
Sub Main()
Dim f As FormFoo
Try
f = New FormFoo
f.ShowDialog()
'
'-- perform some post-processing
'
Catch ex As Exception
...
Finally
If Not IsNothing(f) Then
f.Dispose()
End If
End Try
....
End Sub
Public Class FormFoo
Inherits System.Windows.Forms.Form
...
Private Sub FormFoo_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Activated
With Me
If .Visible Then
.Hide()
End If
End With
End Sub
End Class
This works as expected, however when the user issues a logoff or shutdown,
my application ends (normally) but the system won't initiate the
shutdown/logoff :-|
Any clues?
Thanks,