问题
I didn't find out how to login from a form in C# to Skype. Is there a possibility to do that? e.g. I type my username and password in a form and when I click sign in, an instance of skype will launch and log me with my credentials.
Thanks a lot!
回答1:
You can launch skype with command-line arguments like this:
skype.exe /username:your.username /password:your.password
Found reference here, and tested working on my machine (Skype 5.1). It seems this is not officially documented, so it may disappear in future versions of Skype.
Use System.Diagnostics.Process.Start to launch a program from C#.
回答2:
May be you could make use of the Skype4COM, an activex component available from Skype. You can download it from : http://developer.skype.com/accessories
回答3:
This works only when the checkbox "sign me on when skype starts" is checked in the login window. Unless it doesn't.
来源:https://stackoverflow.com/questions/5419234/skype-login-from-c-sharp-form