Results 1 to 3 of 3

Thread: Command$

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482
    hey, i have my program to open when u dbl click a file type, and it loads the file into my program...

    BUT, when i dbl click the icon, my program loads, but it just "FREEZES" up.. it works fine when i open the file from my program menu, ..

    And i am opening my file the *SAME* way.. i dun get it

    here is the MAIN part of my code

    Code:
    If Command$ <> "" Then
    Show
        Dim ff As Integer: ff = FreeFile
        Dim MyArray() As String
        Dim inCount As Integer: inCount = 1
            Dim PrintText As String
    On Error Resume Next
    
        Open Command$ For Input As #ff
        Do While Not EOF(ff)
            ReDim Preserve MyArray(inCount)
            Line Input #ff, MyArray(inCount)
            inCount = inCount + 1
        Loop
        Close #ff
        
    '[THIS PART EDITED OUT- ALL IT DOES IS PUT THE DATA WHERE I 'NEED IT TO GO
    
    If Err Then
    MsgBox "Unknown Error"
    End If
    
    End If

  2. #2
    Guest
    Whenever I use Command I notice quotes are placed around the filename.

    just do this

    Code:
    Dim MyCommandLine As String
    MyCommandLine = Replace(MyCommand, Chr$(34), " ")
    MyCommandLine = Trim$(MyCommandLine)
    Open MyCommandLine ' etc
    'etc
    This may not be your problem, but it was for me.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482
    Yo yo, thanks

    i did that b4, but something else was wrong so i re-did it, and silly me forgot to re-do that


    Thanks alot

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