PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
"Unexpected error" strangeness...(ipaq vb.net)
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
"Unexpected error" strangeness...(ipaq vb.net)
![]() |
"Unexpected error" strangeness...(ipaq vb.net) |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I've written an app that contacts a web server in order to log in, grab and
display info based on serial numbers entered, and add the info to a "cart" of sorts on the web server. It's in vb.net, and uses InputBox(...) for the login form (which is shown in the main form's Load event handler) and HttpWebRequest objects to communicate with the server. The app ran fine in the emulator that comes with vs.net 2003, so i made an msi of it and shared it for testing. The installer appeared to work fine as well, but upon running the program we see all sorts of strangeness... * The input panel doesn't appear on the menu bar for the login form (a modal dialog a la InputBox). * MSN Messenger is the active form when the login form is closed. Messenger was not running when the app started. * The tester has a keyboard installed, and managed to fill in the login form. Once he hit "ok", the main form popped up....but immediately, a message about an "unexpected error" appeared--IN THE INFO TEXTBOX. No dialog, no "details" button, none of that. The error appeared, the main form stayed for another half second or so, and then the app died. * All this happens every time the app runs. I'd probably see more strangeness if i could keep it running. :P The testing PDA is an iPaq 5450 (PPC 2002, windows v3.0.11171 [build 11178]) with .net CF v1.0 SP2. The emulator appears to be running .net v1.0, but the windows version number is identical to the PDA's. Both machines have plenty of memory left. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Is there any way you can get a PDA, and connect it to your development box?
You'd be able to debug and step through your application to find out more details of what's going wrong. If not, distribute a debug build, and saturate the source with debug logging comments which log details of stages to disk, and allow you then to track where the application got to, where it didn't and what errors are coming up. Finally, ensure you're using try/catches, and get the Exception.Message and Exception.StackTrace to help narrow down the bugs. Good luck! "I HATE PDAs" <I HATE PDAs@discussions.microsoft.com> wrote in message news:6DF4A1AF-BE8C-4E69-BB6B-416D323B3DA3@microsoft.com... > I've written an app that contacts a web server in order to log in, grab > and > display info based on serial numbers entered, and add the info to a "cart" > of > sorts on the web server. It's in vb.net, and uses InputBox(...) for the > login form (which is shown in the main form's Load event handler) and > HttpWebRequest objects to communicate with the server. > > The app ran fine in the emulator that comes with vs.net 2003, so i made an > msi of it and shared it for testing. The installer appeared to work fine > as > well, but upon running the program we see all sorts of strangeness... > > * The input panel doesn't appear on the menu bar for the login form (a > modal > dialog a la InputBox). > * MSN Messenger is the active form when the login form is closed. > Messenger > was not running when the app started. > * The tester has a keyboard installed, and managed to fill in the login > form. Once he hit "ok", the main form popped up....but immediately, a > message about an "unexpected error" appeared--IN THE INFO TEXTBOX. No > dialog, no "details" button, none of that. The error appeared, the main > form > stayed for another half second or so, and then the app died. > * All this happens every time the app runs. I'd probably see more > strangeness if i could keep it running. :P > > The testing PDA is an iPaq 5450 (PPC 2002, windows v3.0.11171 [build > 11178]) > with .net CF v1.0 SP2. The emulator appears to be running .net v1.0, but > the > windows version number is identical to the PDA's. Both machines have > plenty > of memory left. |
|
|
|
#3 |
|
Guest
Posts: n/a
|
The emulator is a wholly unsuitable target for testing a real application -
useful for basic beginning dev, but not testing. You must have real hardware to test against. -- <ctacke/> www.OpenNETCF.org Your CF searches start and end here "I HATE PDAs" <I HATE PDAs@discussions.microsoft.com> wrote in message news:6DF4A1AF-BE8C-4E69-BB6B-416D323B3DA3@microsoft.com... > I've written an app that contacts a web server in order to log in, grab > and > display info based on serial numbers entered, and add the info to a "cart" > of > sorts on the web server. It's in vb.net, and uses InputBox(...) for the > login form (which is shown in the main form's Load event handler) and > HttpWebRequest objects to communicate with the server. > > The app ran fine in the emulator that comes with vs.net 2003, so i made an > msi of it and shared it for testing. The installer appeared to work fine > as > well, but upon running the program we see all sorts of strangeness... > > * The input panel doesn't appear on the menu bar for the login form (a > modal > dialog a la InputBox). > * MSN Messenger is the active form when the login form is closed. > Messenger > was not running when the app started. > * The tester has a keyboard installed, and managed to fill in the login > form. Once he hit "ok", the main form popped up....but immediately, a > message about an "unexpected error" appeared--IN THE INFO TEXTBOX. No > dialog, no "details" button, none of that. The error appeared, the main > form > stayed for another half second or so, and then the app died. > * All this happens every time the app runs. I'd probably see more > strangeness if i could keep it running. :P > > The testing PDA is an iPaq 5450 (PPC 2002, windows v3.0.11171 [build > 11178]) > with .net CF v1.0 SP2. The emulator appears to be running .net v1.0, but > the > windows version number is identical to the PDA's. Both machines have > plenty > of memory left. |
|
|
|
#4 |
|
Guest
Posts: n/a
|
"Dan Bass" wrote:
> Is there any way you can get a PDA, and connect it to your development box? > You'd be able to debug and step through your application to find out more > details of what's going wrong. > > If not, distribute a debug build, and saturate the source with debug logging > comments which log details of stages to disk, and allow you then to track > where the application got to, where it didn't and what errors are coming up. > > Finally, ensure you're using try/catches, and get the Exception.Message and > Exception.StackTrace to help narrow down the bugs. Heh. Shortly after posting the original message, i did all of that. I'm a bit annoyed at myself for not having thought of it before i complained to y'all, but i'm pretty new to VB and PDA development and thought it might be a compatibility thing with the PDA. (From what i'd seen, an ipaq has more little quirks than most other PDAs.) Fun part is, once i put the logging and exception handling in, things magically just worked. I took the logging out, and so far it still works. The only thing i noticed was something about a WebException (for now i just put in a generic exception handler that catches everything and MsgBox'es the ..message for it), but that was to be expected since the PDA didn't have internet access at the time. I'm still curious as to why the error message appeared in the textbox as opposed to popping up a dialog...but as long as the stuff works, i can live without worrying too much about that. ![]() BTW...I've noticed on most forms, when you enter a text box the input panel pops up. On my login form, though, it doesn't. (Recall that the login form is really an InputBox, as the "login code" is a unique id.) Is there a way to make this happen when one uses InputBox to ask for info, or do i have to make a real form and have an event handler show the panel? / |
|
|
|
#5 |
|
Guest
Posts: n/a
|
You should catch Focus event to activate a SIP and hide the SIP on
LostFocus event. The best way is to write your own TextBoxEx control which is derived from TextBox control and call this function on Focus/LostFocus events: public static void SIPShow(bool show) { SipShowIM(show ? SIPF_ON : SIPF_OFF); } const uint SIPF_OFF = 0x0; const uint SIPF_ON = 0x1; [DllImport("coredll.dll")] private extern static void SipShowIM(uint dwFlag); Best regards, Sergey Bogdanov I HATE PDAs wrote: > "Dan Bass" wrote: > > >>Is there any way you can get a PDA, and connect it to your development box? >>You'd be able to debug and step through your application to find out more >>details of what's going wrong. >> >>If not, distribute a debug build, and saturate the source with debug logging >>comments which log details of stages to disk, and allow you then to track >>where the application got to, where it didn't and what errors are coming up. >> >>Finally, ensure you're using try/catches, and get the Exception.Message and >>Exception.StackTrace to help narrow down the bugs. > > > Heh. Shortly after posting the original message, i did all of that. I'm a > bit annoyed at myself for not having thought of it before i complained to > y'all, but i'm pretty new to VB and PDA development and thought it might be a > compatibility thing with the PDA. (From what i'd seen, an ipaq has more > little quirks than most other PDAs.) > > Fun part is, once i put the logging and exception handling in, things > magically just worked. I took the logging out, and so far it still works. > The only thing i noticed was something about a WebException (for now i just > put in a generic exception handler that catches everything and MsgBox'es the > .message for it), but that was to be expected since the PDA didn't have > internet access at the time. > > I'm still curious as to why the error message appeared in the textbox as > opposed to popping up a dialog...but as long as the stuff works, i can live > without worrying too much about that. ![]() > > BTW...I've noticed on most forms, when you enter a text box the input panel > pops up. On my login form, though, it doesn't. (Recall that the login form > is really an InputBox, as the "login code" is a unique id.) Is there a way > to make this happen when one uses InputBox to ask for info, or do i have to > make a real form and have an event handler show the panel? > > / |
|
|
|
#6 |
|
Guest
Posts: n/a
|
> Finally, ensure you're using try/catches, and get the Exception.Message
> and Exception.StackTrace to help narrow down the bugs. Just to be clear, Exception.StackTrace is not supported on CF 1.0 Cheers Daniel -- http://www.danielmoth.com/Blog/ "Dan Bass" <danielbass [at] postmaster [dot] co [dot] uk> wrote in message news:eK6GvV17EHA.3840@tk2msftngp13.phx.gbl... > Is there any way you can get a PDA, and connect it to your development > box? > You'd be able to debug and step through your application to find out more > details of what's going wrong. > > If not, distribute a debug build, and saturate the source with debug > logging comments which log details of stages to disk, and allow you then > to track where the application got to, where it didn't and what errors are > coming up. > > Finally, ensure you're using try/catches, and get the Exception.Message > and Exception.StackTrace to help narrow down the bugs. > > Good luck! > > > "I HATE PDAs" <I HATE PDAs@discussions.microsoft.com> wrote in message > news:6DF4A1AF-BE8C-4E69-BB6B-416D323B3DA3@microsoft.com... >> I've written an app that contacts a web server in order to log in, grab >> and >> display info based on serial numbers entered, and add the info to a >> "cart" of >> sorts on the web server. It's in vb.net, and uses InputBox(...) for the >> login form (which is shown in the main form's Load event handler) and >> HttpWebRequest objects to communicate with the server. >> >> The app ran fine in the emulator that comes with vs.net 2003, so i made >> an >> msi of it and shared it for testing. The installer appeared to work fine >> as >> well, but upon running the program we see all sorts of strangeness... >> >> * The input panel doesn't appear on the menu bar for the login form (a >> modal >> dialog a la InputBox). >> * MSN Messenger is the active form when the login form is closed. >> Messenger >> was not running when the app started. >> * The tester has a keyboard installed, and managed to fill in the login >> form. Once he hit "ok", the main form popped up....but immediately, a >> message about an "unexpected error" appeared--IN THE INFO TEXTBOX. No >> dialog, no "details" button, none of that. The error appeared, the main >> form >> stayed for another half second or so, and then the app died. >> * All this happens every time the app runs. I'd probably see more >> strangeness if i could keep it running. :P >> >> The testing PDA is an iPaq 5450 (PPC 2002, windows v3.0.11171 [build >> 11178]) >> with .net CF v1.0 SP2. The emulator appears to be running .net v1.0, but >> the >> windows version number is identical to the PDA's. Both machines have >> plenty >> of memory left. > > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
Unless I have missed something in this thread, there is no need to pinvoke;
instead use InputPanel.Enabled = true/false as appropriate. Cheers Daniel -- http://www.danielmoth.com/Blog/ "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message news:%23g7ucjp8EHA.2180@TK2MSFTNGP12.phx.gbl... > You should catch Focus event to activate a SIP and hide the SIP on > LostFocus event. The best way is to write your own TextBoxEx control which > is derived from TextBox control and call this function on Focus/LostFocus > events: > > > public static void SIPShow(bool show) > { > SipShowIM(show ? SIPF_ON : SIPF_OFF); > } > > const uint SIPF_OFF = 0x0; > const uint SIPF_ON = 0x1; > > [DllImport("coredll.dll")] > private extern static void SipShowIM(uint dwFlag); > > > Best regards, > Sergey Bogdanov > > > I HATE PDAs wrote: >> "Dan Bass" wrote: >> >> >>>Is there any way you can get a PDA, and connect it to your development >>>box? >>>You'd be able to debug and step through your application to find out more >>>details of what's going wrong. >>> >>>If not, distribute a debug build, and saturate the source with debug >>>logging comments which log details of stages to disk, and allow you then >>>to track where the application got to, where it didn't and what errors >>>are coming up. >>> >>>Finally, ensure you're using try/catches, and get the Exception.Message >>>and Exception.StackTrace to help narrow down the bugs. >> >> >> Heh. Shortly after posting the original message, i did all of that. I'm >> a bit annoyed at myself for not having thought of it before i complained >> to y'all, but i'm pretty new to VB and PDA development and thought it >> might be a compatibility thing with the PDA. (From what i'd seen, an >> ipaq has more little quirks than most other PDAs.) >> >> Fun part is, once i put the logging and exception handling in, things >> magically just worked. I took the logging out, and so far it still >> works. The only thing i noticed was something about a WebException (for >> now i just put in a generic exception handler that catches everything and >> MsgBox'es the .message for it), but that was to be expected since the PDA >> didn't have internet access at the time. >> >> I'm still curious as to why the error message appeared in the textbox as >> opposed to popping up a dialog...but as long as the stuff works, i can >> live without worrying too much about that. ![]() >> >> BTW...I've noticed on most forms, when you enter a text box the input >> panel pops up. On my login form, though, it doesn't. (Recall that the >> login form is really an InputBox, as the "login code" is a unique id.) >> Is there a way to make this happen when one uses InputBox to ask for >> info, or do i have to make a real form and have an event handler show the >> panel? >> >> / |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Yes, you are right that InputPanel can be showed as InputPanel.Enabled =
true but it requires that InputPanel must be placed on the form. I've suggested more completed approach; TextBox shows/hides input panel itself without any additional components. Best regards, Sergey Bogdanov Daniel Moth wrote: > Unless I have missed something in this thread, there is no need to pinvoke; > instead use InputPanel.Enabled = true/false as appropriate. > > Cheers > Daniel > -- > http://www.danielmoth.com/Blog/ > > > "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message > news:%23g7ucjp8EHA.2180@TK2MSFTNGP12.phx.gbl... > >>You should catch Focus event to activate a SIP and hide the SIP on >>LostFocus event. The best way is to write your own TextBoxEx control which >>is derived from TextBox control and call this function on Focus/LostFocus >>events: >> >> >>public static void SIPShow(bool show) >>{ >>SipShowIM(show ? SIPF_ON : SIPF_OFF); >>} >> >>const uint SIPF_OFF = 0x0; >>const uint SIPF_ON = 0x1; >> >>[DllImport("coredll.dll")] >>private extern static void SipShowIM(uint dwFlag); >> >> >>Best regards, >>Sergey Bogdanov >> >> >>I HATE PDAs wrote: >> >>>"Dan Bass" wrote: >>> >>> >>> >>>>Is there any way you can get a PDA, and connect it to your development >>>>box? >>>>You'd be able to debug and step through your application to find out more >>>>details of what's going wrong. >>>> >>>>If not, distribute a debug build, and saturate the source with debug >>>>logging comments which log details of stages to disk, and allow you then >>>>to track where the application got to, where it didn't and what errors >>>>are coming up. >>>> >>>>Finally, ensure you're using try/catches, and get the Exception.Message >>>>and Exception.StackTrace to help narrow down the bugs. >>> >>> >>>Heh. Shortly after posting the original message, i did all of that. I'm >>>a bit annoyed at myself for not having thought of it before i complained >>>to y'all, but i'm pretty new to VB and PDA development and thought it >>>might be a compatibility thing with the PDA. (From what i'd seen, an >>>ipaq has more little quirks than most other PDAs.) >>> >>>Fun part is, once i put the logging and exception handling in, things >>>magically just worked. I took the logging out, and so far it still >>>works. The only thing i noticed was something about a WebException (for >>>now i just put in a generic exception handler that catches everything and >>>MsgBox'es the .message for it), but that was to be expected since the PDA >>>didn't have internet access at the time. >>> >>>I'm still curious as to why the error message appeared in the textbox as >>>opposed to popping up a dialog...but as long as the stuff works, i can >>>live without worrying too much about that. ![]() >>> >>>BTW...I've noticed on most forms, when you enter a text box the input >>>panel pops up. On my login form, though, it doesn't. (Recall that the >>>login form is really an InputBox, as the "login code" is a unique id.) >>>Is there a way to make this happen when one uses InputBox to ask for >>>info, or do i have to make a real form and have an event handler show the >>>panel? >>> >>>/ > > > |
|
|
|
#9 |
|
Guest
Posts: n/a
|
"Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
news:%23g7ucjp8EHA.2180@TK2MSFTNGP12.phx.gbl... > You should catch Focus event to activate a SIP and hide the SIP on > LostFocus event. The best way is to write your own TextBoxEx control which > is derived from TextBox control and call this function on Focus/LostFocus > events: I know how i have to do it in my own forms.... but doing it that way involves reworking the way i show the login box in the first place. Right now, the code for the login stuff looks a bit like loginCode = InputBox("Login", "Login") which works....albeit with a little fighting between the two windows at startup. (the title bar swaps between the login dialog and the main form a few times before a window shows up.) One might assume that a function whose sole purpose is to gather keyboard input, would show a keyboard when the form popped up. :P / |
|
|
|
#10 |
|
Guest
Posts: n/a
|
Sure... the Original VB Poster is now aware of both options. Note that
building a custom control with designer support is only possible with C# Cheers Daniel -- http://www.danielmoth.com/Blog/ "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message news:%23hh0SSq8EHA.2316@TK2MSFTNGP15.phx.gbl... > Yes, you are right that InputPanel can be showed as InputPanel.Enabled = > true but it requires that InputPanel must be placed on the form. I've > suggested more completed approach; TextBox shows/hides input panel itself > without any additional components. > > Best regards, > Sergey Bogdanov > > > Daniel Moth wrote: >> Unless I have missed something in this thread, there is no need to >> pinvoke; instead use InputPanel.Enabled = true/false as appropriate. >> >> Cheers >> Daniel >> -- >> http://www.danielmoth.com/Blog/ >> >> >> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message >> news:%23g7ucjp8EHA.2180@TK2MSFTNGP12.phx.gbl... >> >>>You should catch Focus event to activate a SIP and hide the SIP on >>>LostFocus event. The best way is to write your own TextBoxEx control >>>which is derived from TextBox control and call this function on >>>Focus/LostFocus events: >>> >>> >>>public static void SIPShow(bool show) >>>{ >>>SipShowIM(show ? SIPF_ON : SIPF_OFF); >>>} >>> >>>const uint SIPF_OFF = 0x0; >>>const uint SIPF_ON = 0x1; >>> >>>[DllImport("coredll.dll")] >>>private extern static void SipShowIM(uint dwFlag); >>> >>> >>>Best regards, >>>Sergey Bogdanov >>> >>> >>>I HATE PDAs wrote: >>> >>>>"Dan Bass" wrote: >>>> >>>> >>>> >>>>>Is there any way you can get a PDA, and connect it to your development >>>>>box? >>>>>You'd be able to debug and step through your application to find out >>>>>more details of what's going wrong. >>>>> >>>>>If not, distribute a debug build, and saturate the source with debug >>>>>logging comments which log details of stages to disk, and allow you >>>>>then to track where the application got to, where it didn't and what >>>>>errors are coming up. >>>>> >>>>>Finally, ensure you're using try/catches, and get the Exception.Message >>>>>and Exception.StackTrace to help narrow down the bugs. >>>> >>>> >>>>Heh. Shortly after posting the original message, i did all of that. >>>>I'm a bit annoyed at myself for not having thought of it before i >>>>complained to y'all, but i'm pretty new to VB and PDA development and >>>>thought it might be a compatibility thing with the PDA. (From what i'd >>>>seen, an ipaq has more little quirks than most other PDAs.) >>>> >>>>Fun part is, once i put the logging and exception handling in, things >>>>magically just worked. I took the logging out, and so far it still >>>>works. The only thing i noticed was something about a WebException (for >>>>now i just put in a generic exception handler that catches everything >>>>and MsgBox'es the .message for it), but that was to be expected since >>>>the PDA didn't have internet access at the time. >>>> >>>>I'm still curious as to why the error message appeared in the textbox as >>>>opposed to popping up a dialog...but as long as the stuff works, i can >>>>live without worrying too much about that. ![]() >>>> >>>>BTW...I've noticed on most forms, when you enter a text box the input >>>>panel pops up. On my login form, though, it doesn't. (Recall that the >>>>login form is really an InputBox, as the "login code" is a unique id.) >>>>Is there a way to make this happen when one uses InputBox to ask for >>>>info, or do i have to make a real form and have an event handler show >>>>the panel? >>>> >>>>/ >> >> |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 


