[VB.net] Accessing Command Line

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    [VB.net] Accessing Command Line

    Hi:

    I a newbie to VB, though I have a fair bit of experience with other
    languages. My problem is that I need to access the command. I have tried
    using:

    Private Sub ReportViewer_Lo ad(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles MyBase.Load
    Dim commandLine As String

    If Command$ <> Empty Then
    commandLine = Command
    'frmReportViewe r.ReportSource = Command
    End If
    End Sub


    I keep getting the error:
    'System.Windows .Forms.Command' is not accessible in this context because
    it is 'Private'.

    I am sure I am missing something very obvious. Could someone please point
    me in the correct direction?

    tia:
    John
  • Rick Rothstein [MVP - Visual Basic]

    #2
    Re: [VB.net] Accessing Command Line

    Almost everybody in this newsgroup is using VB6 or lower. While you may
    get a stray answer to VB.NET (including VB2003 and VB2005 which has
    dropped .NET from its name) questions here, you should ask them in
    newsgroups devoted exclusively to .NET programming. Look for newsgroups
    with either the word "dotnet" or "vsnet" in their name.

    For the microsoft news server, try these newsgroups for Visual Basic
    ..NET related questions...

    microsoft.publi c.dotnet.langua ges.vb
    microsoft.publi c.dotnet.langua ges.vb.upgrade
    microsoft.publi c.dotnet.langua ges.vb.controls
    microsoft.publi c.dotnet.langua ges.vb.data

    And these for more general .NET questions

    microsoft.publi c.dotnet.genera l
    microsoft.publi c.vsnet.general

    Note: There are many other .NET newgroups (use the first three "fields"
    from the last two as templates when searching for them), but the above
    ones should get you started.

    Rick



    "John" <john@test.ne t> wrote in message
    news:Xns96BB8D8 FBF2B1john@64.5 9.144.76...[color=blue]
    > Hi:
    >
    > I a newbie to VB, though I have a fair bit of experience with other
    > languages. My problem is that I need to access the command. I have[/color]
    tried[color=blue]
    > using:
    >
    > Private Sub ReportViewer_Lo ad(ByVal sender As System.Object, ByVal e[/color]
    As[color=blue]
    > System.EventArg s) Handles MyBase.Load
    > Dim commandLine As String
    >
    > If Command$ <> Empty Then
    > commandLine = Command
    > 'frmReportViewe r.ReportSource = Command
    > End If
    > End Sub
    >
    >
    > I keep getting the error:
    > 'System.Windows .Forms.Command' is not accessible in this context[/color]
    because[color=blue]
    > it is 'Private'.
    >
    > I am sure I am missing something very obvious. Could someone please[/color]
    point[color=blue]
    > me in the correct direction?
    >
    > tia:
    > John[/color]


    Comment

    • pellem
      New Member
      • Sep 2005
      • 3

      #3
      Check out this article:

      Parse and Validate Command Line Parameters with VB.NET

      Comment

      Working...