Xenocaster Posted May 22, 2003 Posted May 22, 2003 I am trying to close my second form by using the Hide method in C#. It works in the Main class but not in the class of the form I want to close. I have the Hide method in a butoon event. Both classes are public. Quote
*Experts* Nerseus Posted May 22, 2003 *Experts* Posted May 22, 2003 Can you give us some more details about the two classes and what's not working (a compile error, runtime error, or just not working as you think it should)? If you can zip up the code that would be best. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Xenocaster Posted May 22, 2003 Author Posted May 22, 2003 (edited) Can you give us some more details about the two classes and what's not working (a compile error, runtime error, or just not working as you think it should)? If you can zip up the code that would be best. -Nerseus Thanks, I am new at programming so please exuse me for small mistakes. [edit] Attachment deleted - please upload again with no exe or dll files. [/edit] Edited May 23, 2003 by divil Quote
Xenocaster Posted May 24, 2003 Author Posted May 24, 2003 Thanks, I am new at programming so please exuse me for small mistakes. [edit] Attachment deleted - please upload again with no exe or dll files. [/edit] Here is the one sound file and just the cs files.pong_world_test.zip Quote
Xenocaster Posted June 6, 2003 Author Posted June 6, 2003 I was having trouble with using the Hide method from the SubMenu Class. It works from the primary MainMenu Class but not the SubMenu Class. Thanks Quote
aewarnick Posted June 6, 2003 Posted June 6, 2003 It would have been eisier if you had send us the whole thing. But that's ok. Why is this: SubMenu SUB = new SubMenu(); in the SubMenu class? So, you have one SubMenu instance that is already active, creating anothr one and you Hide() the new one. Is that what happens? Or doesn't the new one Hide() at all. Quote C#
Xenocaster Posted June 7, 2003 Author Posted June 7, 2003 It would have been eisier if you had send us the whole thing. But that's ok. Why is this: SubMenu SUB = new SubMenu(); in the SubMenu class? So, you have one SubMenu instance that is already active, creating anothr one and you Hide() the new one. Is that what happens? Or doesn't the new one Hide() at all. I create the SUB object in the MainMenu class unxder the static method SubMenuScreen so when I press the escape key I access that method and Show the SubMenu Form that is inherited from the Form class. The MainMenu class is inherited from the Form class too. When the SubMenu Class form is up I have another event in the SubMenu class that I have to create a SubMenu 0bject in order to access the Hide Method there. So, when I play the game I press escape and then the submenu comes up. When I try to press the button on the submenu to access the hide methos from the SubMenu class to Hide the SubMenu it doesn't work. I noticed it only worked whe I put the Hide method in the MainMenu.SubMenuScreen Method but nowhere in the SubMenu class whitch is what I want to do . Quote
Xenocaster Posted June 7, 2003 Author Posted June 7, 2003 Here is a VS version of the filespong_world_test.zip Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.