Click here to Skip to main content
15,922,584 members
Home / Discussions / Mobile
   

Mobile

 
GeneralHelp me- Emulator not running Pin
hithesh8-May-05 7:46
hithesh8-May-05 7:46 
GeneralRe: Help me- Emulator not running Pin
eli150219799-May-05 0:44
eli150219799-May-05 0:44 
GeneralRe: Help me- Emulator not running Pin
hithesh9-May-05 6:49
hithesh9-May-05 6:49 
GeneralDownloading to device Pin
hithesh7-May-05 11:41
hithesh7-May-05 11:41 
Generalserver app in ppc 2002 emulator Pin
Anonymous7-May-05 4:46
Anonymous7-May-05 4:46 
Generalisolated storage Pin
balkang6-May-05 9:34
balkang6-May-05 9:34 
GeneralRe: isolated storage Pin
Dan_P6-May-05 13:43
Dan_P6-May-05 13:43 
GeneralDisplaying MessageBox makes my form disappear Pin
clenci6-May-05 2:04
clenci6-May-05 2:04 
Hi, guys.
Need some help here.
I've been struggling against what I believe is a bug for a week now.

I have a C# compact framework application that displays a Login form. something like :

<br />
Login frmlogin = new Login();<br />
frmLogin.ShowDialog();<br />
if (frmLogin.DialogResult != DialogResult.OK)<br />
{<br />
	Application.Exit();<br />
}<br />
frmLogin.Dispose();<br />



And the Login form has a "OK" button, with the following event handler :

<br />
private void btnOK_Click(object sender, System.EventArgs e)<br />
{<br />
	try <br />
	{		<br />
		loginObj.DoLogin();<br />
		this.DialogResult = DialogResult.OK;<br />
	}<br />
	catch (Exception ex)<br />
	{<br />
		MessageBox.Show(ex.Message,"Login Failed");<br />
	}<br />
}<br />


The loginObj object is my business object that handles login data validation, and other operations. The DoLogin() method validates the login data, and it throws an exception if there's any required data missing.

When the exception is thrown, the message box is displayed, and when the user closes the message box, the contents of the Login form disappears! The contents of the main form is displayed instead. But the title of the form still shows "Login". The form hasn't been closed, because I can't click on the main form's buttons.

When I check at the running programs, the login window is still there. If I choose "Stop" on the Running Programs tab of the Memory Settings, the Login form is closed in a way like the DialogResult was set to DialogResult.OK and the program works normally.

I believe this behavior has nothing to do with the loginObj object or with the exception it throws, since when I displayed another message box on the same form to test it, the same thing happened.

Another interesting thing is that it only happens on the login form. I made tests to show message boxes on other forms displayed with ShowDialog(), but there were no problems.

Anyone has seen something like that? Any ideas?

Any help will be greatly appreciated!
GeneralRe: Displaying MessageBox makes my form disappear Pin
clenci9-May-05 3:14
clenci9-May-05 3:14 
Questionhow do i call a printer? Pin
gundamhamtaro6-May-05 1:08
gundamhamtaro6-May-05 1:08 
GeneralFast pixel drawing on VB.net CF or C# Pin
CarlosMMartins5-May-05 5:27
CarlosMMartins5-May-05 5:27 
GeneralLocation information Pin
dboytime3-May-05 23:52
dboytime3-May-05 23:52 
GeneralStuck w/ a simple ReadFile?!!! Pin
georgiek503-May-05 16:19
georgiek503-May-05 16:19 
GeneralRe: Stuck w/ a simple ReadFile?!!! Pin
GDavy8-May-05 21:40
GDavy8-May-05 21:40 
GeneralRe: Stuck w/ a simple ReadFile?!!! Pin
georgiek5010-May-05 6:24
georgiek5010-May-05 6:24 
GeneralWM2003 to PPC2002 with eVC4 Pin
hopgun1-May-05 21:59
hopgun1-May-05 21:59 
GeneralRe: WM2003 to PPC2002 with eVC4 Pin
João Paulo Figueira2-May-05 3:47
professionalJoão Paulo Figueira2-May-05 3:47 
Generaldisplay bmp on pocket pc Pin
sasi_ps29-Apr-05 1:03
sasi_ps29-Apr-05 1:03 
GeneralRe: display bmp on pocket pc Pin
Mahesh J. Chavda3-May-05 1:51
Mahesh J. Chavda3-May-05 1:51 
GeneralRe: display bmp on pocket pc Pin
sasi_ps5-May-05 21:03
sasi_ps5-May-05 21:03 
GeneralRe: display bmp on pocket pc Pin
andrewtory@163.com5-May-05 20:28
andrewtory@163.com5-May-05 20:28 
Questionwhich pocket pc? Pin
hithesh25-Apr-05 19:59
hithesh25-Apr-05 19:59 
AnswerRe: which pocket pc? Pin
sasi_ps29-Apr-05 1:04
sasi_ps29-Apr-05 1:04 
Generalwince device drivers Pin
Iliyas24nie25-Apr-05 5:39
Iliyas24nie25-Apr-05 5:39 
GeneralPlease do... Pin
Sreekanth Muralidharan20-Apr-05 20:18
Sreekanth Muralidharan20-Apr-05 20:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.