Windows Security login form?

我们两清 提交于 2020-01-23 02:18:32

问题


Do you know the awesome looking form of Windows Live that asks you for your cerdentials?
Gmail Notifier has it too, somehow.

Is there any way I can invoke something like this in my application?


BEHOLD!


I wish to use this dialog for local authentication on a desktop app.


回答1:


You could look into calling CredUIPromptForWindowsCredentials:

From MSDN:

The CredUIPromptForWindowsCredentials function creates and displays a configurable dialog box that allows users to supply credential information by using any credential provider installed on the local computer.

But there is more to this than simply displaying the dialog and recieving / acting on input - you'll most likely be required to register an authentication provider on the system, among some other things I'm not entirely competent with explaining in any detail! Might give you a decent starting ground though.

UPDATE:

Oded compensated for my laziness and supplied the pinvoke.net link displaying definitions for this to be used in a managed environment:

CredUIPromptForWindowsCredentials PInvoke.NET Link



来源:https://stackoverflow.com/questions/5422140/windows-security-login-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!