|
Hi
I've got a pretty basic question. I've got an application that loads up one main form where users can login using face recognition. I want to include a button called "Alternate login". If the user clicks this button, another form should load providing an alternate means of logging in. But the other form should close though, and this new form must load in its place, with the same size etc. In essence, it shouldn't look like a new form is opened at all, it should simply look like only the controls on the form change.
Is there an efficient way to do this without actually hiding and showing controls? Another example would be a wizard interface, where the user clicks next the whole time and then the form stays the same, only the controls change.
|
|
|
|
|
Check out this tip/trick:
Multiple Subsequent Main Forms in C# Winform Apps.aspx[^]
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
or use a TabControl?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
now should one use user controls when the user hasn't logged in and been properly identified yet?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Etienne_123 wrote: users can login using face recognition. I want to include a button called "Alternate login".
If they use the "Alternate login", does that mean they have to wear a disguise or a mask?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
You've been able to implement facial recognition as a log-in and you need our help for this question?
How do you expect to just change the controls on the form without hiding and showing controls? Magically morph a Button into 2 TextBoxes, 2 RadioButtons, and a Button? (assuming your alternate login used those controls.
I guess what I would do if I were trying to do that would be to create a UserControl. Place your alternate login methods on that UserControl. Then, when they click the "Alternate Login" button or whatever, set that UserControl's size to the same as your form's ClientArea and then add it to your form.
When you create your form, place a panel over all of the controls on your form and when you add the UserControl, just make that panel.Visible = false.
But I'm sure there are hundreds of ways to do this.
|
|
|
|
|
I read many articles on String.Format, in my case I have a string variable that I want to specify its format 10a (a is alpha-numeric), I would like you to help me write this instruction , thank you in advance
|
|
|
|
|
This may seem a little wacky, but String.Format is generally used for formatting other types to a string. Strings themselves cannot really be formatted in any meaningful way.
Perhaps you could explain your problem a little more, and then maybe someone can help you with a solution.
|
|
|
|
|
So in my case I have a table which contains 6 colomns which corresponds to a code and its value, and this table contains the characteristics of this value with format.donc to read a file from the code and its value must be correctly formatted according to the table, so I need to specify the format in 10 alpha numeric, so how do this??
|
|
|
|
|
I would recommend a validation process. If you try to format the return you will get spurious results.
Try using Regular Expressions to validate the value. ^[a-zA-Z0-9]{10}\z should do the job.
|
|
|
|
|
I believe this should do it.
myString = myString.PadLeft(10);
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
If you want "10a" (as opposed to " a"), you would use
myString = string.Format("10{0}", a);
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
It's unclear what you are asking; please provide "before" and "after" examples.
|
|
|
|
|
myString = myString.PadLeft(10, '0');
would keep it all-alphanumeric.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
string.Format("{0,10}", "a")
|
|
|
|
|
that fills with spaces, one could argue the result isn't all alphanumeric.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
thank you very much to all of you, I'll try all these proposals and I will post the solution works
|
|
|
|
|
So we must convert the type specified by theFormatting Numeric Results Table []
that correct??
modified on Friday, May 21, 2010 1:04 PM
|
|
|
|
|
Dude - only you know the requirements.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
i need source code for simple user login page
|
|
|
|
|
I need a couple of million pounds sterling.
You help me; I'll help you.
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
So, you think we will do it for you??
Be an Eagle, Sky is Yours.
|
|
|
|
|
Hello, you must be new here. Can you please read the thread at the top of this forum entitled "How to get answer to your question".
Thanks
|
|
|
|
|
Does your employer know that you don't have any idea how to program? Worse, that you can't even be bothered to try and figure it out: you just want other people to do your work for you.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|