我想使用以下 C# 代码设置我的 Skype 头像:
string path = "C:\\a.jpg";
string cmdstr = "SET AVATAR" + " " + "1" + " " + path;
Command cmd = new Command(0, cmdstr);
skype.SendCommand(cmd);
此代码不起作用,但如果我在 VBA 中使用此代码,它可以工作:
Public skype As New Skype
Dim cmdStr, path As String
path = "C:\a.jpg"
cmdStr = "SET AVATAR" + " " + "1" + " " + path
skype.SendCommand skype.Command(0, cmdStr)
它与图像的扩展有关还是我遗漏了什么?