如何打开Msteams从Winforms应用程序向用户发送消息(CHAT)?
private void ContactDataGrid_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 2) // Assuming it's the first column
{
Process.Start("mailto:" +
ContactDataGrid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
}
}
这是我的代码,将电子邮件超链接添加到我的DataGridView。该电子邮件取自文本框。我想做同样的事情,将联系人输入文本框中,然后可以单击此超链接以打开Microsoft团队以及联系人。
这可能吗?
private void ContactDataGrid_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 2) // Assuming it's the first column
{
Process.Start("mailto:" +
ContactDataGrid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
}
}
This is my code to add an email hyperlink to my datagridview. The email is taken from a textbox. I would like to do the same where I would enter a contact into a textbox and can then click this hyperlink to open up Microsoft Teams along with the contact.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
msteams:
url方案类似:然后,它可以打开Microsoft团队,并使用草稿消息准备发送给用户。
您可以在此处找到文档:
我只是用<<代码> msteam: URL方案。
You can use
msteams:
url scheme like this:Then it opens Microsoft Teams with a draft message ready to send to the user.
You can find the documentations here:
I just replaced the web URL with
msteam:
url scheme.我想您要使用 graplapapi 用于Microsoft Teams,因此您可以操纵您的应用程序与Microsoft团队聊天,频道和连接以及许多其他
最好的
I suppose you to use GraphAPI for Microsoft teams so you manipulate your application with Microsoft Teams chats, channels and connections and many else
Best