Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / funny thing with Visual Studio 2005 From Editor...

Author
Message
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 9th Mar 2006 08:20
for those who have VS2005.net (not sure if this works in older versions)

make a new Windows Form project, make a new class that inherits from a control object of some type.

IE


now, compile your program and then close it.
now in the ToolBox in the Form designer, there should be your "Blah" object, drag and drop it on the form. go back to your "Blah" class, and override the OnPaint method and have it pop up a messagebox:

save, compile, and close, (I know, it's a pain, stupid messageboxes...)
ok, now go back to the form designer.

do you get a bunch of messageboxes popping up like I did?


This just in: White lab coats cause cancer in mice. Details comming soon.
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Mar 2006 11:16
You would do, especially at the start of the program, as OnPaint deals with painting of windows...

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th Mar 2006 14:17


FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 9th Mar 2006 17:43
i just wish i would've know this while i was in school...

...good prank to pull

plant this in the overload
#region base.OnPaint(e);
base.OnPaint(e);
MessageBox.Show();
#endregion

most of the kids in my class wouldn't have been smart enough to find that...
or put the whole overloaded method in the region tags...


This just in: White lab coats cause cancer in mice. Details comming soon.

Login to post a reply

Server time is: 2024-11-16 17:50:04
Your offset time is: 2024-11-16 17:50:04