|
Your question is a little vague. How do you plan to authenticate users (e.g. will you perform a lookup against a database; do you keep your user information in a text/XML file; are user IDs and passwords hard coded; how are passwords secured etc. ?).
If all you want is a form for users to enter user IDs and passwords (and assuming you're using VS), just create a new WinForms app, add a new Windows form or use the default form (Form1), and drag 2 textbox controls from the toolbox to the form surface. Then select the textbox you plan to use for the password and set its PasswordChar property to whatever character you want to display instead of the actual text of the password.
Next, add a button to the form, and set its text property to "Submit" or "Log In" or whatever makes you happy.
Finally, add a method that handles the Click event of the button (double-click the button on the design surface and this method will be stubbed out for you and the cursor will move to the stubbed handler method). Insert whatever logic applies to the way you want to authenticate users in the button's Click event handler method (or make a call to another method/type that handles user login), and you're done.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Thanks for reply great . can u help me in coding.
u r idea is vgood . pl give me coding it will help me a lot(i wnt code pl give me).
pl its vurgent for me.
waiting for u r reply
chand
|
|
|
|
|
It would be kind of pointless for me to provide any actual code, since I don't really know (except in vague terms) what you're trying to do.
Instead, I would recommend that you search the codeproject site or just google for an example. There are, I'm sure, hundreds of them on the internet.
For example:
This is a WinForms quiz application that includes a login page.[^]
Good luck.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello everyone,
I am currently trying to code a little Subnetting-Calc, trying to get as close to .NET-Standards as I can (and thus, get some practise with .NET-Standards).
One thing I want to do is to return a networks broadcast-address based on Client IP and subnet-mask.
I have a method getBroadcastAddressAsLong (which accepts 2 Params representing SubnetMask and Client-IP and returns the BroadcastAddress as LONG).
During testing, I first wanted to try if the IP-Addresses were valid, so I tried to create 2 IPAddresses which should be identical, one long (0xFFFFFF00) and one byte[] (0,255,255,255) and passed them to the IPAddress Constructor.
Unfortunatley, the byte[] constructor fails, throwing an ArgumentException with the "additional info: addres" (sic!).
That really does not help much, so it would be great if someone could tell me, what to pass along to get that byte[] constructor to work".
Version of .NET FW is 1.1 SP1
Cheers
Sid
|
|
|
|
|
sebs2004 wrote:
one long (0xFFFFFF00) and one byte[] (0,255,255,255) and passed them to the IPAddress Constructor.
Those are definitaly not the same.... try byte[] { 255,255,255,0 } instead...
xacc-ide 0.0.12 now with C#, MSIL, C, XML, ASP.NET and HLSL coloring - Screenshots
|
|
|
|
|
Thats something I forgot to mention:
I did try that.
If I supply the long (0xFFFFFF00), it works. If I call getAddressBytes on that Address, I get a byte[] with {0,255,255,255}.
Thats why I switched to the different Byteorder. I thought I might fail because it expects the byte[] with highest lowest byte first.
Nonetheless, it neither works with 0,255,255,255 nor with 255,255,255,0
Cheers
Sid
|
|
|
|
|
i get this same issue.
does anyone have any idea how to resolve it?
|
|
|
|
|
Hi all!!
I'm trying to compile a code downloaded from the internet. It's an example of using sockets in .Net Framework. The problem is than when I tried to execute it, an error appears saying:
"Failed to stablish a connection as the destination computer has refused this connection"
The last sentence is a translation of the spanish one that appears on my computer.. it won't be exacty the same for english systems.
I suppose I have to kind of open the socket or something but I don't know what.
Any one knows what should I do?
Thanks!!
|
|
|
|
|
|
Check to make sure that any firewall running on the server machine (even if it's the local machine) is allowing connections on whatever port your using.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I've got a datagrid.
I have a function which selects certain rows in a datagrid thus:
public void selectRows(string key, string columnName)
{
int count = 0;
foreach(DataRow dr in ((DataView)dg_aspects.DataSource).Table.Rows)
{
if(dr[columnName].ToString()==key)
dg_aspects.Select(count);
else
dg_aspects.UnSelect(count);
count++;
}
}
This works, but when the user clicks a column header to sort the datagrid, the selected columns remain at the same index.
For example - if the top two rows are selected initially.
After sort - the top two rows are still selected, but the datagrid is showing different results in those rows.
It appears that the DataTable the DataGrid is showing, and the DataDource we work with aren't the same where sorting is concerned.
Does anyone know how to get a handle on the sorted DataTable?
I hope that's clear - thanks for taking a look
Steven
|
|
|
|
|
|
I would like to add a tabcontrol to a toolbar. There isn't any Articles that explain how this might be done that I can find, is this going to be possible?
The reason being I want to use HTML Help, I need a content, index and search facility as with:-
HtmlHelp library and example viewer By Klaus Weisser
But I need the whole screen width to be viewable as my HTML pages will either be a full 800x600 or 1024x768. I realise if I use a dockable toolbar then it can be placed 'always on top' over any part of the document (HTML page).
Any help or instruction would be appreciated.
Jason
|
|
|
|
|
Thats Ok I have answered my own questions now.
|
|
|
|
|
In my application, i have to perform wildcard search as provided by Visual Studio .NET Find\Replace module. Visual Studio provides 5 wildcard operators (*,#,?, [! ], []). I have to replace the wildcard with regular expressions. I am facing problem in 2 things.
1.to make a pattern for * operator which with input string say "Test string is to Test for testing purposes by tester" generates output like
- Test string is to Test for testing purposes by tester
- Test for testing purposes by tester
- testing purposes by tester
- tester
2. these operators can be used in combination, so what do u think my basic regular expression will work in combinations?
Anybody worked for wild card search? or know about some stuff to use for such conversion?
Aisha Ikram
|
|
|
|
|
I need a custom print dialog in an application and there is only one small problem left. How do I call the Printer Properties dialog (the one that shows the driver-specific properties of the printer)? There seems to be no built in support for this in .NET so I assume I have to call some DLL (drivers?) to reach this.
Best Regards
pahlsson
|
|
|
|
|
Hello,
Can anyone guide me on how to make my own datatype, that will work same as string but with some difference in the way string implements CompareTo method. It is not possible to extend String class (it is sealed). or is there any chance that I can change string's CompareTo implementation.
I need to use this datatype in DataView and TableStyles.
Thanks in advance.
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Why not just make a static function "MyCompareTo" that u can call instead of string's CompareTo ?
|
|
|
|
|
hi all,
I want to add Windows Form Dialog to Tab Control.we can add controls like text box,labels to TabControl Page.But it is difficult to add Windows Form Dialog to TabControl.
if any one know to do it,please reply me.
Thanks in advance...
|
|
|
|
|
|
That's not entirely true. The Form class derives from Control so it is possible to add a Form to a Controls collection. All you need to do is set the "child" forms' .TopLevel property to False . I know what your thinking, .TopLevel doesn't show up in Intellisense! But, it does show up in the Object browser as a hidden Public property.
I found this little tidbit on MSDN about a year ago, here: Five Tricks for Your Visual Basic .NET Bag[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
A dialog is a top-level window, meaning it can't be parented to a container control like a TabPage . If you want to reuse a UI that you currently have in a dialog, then implement it in a UserControl that you can use both on your dialog (Form ) and your TabControl .
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
|
Many Thanks for reply.Now I did it using UserControl.
|
|
|
|
|