Results 1 to 3 of 3

Thread: executable that accept parameters ?

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    56
    I had this problem last week with the winsock control, at MS they know that.......

    http://support.microsoft.com/support.../Q173/6/19.ASP

    Ok as usual i have to find a workaround for my application that i began with the mapisession and mapimessage that are not enough versatile to change the "from:" parameter.....it's not hacking but for real business purpose.

    SO, the only way to be able to change the "from: " parameter is to use the f*** winsock control that does'nt
    support to send an email twice in the same session without giving "winsock address already" in use.....


    If you quit the application and then reload it it will work.

    THe best way to reuse it at will would be to put it in dll but, again, you can't declare it as part of a dll ('cause you need a form),


    Another way would be to call the api, but i hate that bunch of fuzzy code......


    Is there another way like: make an executable with a form that could be called with parameters (elegant way isn't it ?) from another program, is there a way to make an executable that would take parameters ?





  2. #2
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722
    Yes.

    Code:
    Private Sub Form_Load()
        Select Case Command
            Case "/test"
                MsgBox "Paramater = /test"
            Case "/more"
                MsgBox "Paramater = /more"
            Case Else
                MsgBox "Usage:" & vbCrLf & "/test - Test" & vbCrLf & "/more - More"
        End Select
    End Sub
    This works perfectly.

    running MyApp.exe gives 'usage' messagebox.
    running MyApp.exe /test gives test msgbox.
    running MyApp.exe /more gives more msgbox.

    I'm sure you can figure out the rest yourself

    r0ach™
    Don't forget to rate the post

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    56

    Thumbs up

    thank you r0ach.......

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