DHTML editing control C# problem

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

    #1

    DHTML editing control C# problem

    I'm having problems using the DHTML control's ExecCommand() in C#.

    Here are the parameters ExecCommand takes:[color=blue]
    > object.ExecComm and cmdID [, cmdExecOpt] [, pInVar][/color]

    Intellisense tells me I want to us a "ByRef pInVar as Object"

    The SDK says pInVar is:
    [color=blue]
    >pInVar
    >
    >Input parameter for the command, if any. This parameter is not[/color]
    required >for all commands. If it is included, the cmdExecOpt parameter
    must be >included as well.

    I have no idea what to pass it! I don't have this problem with Visual
    Basic because Visual Basic allows for optional parameters! Please help!


  • Michael Smith

    #2
    DHTML editing control C# problem

    some commands require this third parameter, so you can
    pass it as an object. for example, if you wanted to save
    the document to a file, you would write
    object fileNameObj = "c:\\somefi le";
    object.execComm and("SaveAs", false, fileNameObj);

    if the command does not require this parameter, you can
    use
    System.Reflecti on.Missing.Valu e missingValue =
    System.Reflecti on.Missing.Valu e;
    and pass that in. I think you can also pass in a null
    object.
    hope that helps.
    -michael


    [color=blue]
    >-----Original Message-----
    >I'm having problems using the DHTML control's ExecCommand[/color]
    () in C#.[color=blue]
    >
    >Here are the parameters ExecCommand takes:[color=green]
    > > object.ExecComm and cmdID [, cmdExecOpt] [, pInVar][/color]
    >
    >Intellisense tells me I want to us a "ByRef pInVar as[/color]
    Object"[color=blue]
    >
    >The SDK says pInVar is:
    >[color=green]
    > >pInVar
    > >
    > >Input parameter for the command, if any. This[/color][/color]
    parameter is not[color=blue]
    >required >for all commands. If it is included, the[/color]
    cmdExecOpt parameter[color=blue]
    >must be >included as well.
    >
    >I have no idea what to pass it! I don't have this[/color]
    problem with Visual[color=blue]
    >Basic because Visual Basic allows for optional[/color]
    parameters! Please help![color=blue]
    >
    >
    >.
    >[/color]

    Comment

    • Jon Davis

      #3
      Re: DHTML editing control C# problem

      Try null. ;)

      Jon

      "len smith" <ignostic@yahoo .com> wrote in message
      news:FJ1Ra.165$ 7O.122@nwrdny01 .gnilink.net...[color=blue]
      > I'm having problems using the DHTML control's ExecCommand() in C#.
      >
      > Here are the parameters ExecCommand takes:[color=green]
      > > object.ExecComm and cmdID [, cmdExecOpt] [, pInVar][/color]
      >
      > Intellisense tells me I want to us a "ByRef pInVar as Object"
      >
      > The SDK says pInVar is:
      >[color=green]
      > >pInVar
      > >
      > >Input parameter for the command, if any. This parameter is not[/color]
      > required >for all commands. If it is included, the cmdExecOpt parameter
      > must be >included as well.
      >
      > I have no idea what to pass it! I don't have this problem with Visual
      > Basic because Visual Basic allows for optional parameters! Please help!
      >
      >[/color]


      Comment

      Working...