By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,338 Members | 1,344 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,338 IT Pros & Developers. It's quick & easy.

DHTML editing control C# problem

P: n/a
I'm having problems using the DHTML control's ExecCommand() in C#.

Here are the parameters ExecCommand takes:
object.ExecCommand cmdID [, cmdExecOpt] [, pInVar]
Intellisense tells me I want to us a "ByRef pInVar as Object"

The SDK says pInVar is:
pInVar

Input parameter for the command, if any. This parameter is not

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!
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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:\\somefile";
object.execCommand("SaveAs", false, fileNameObj);

if the command does not require this parameter, you can
use
System.Reflection.Missing.Value missingValue =
System.Reflection.Missing.Value;
and pass that in. I think you can also pass in a null
object.
hope that helps.
-michael
-----Original Message-----
I'm having problems using the DHTML control's ExecCommand () in C#.
Here are the parameters ExecCommand takes:
> object.ExecCommand cmdID [, cmdExecOpt] [, pInVar]
Intellisense tells me I want to us a "ByRef pInVar as

Object"
The SDK says pInVar is:
pInVar

Input parameter for the command, if any. This
parameter is notrequired >for all commands. If it is included, the cmdExecOpt parametermust be >included as well.

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

.

Nov 13 '05 #2

P: n/a
Try null. ;)

Jon

"len smith" <ig******@yahoo.com> wrote in message
news:FJ**************@nwrdny01.gnilink.net...
I'm having problems using the DHTML control's ExecCommand() in C#.

Here are the parameters ExecCommand takes:
> object.ExecCommand cmdID [, cmdExecOpt] [, pInVar]


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

The SDK says pInVar is:
>pInVar
>
>Input parameter for the command, if any. This parameter is not

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!

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.