Dim strStartupArguments() As String = System.Environment.GetCommandLineArgs
Dim intCount As Integer
For intCount = 0 To UBound(strStartupArguments)
MessageBox.Show(strStartupArguments(intCount).ToString)
Next 'The first one is always the path&name of the application
if strStartupArguments(1) = "Hide Form Value" then 'remember it's a string we're dealing with
me.hide 'hide's the form
'or
me.close 'closes the form
end if
select case strStartupArguments(1)
case "-Key"
case "/Key"
case "Key"
case else
end select
select case strStartupArguments(2)
case "-dbpath"
case "/dbpath"
case "dbpath"
case else
end select