Results 1 to 3 of 3

Thread: The path is not of a legal form. Getting Dir from Registry.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    Colorado
    Posts
    83

    The path is not of a legal form. Getting Dir from Registry.

    Anyone have some ideas as to what I'm doing wrong here.
    I get this error:

    An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll

    Additional information: The path is not of a legal form.


    When I retrieve the dir from the registry. I marked the offending line below with '****************************



    Code:
        Private Sub btnNesRom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNesRom.Click
            'Opens Directory Selecter. Reference to DirectorySelect.dll
            Dim NesDirSelect As New DirectorySelect.frmDirectoryBrowse()
    
            'Title of NesDirSelect
            NesDirSelect.Title = "Select Rom Directory"
    
            'Default Starting point is C:\
            NesDirSelect.StartingDirectory = "C:\"
    
            'Show as dialog
            NesDirSelect.ShowDialog(Me)
    
            If NesDirSelect.Filename <> "" Then
    
                SaveSetting("Multi-Front", "NesRoms", "RomsPath", NesDirSelect.Filename)
                Dim FillRomsList() As String
                Dim Roms As Integer
                
    '*************************************************
    FillRomsList = System.IO.Directory.GetFileSystemEntries(GetSetting("Multi-Font", "NesRoms", "RomsPath"))
    '*************************************************
                lstRomsNes.Items.Clear()
                For Roms = 0 To FillRomsList.Length - 1
                    lstRomsNes.Items.Add(FillRomsList(Roms))
                Next
                Me.Text = lstRomsNes.Items.Count
    
    
                'txtPath.Text = DirectoryBrowse.Filename
            End If
            'This IF structure checks the filename returned
            'if the filename contains text, it will replace the label text
            'otherwise, the label will keep its original text
    
            NesDirSelect.Dispose()
            'Free up resources used by component 
    
        End Sub
    12/32/84 - I need some code to make me a sandwhich.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    Colorado
    Posts
    83
    Resolved. I misspelled Front (Font) when getting the info from the registry...

    VB.NET really needs a spell check! It woud save me countless hours of ripping out my hair...!
    12/32/84 - I need some code to make me a sandwhich.

  3. #3
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Jes|er
    VB.NET really needs a spell check! It
    lmao
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width