By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,575 Members | 1,948 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,575 IT Pros & Developers. It's quick & easy.

.net 2005 cannot show menu !

P: n/a
I got a login form . When user input the correct password, the Main menu
will be shown.Everything works under .net 2003.
however, after complie under 2005, Same program runs, the main menu didn't
show.
I use debugger to check , the process is hold during "frmMain.showdialog()
" and then done nothing .
Please Help ~~`


Feb 11 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Agnes" <ag***@dynamictech.com.hk> schrieb:
I got a login form . When user input the correct password, the Main menu
will be shown.Everything works under .net 2003.
however, after complie under 2005, Same program runs, the main menu didn't
show.
I use debugger to check , the process is hold during
"frmMain.showdialog() " and then done nothing .


I suggest to post some code. Note that it doesn't make sense to show a main
form modally. Instead use 'Application.Run(frmMain)'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 11 '06 #2

P: n/a
I had a module ~~~
Module start_acct
Public objUser As dtsclass.objLoginUser
Public frmCheckUpdate As CheckUpdate

Sub Main() 'in a main module.

Dim flogin As New frmlogin_acct
flogin.frmCheckUpdate = frmCheckUpdate
flogin.ShowDialog() <-- I can show the login form

If flogin.pSuccessLogin Then <-- if use 's password is correct, Main
menu will show

Try
Dim frmMain As New frmMain_acct
frmMain.pObjUser = objUser
frmMain.frmCheckUpdate = frmCheckUpdate
frmMain.ShowDialog() <------ cannot show

catch

From Agnes
"Herfried K. Wagner [MVP]" <hi***************@gmx.at>
???????:ec**************@tk2msftngp13.phx.gbl...
"Agnes" <ag***@dynamictech.com.hk> schrieb:
I got a login form . When user input the correct password, the Main
menu will be shown.Everything works under .net 2003.
however, after complie under 2005, Same program runs, the main menu
didn't show.
I use debugger to check , the process is hold during
"frmMain.showdialog() " and then done nothing .


I suggest to post some code. Note that it doesn't make sense to show a
main form modally. Instead use 'Application.Run(frmMain)'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 12 '06 #3

P: n/a
"Agnes" <ag***@dynamictech.com.hk> schrieb:
Public objUser As dtsclass.objLoginUser
Public frmCheckUpdate As CheckUpdate

Sub Main() 'in a main module.

Dim flogin As New frmlogin_acct
flogin.frmCheckUpdate = frmCheckUpdate
flogin.ShowDialog() <-- I can show the login form

If flogin.pSuccessLogin Then <-- if use 's password is correct,
Main menu will show

Try
Dim frmMain As New frmMain_acct
frmMain.pObjUser = objUser
frmMain.frmCheckUpdate = frmCheckUpdate
frmMain.ShowDialog() <------ cannot show

catch


What's the problem? Simply replace the last line with
'Application.Run(frmMain)'. In addition to that you may want to remove the
'Try...Catch' error handling code. Maybe one of the lines in front of the
line marked with "cannot show" throws an exception and thus the marked line
is never executed.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.