• No one special (unregistered)

    Because this is not a spelling contest, we will start with the PreTEST, go <i>throught</i> the course and then take the PostTest.

    Test early and test often because we have lots of bugs to fix.

  • Steve O. (unregistered)

    Boggling over why you would do a windows form message box on web app. (or did I miss something)?

  • Ryan (unregistered)

    I develop locally all the time, and it never, ever occurred to me to use Windows Forms as part of my web apps. I guess this is the sort of thing that happens when developers work in isolation.

  • Manuzhai (unregistered)

    There's some JavaScript in your RSS item for this entry, you might want to fix that.

    Other than that, keep the funny code coming!

  • Tim Cartwright (unregistered)

    The beep was funny as hell, but this is just atrocious. Kinda makes me wonder if the developer unit tested, or had this QA'ed. Same thing with windows services. NO MSGBOXES!.....

    Jake, I truly feel your pain!

  • Jake (poster) (unregistered)

    Yeah.. combined with the other two threads, it has created an interesting scenerio...

    Good thing was that these horrible code snippets could easily be taken out without any refactoring or crazy modifications..

  • Logio (unregistered)

    Tell me that this was developed in a college cirriculum... :^)

  • Mike Dimmick (unregistered)

    If I was feeling charitable, I could suggest that it was just message box debugging by someone who doesn't know how to use a debugger properly...

    ...nah.

    Of course in VB6 you basically had to do this because your program ran in a totally different environment in the debugger - you weren't actually testing your compiled code. Still, not a great idea. You can use the VC++ debugger, but even with symbolic debug information built for the program/DLL, you couldn't see what the heck was going on.

  • Tim Cartwright (unregistered)

    "Of course in VB6 you basically had to do this because your program ran in a totally different environment in the debugger "

    Mike - take a look at the OutputDebugString API along with using the SysInternals debug monitor. Much easier to output this info, and use its info to debug than attaching a debugger, also less nasty than forgetting a debug msgbox in prod code......

    http://www.sysinternals.com/ntw2k/freeware/debugview.shtml

    Public Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String)

  • TheF0o1 (unregistered)

    This is truly baffling. At least it beeps to let someone near the server know they need to OK the message box ;)
    I can only imagine talking to the writer of this code... "Platform? This has nothing to do with politics!... Tier? What do you mean?... Oh, I see, you're crying."

  • Meh (unregistered)

    Maybe the messagebox was in the spec!
    (Although I'm sure Jake, being the bitch with the spec would've filled us in on that.)

  • Matthew W. Jackson (unregistered)

    This code isn't a problem. Homer Simpsons had already found a solution:

    http://science.howstuffworks.com/question608.htm

  • RJ (unregistered)

    Strange, that code should work. Straight from MSDN: "ServiceNotification: The message box is displayed on the active desktop". Clearly the active desktop is the one with the user's browser.

    [/sarcasm]

  • fgb (Michael) (unregistered)

    Um... actually the code to show a modal dialog is MessageBox.Show, not msgbox, and since you can't instantiate the MessageBox class (it only has the one static method), msgbox.Show isn't a reference to that method.

    Maybe msgbox is a custom webcontrol like this one: http://home.telkomsa.net/businessware/DotNet/Development/MsgBox/Article/Article_Web.html?

  • Alex Papadimoulis (unregistered)

    fgb (Michael),

    If Msgbox is infact a custom web control, then having it take parameters from the System.Windows.Forms namespace is indeed a WTF of its own. But I think you're giving too much credit! Knowing this coder, he probably did "Dim msgbox As System.Windows.Forms.MessageBox" to make it easier to reference. That would also explain why it's not MsgBox.

  • Tj (unregistered)

    I bet you he uses MessageBox so much he did this:

    using msgbox=System.Windows.Forms.MessageBox;

    now he can do msgbox.Show();

  • &#183; (unregistered)

    Or the coder simply doesn't know how to use static methods, so he/she instantiated the class just to use static methods.

  • Matthew W. Jackson (unregistered)

    That's a big problem I have with VB.NET...accessing static methods off of an instance. It makes absolutely no sense.

  • Alex Papadimoulis (unregistered)

    Anyone notice the Clearing of the Viewstate (which, for those not well versed in ASP.NET, is a INPUT TYPE=HIDDEN form element) before redirecting? Rather pointless if you'd ask me!

  • Jeff (unregistered)

    Actually in VB.NET there is a function called MsgBox defined in the Microsoft.VisualBasic namespace. There's lots of old VB functions in there as well.

  • Whiskey Tango (unregistered)

    On top of everything else, there's this:

    When your answer is incorrect (2), you get a single messagebox saying your answer is incorrect.

    When your answer is correct (1), you get two messageboxes - the first one saying you are incorrect!

Leave a comment on “Hurry, click the Message Box ...”

Log In or post as a guest

Replying to comment #:

« Return to Article