Welcome to Dream.In.Code
Become a C# Expert!

Join 150,427 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,085 people online right now. Registration is fast and FREE... Join Now!




Please could i have some advice

 
Reply to this topicStart new topic

Please could i have some advice

affinity1991
16 Mar, 2008 - 07:55 PM
Post #1

New D.I.C Head
*

Joined: 16 Mar, 2008
Posts: 2

Please could i have some help, i want to create a windows login form that when i log in, it takes me to another form that says logging in and then another one that i have logged in. I dont actually know how to link them up, could someone please start me off with the command and then let me try and finish please.

I have this so far so that you cannot attempt to login without entering a username and password

CODE
            if (!(string.IsNullOrEmpty(textBox1.Text)) && textBox1.Text != "")
            {
               ;
            }
            else
            {
                MessageBox.Show("A Username & Password is provided before you are able to login");
                textBox1.Focus();
            }
            if (!(string.IsNullOrEmpty(textBox2.Text)) && textBox2.Text != "")
            {
               ;
            }
            else
            {
                MessageBox.Show("A Username & Password is provided before you are able to login");
                textBox1.Focus();
            }


That is as far as i have actually got, i have designed all of my pages how i want them...

I am using microsoft visual C# 2005 Express Edition

Thanks

Affinity
User is offlineProfile CardPM
+Quote Post

affinity1991
RE: Please Could I Have Some Advice
16 Mar, 2008 - 07:57 PM
Post #2

New D.I.C Head
*

Joined: 16 Mar, 2008
Posts: 2

Please could i have some help, i want to create a windows login form that when i log in, it takes me to another form that says logging in and then another one that i have logged in. I dont actually know how to link them up, could someone please start me off with the command and then let me try and finish please.

I have this so far so that you cannot attempt to login without entering a username and password

CODE
if (!(string.IsNullOrEmpty(textBox1.Text)) && textBox1.Text != "")
            {
              ;
            }
            else
            {
                MessageBox.Show("A Username & Password is provided before you are able to login");
                textBox1.Focus();
            }
            if (!(string.IsNullOrEmpty(textBox2.Text)) && textBox2.Text != "")
            {
              ;
            }
            else
            {
                MessageBox.Show("A Username & Password is provided before you are able to login");
                textBox1.Focus();
            }


That is as far as i have actually got, i have designed all of my pages how i want them...

I am using microsoft visual C# 2005 Express Edition

Thanks

Affinity
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Please Could I Have Some Advice
16 Mar, 2008 - 07:57 PM
Post #3

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 7,166



Thanked: 78 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
You'll get a better response if you post your question in the C# forum, & not in the introduce yourself forum.

Welcome to Dream In Code! Please be patient, someone will help you with your code when they have a chance.
User is offlineProfile CardPM
+Quote Post

zakary
RE: Please Could I Have Some Advice
17 Mar, 2008 - 03:57 AM
Post #4

D.I.C Regular
Group Icon

Joined: 15 Feb, 2005
Posts: 420



Thanked: 8 times
Dream Kudos: 175
My Contributions
you need to do more work. Why do you need several forms this could be done in one form 2 at most. you will need some text boxes for your login. how will you handle login will you have a DB or are you using xml. all this you will need to figure out and all are fairly simple.
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Please Could I Have Some Advice
17 Mar, 2008 - 10:24 AM
Post #5

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 162 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Do not double post, it isnt going to get you help any faster. Topics merged smile.gif
User is offlineProfile CardPM
+Quote Post

affinity1991
RE: Please Could I Have Some Advice
25 Mar, 2008 - 05:55 PM
Post #6

New D.I.C Head
*

Joined: 16 Mar, 2008
Posts: 2

Oh, im sorry. I am not very gd at programming as i am 17 and i havent had any training at all...

Oh yes a reply to your question, i want it to be xml but i dont know where to start with the coding if someone could please help as i am havin quite a lot of difficulty.....

If i get this app working i will have actually completed a complicated task... I can learn from that code then


THX Affinity1991
User is offlineProfile CardPM
+Quote Post

zakary
RE: Please Could I Have Some Advice
26 Mar, 2008 - 04:45 AM
Post #7

D.I.C Regular
Group Icon

Joined: 15 Feb, 2005
Posts: 420



Thanked: 8 times
Dream Kudos: 175
My Contributions
first u will need do learn xml
xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<users>
<user>
<username>test1</username>
<password>test!21$</password>
<userid>0<userid/>
<mail>test@mail.com</mail>
</user>
<user>
<username>test2</username>
<password>$32ds2</password>
<userid>500<userid/>
<mail>test2@yahoo.com</mail>
</user>
</users>


then you will need to learn C# create a New Windows Application a form will be created for u, on you form add two(2) textBoxes one for the user name and one for the pass word, also add a button double click the button and it will take u to the code. Once you have done that Look in to System.IO.StreamReader this will allow you to work with your xml Database.
User is offlineProfile CardPM
+Quote Post

Ulricht
RE: Please Could I Have Some Advice
2 Apr, 2008 - 11:16 PM
Post #8

New D.I.C Head
*

Joined: 2 Apr, 2008
Posts: 1


My Contributions
Hey bud, all you need to do is to fool around with your show and hide methods. Practise, practise, practise.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 08:43PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month