Login Dialog

A

Amigaso

I am new to C#, but not new in programming.

I am trying to add a Login form to a test Win forms application.

Somewhere in the internet I found a post suggesting using LoginDlg, I added
the code provided

LoginDlg ld = new LoginDlg();
ld.ShowDialog();

but I am getting this comiple error.
Error 2 The type or namespace name 'LoginDlg' could not be found
(are you missing a using directive or an assembly reference?)

How can I find what using directive to add? I looked all over the place and
cannot find any reference to LoginDlg, is that a standard dialog in .Net?


TIA
 
H

Herfried K. Wagner [MVP]

Amigaso said:
I am trying to add a Login form to a test Win forms application.

Somewhere in the internet I found a post suggesting using LoginDlg, I
added the code provided

LoginDlg ld = new LoginDlg();
ld.ShowDialog();

but I am getting this comiple error.
Error 2 The type or namespace name 'LoginDlg' could not be found
(are you missing a using directive or an assembly reference?)


There is no predefined 'LoginDlg' class in the .NET Framework class library.
You'll either have to create your own or create it from a template when
adding a new form to the project.
 
A

Amigaso

Ok Thanks

Herfried K. Wagner said:
There is no predefined 'LoginDlg' class in the .NET Framework class
library. You'll either have to create your own or create it from a
template when adding a new form to the project.
 
L

Larry Smith

I am new to C#, but not new in programming.
I am trying to add a Login form to a test Win forms application.

Somewhere in the internet I found a post suggesting using LoginDlg, I
added the code provided

LoginDlg ld = new LoginDlg();
ld.ShowDialog();

but I am getting this comiple error.
Error 2 The type or namespace name 'LoginDlg' could not be found
(are you missing a using directive or an assembly reference?)

How can I find what using directive to add? I looked all over the place
and cannot find any reference to LoginDlg, is that a standard dialog in
.Net?

What kind of login are you dealing with? If you can't find anything in .NET
itself then have a look at "CredUIPromptForCredentials()" and
"CredUIConfirmCredentials()" in the WinAPI (and cousins). They're available
for XP and higher. I've never had a need to use them myself so I'm not sure
about the extent of their functionality.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top