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
Love the site however..
Long ago, when i was a bairn, there was a site called www.vbchat.com what had a chat room dedicated to vb guys. me and a few others would sit in there all day answering questions and asking eachother some. It was really nice to be able to bounce ideas of others and be...
On the data grid properties, edit the TableStyles collection. Add a new style or edit an existing one if there is one. Click on the GridColumnStyles collection node edit button. There should be a down arrow next to the Add button, click this and select datagridtextboxcolumn. Near the bottom...