|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
.net 2005 cannot show menu !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 ~~` "Agnes" <ag***@dynamictech.com.hk> schrieb: I suggest to post some code. Note that it doesn't make sense to show a main > 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 . 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/> 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]" <hirf-spam-me-here@gmx.at> ???????:ectjgBwLGHA.1***@tk2msftngp13.phx.gbl...Show quoteHide quote > "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/>
Show quote
Hide quote
"Agnes" <ag***@dynamictech.com.hk> schrieb: What's the problem? Simply replace the last line with > 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 '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/>
DateDiff function returning incorrect results in asp.net 2.0 vb
SOAP Body Time conversion and vb.net Just-In-Time Debugging????? Find specific pattern in a string SImple ADO.Net problem Msg Box not displaying messages Error Logging? Howto Transfer data from the DataTable into a SQL Database Shared Variable... Help me please... |
|||||||||||||||||||||||