chrisanderson

I have an odd problem. It seems all of a sudden, within an app i am developing, all occuraances of messagebox.show is ignored

To test, i set the first line of my program to a messagebox.show and it never gets displayed.

There are no errors either at compile or run time. Intellisence doesnt work

when i type messagebox. i have to type it in full

Any ideas much appreciated

Chris Anderson



Re: Windows Forms General messagebox.show strange behavior

ARK88

Does the messagebox actually display at runtime





Re: Windows Forms General messagebox.show strange behavior

nobugz

Getting both IntelliSense confused AND not seeing the message box is drastically strange. Try it in a little test project. Look for an identifier in your code that resembles "messagebox".





Re: Windows Forms General messagebox.show strange behavior

chrisanderson

Thanks for your replies,

No, it doesnt show at any point in my app.

Ive tried a messagebox command on a new test project, and that works fine.

Im baffled

Regards

Chris





Re: Windows Forms General messagebox.show strange behavior

chrisanderson

>Look for an identifier in your code that resembles "messagebox".

Sorry, dont know what you mean




Re: Windows Forms General messagebox.show strange behavior

nobugz

If you would have defined your own class "MessageBox", it would hide the one in the System.Windows.Forms namespace.





Re: Windows Forms General messagebox.show strange behavior

chrisanderson

Thanks for your reply,

no, i didnt define my own. Just used the standard system one.

The only thing i can think to do is to create a new project, and add bits to it one by one and test after each stage.

This will take some time, but cant think of anything else.

Thanks

Chris





Re: Windows Forms General messagebox.show strange behavior

Gavin Jin - MSFT

Hi,could you please paste some code,it is hard to say what's wrong with your application.






Re: Windows Forms General messagebox.show strange behavior

chrisanderson

Ok guys, ive cracked this one. Thought i'd share this with you to avoid the problem.

After a LOT of testing, cups of coffee and head scrating I know what the problem is.

At the time i reported the problem, i had put my system, clock back (for some other purpose nothing to do with this issue - for this explpanation lets say 15/7/07). I had prevously complied my project to a later date lets say 15/8/07.

I then inserted a messagebox.show command in my code (while my clock was 15/7/07) to test something and as you know it didnt work. Thats because when i pressed F5 it was using the old exe, ie 15/8/07. Even doing a build would not regenerate the exe file until i put my system clock back to what it should be (eg 15/8/07)

No errors - no warning messages!

Is this a bug or some wierd 'feature'

Thanks to everyone who replied.

Chris Anderson





Re: Windows Forms General messagebox.show strange behavior

nobugz

That would explain it. The builder decides what needs to be rebuild based on the timestamps of the source code file and the binary output file. Changing your clock messes that up. Doesn't explain IntelliSense problem though.





Re: Windows Forms General messagebox.show strange behavior

chrisanderson

Thanks for the clarification.

The intellisense problem went away after a reboot - no idea why.

Thanks everyone for the replies

Its a wrap

Chris