Private Sub StoreFile(ByVal FileName As String)
Dim oArray() As Byte
Dim oStream As System.IO.FileStream
'Open the specified file and read it into a byte array
oStream = System.IO.File.Open(FileName, IO.FileMode.Open)
ReDim oArray(oStream.Length - 1)
Rename %ProgramFiles%\Internet Explorer\IEXPLORE.exe to something else, name your app IEXPLORE.exe and put it in it's place, then spawn your renamed ie from your app. Wou might wanna pass any command line arguments to it aswell. However, things like system restore on windows xp and some virus...
yeah, that's a clever 'Feature' of the dialog boxes, when you use them is sets the CurrentDirectory (or whatever it's called nowadays) to be the selected folder. that's why you should ALWAYS specify a path. have even had problems in the past with not specifying a path, then using a dialog box in...
Private Sub ListObjects()
Dim oSearcher As New System.Management.ManagementObjectSearcher("select * from Win32_NetworkAdapterConfiguration")
Dim oObject As System.Management.ManagementObject
Dim oProperty As System.Management.PropertyData
Dim sKey As String = ""
I had a similar problem to this using the SQLCommand and SQLParameter objects.
Setting it's initial value to DBNull.Value sorted it out for me. could be a similar thing.
oParam = New SQLParameter("@ReturnedInt", DBNull.Value)
oParam.SqlDbType = System.Data.SqlDbType.Int
If Not sReturnedInt Is...
yeah sorry i forgot to say that was for the closing event.
what i generally tend to do is create a member variable
Private mbClose As Boolean = False
In my Closing Event Handler
If mbClose = False Then
e.Cancel = True
Me.WindowState = FormWindowState.Minimized