Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
i use this method to move from login form to home form:
program:
Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MrSViews.HomeMain());

------------------------------------

home form :
load event :

CompanyConfig.CheckData frml = new CompanyConfig.CheckData();
frml.ShowDialog();


-----------------------------------------------

login :
if (loginCount != 0)
            {
//true got to home
              }
 else
            {
                LBLerrorMSG.Text = strings.PASSWORD_IS_NOT_CORRECT;
                LBLerrorMSG.ForeColor = ProjectColors.ErrorNormal;
                return;

            }


before showing home form , (return;) don't work in any code. and home form appear.

What I have tried:

i searched many in google but i can't find any answers ..
Posted
Updated 6-Jun-18 14:42pm
v3
Comments
j snooze 6-Jun-18 17:09pm    
did you debug and step through to verify "return" is hit? Did you also put a debug stop on your redirect to the home page to verify that is NOT getting hit at any time?
Golden Basim 6-Jun-18 17:24pm    
as the code in login form (above) it reached at "return; " and login form was closed , home form appeared

1 solution

You're not going to be able to Google an answer for this.

Your ONLY option to track this down is a single word: DEBUGGER

Step through the execution of the code, line by line, and watch what's going on and the examine the values of variables.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900