Passing command to opened file!

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Passing command to opened file!

  1. #1
    Join Date
    Sep 2005

    Question Passing command to opened file!

    hi all!!! =D

    i need to know, how, can i send command parameter to an opened file!!!
    following this part of code:

    Private Sub mnuclass2jadfile_Click()
    cdlFiles.Filter = "Files (*.class) |*.class"
    cdlFiles.DefaultExt = "class"
    cdlFiles.DialogTitle = "Open File"
    cdlFiles.Flags = cdlOFNFileMustExist + cdlOFNPathMustExist
    'On Error GoTo No_Open
    Open cdlFiles.FileName For Input As #1

    supposing i want send this command to opened file:

    ShellExecute Me.hwnd, "Open", "jad.exe", " jad *.class > \jad", "\jad", SW_SHOWNORMAL

    any suggestions!?

  2. #2
    Join Date
    Nov 2003
    Portland, OR
    I don't think you want to open the file. As I understand it, you want to prompt the user to select a .class file, then pass the selected file name to a program called jad.exe, correct? If so, try something like this:
    With cdlFiles
        .Filter = "Files (*.class) |*.class"
        .DefaultExt = "class"
        .DialogTitle = "Open File"
        .Flags = cdlOFNFileMustExist Or cdlOFNPathMustExist
        If Len(.FileName) Then
            Shell "d:\path\jad.exe " & .FileName
        End If
    End With
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Passing a file from the server to the client
    By Shaun in forum VB Classic
    Replies: 1
    Last Post: 02-07-2002, 12:31 PM
  2. Replies: 2
    Last Post: 09-07-2001, 04:06 AM
  3. Replies: 0
    Last Post: 08-27-2001, 10:21 AM
  4. Test a file to see if it's open
    By JohnN in forum VB Classic
    Replies: 12
    Last Post: 05-08-2001, 04:25 PM
  5. Replies: 6
    Last Post: 03-05-2001, 10:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center