RE: [help] Process protection Class 09-04-2011, 10:48 AM
#2
i assume option strict has been set to 'on'
change the declarations of your constants, option strict on requires variable declarations
and change your event routine to have the same signature as the evnthandler (as stated by the error):
change the declarations of your constants, option strict on requires variable declarations
Code:
Const iStop As Byte = 0
Const iStart As Byte = 1
Const ProcessPriorityClass As Byte = 29and change your event routine to have the same signature as the evnthandler (as stated by the error):
Code:
Private Function StopProcessProtection(ByVal sender As Object, ByVal e As System.EventArgs) As Boolean
Try
StartProcessProtection(iStop)
Catch ex As Exception
MessageBox.Show(ex.Message & vbNewLine & ex.InnerException.ToString())
End Try
End Function


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)