c# - I'm creating a Windows Forms application, how can I ask the user to enter name in block letters? -
i have started windows forms application. when registration form runs, should ask user enter name in block letters, text box should not left null, , how create text should alpha numeric?
to set textbox uppercased can run this:
textbox.charactercasing = charactercasing.upper;
to make non-null-able, need check if there text on on button press event. this:
if(string.isnullorwhitespace(textbox.text)) { messagebox.show("you need input name."); }
remember change textbox
textbox name.
Comments
Post a Comment