Jump to content
Xtreme .Net Talk

cementboot

Members
  • Posts

    8
  • Joined

  • Last visited

cementboot's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Mutant, thanks for your help! I think I figured it out now. I wasn't initializing all of the forms and therefore some of them had the value of nothing.
  2. How can I refer to an form in array of forms? Hi, How can I refer to an form in array of forms? In my project, I have created an array of forms in a module like this: Module FormsArray Public ArrayOfForms(25) As clsDummyForm Public Sub CreateFormsArray(ByVal i As Integer) ArrayOfForms(i) = New clsDummyForm End Sub Public Sub CloseForms(ByVal i As Integer) ArrayOfForms(i).Close() End Sub End Module (clsDummyForm in the code above is a class in which I am inheriting System.Windows.Forms.Form) The problem occurs when I try to use the CloseForms() sub from another form like this: Public Class Form1 Private Sub CloseAllForms() For x As Integer = 1 To 25 CloseForms(x) Next End Sub End Class I get the error "Object is not set to an instance of an object". Any suggestions on how I can fix this? -thanks
  3. Ok, to solve this problem I ended up having to do some COM interop stuff. But it works, so here is the solution I used: 'Add reference to SHDocVw.dll Private Function EnumerateExplorerWindows(ByVal MyHwnd As Integer) As String Dim IEs As New SHDocVw.ShellWindows() Dim IE As SHDocVw.InternetExplorer For Each IE In IEs Try If IE.HWND = MyHwnd Then Dim u As New Uri(IE.LocationURL) Console.WriteLine("My Path Is: " & u.LocalPath) Return u.LocalPath End If Catch ex As Exception End Try Next End Function
  4. Thanks Killian35, that worked great!
  5. Is there any easy way to convert a string that contains a file URL ("file:///C:/") to file Path ("C:\") in VB .Net?
  6. Hi, I'm trying to get the path of a directory from a Windows Explorer window. So far, I have been able to use API calls to get the handle of a foreground window and determine if it is an explorer window. However, I can't figure out how to get the path of the directory that is currently displayed in that Explorer window. Is this possible to do using Win32 API? Thanks
  7. Hi, I am trying to figue out the easiest way to store files of any type in a database and then display them in a VB .net application. The concept sounds simple, but I have not been able to find a solution yet. I would be incredibly grateful for any feedback.
×
×
  • Create New...