Form Designer
-
k i will try to code it, if I need help again I will post another msg BTW do you know how can I (suppose I have a button control) remove some property in the PropertyGrid and replace it by my own. In my application, I add a propertyGrid and I want to show only some property for some controls, how can I do this ? Thanks Again James :)
BLaZiNiX wrote: BTW do you know how can I (suppose I have a button control) remove some property in the PropertyGrid and replace it by my own. Without creating your own class derived from PropertyGrid you can't replace specific properties with your own. The property grid shows all properties with a BrowsableAttribute set to BrowsableAttribute.Yes. So you could create your own psuedo-button class that encapsulates a Button, and pass that as the SelectedObject in the property grid. James Simplicity Rules!
-
BLaZiNiX wrote: I want to create something similar to the C# Form Designer include in the C# IDE but not too advanced, I just want to know how can I lock a Form in my Main Application Window, anybody know how to make something like this ? From what I can tell the VS.NET forms designer actually loads the form up into a temporary app domain and displays it in the window. To display a Form inside another form use this bit of code.
Form childForm = GetFormToDisplay();
childForm.TopLevel = false;
childForm.Location = GetLocation();this.Controls.Add(childForm);
You'll also have to hook several messages using Application.AddMessageFilter so that the child form can't be moved around (NCHITTEST plus some WM_SYSCOMMAND). I have another message here that explains how to use Application.AddMessageFilter James Simplicity Rules!
I believe you will need to do a childForm.Show() on that also. The Forms framework doesn't seem to do it for you. I used this technique a little while back to implement a Wizard97 look-a-like that allowed users to design their own forms and feed it to the primary Wizard form (sheet), all the wizard had to do was adjust a few properties and drop it into the mix, works well. Regards
-
I believe you will need to do a childForm.Show() on that also. The Forms framework doesn't seem to do it for you. I used this technique a little while back to implement a Wizard97 look-a-like that allowed users to design their own forms and feed it to the primary Wizard form (sheet), all the wizard had to do was adjust a few properties and drop it into the mix, works well. Regards
Neil Van Note wrote: I believe you will need to do a childForm.Show() on that also. The Forms framework doesn't seem to do it for you. LOL, yeah I always forget that; then wind up going over my code three times trying to find the bug ;P Simplicity Rules!
-
Neil Van Note wrote: I believe you will need to do a childForm.Show() on that also. The Forms framework doesn't seem to do it for you. LOL, yeah I always forget that; then wind up going over my code three times trying to find the bug ;P Simplicity Rules!
Every time... :omg:
-
I believe you will need to do a childForm.Show() on that also. The Forms framework doesn't seem to do it for you. I used this technique a little while back to implement a Wizard97 look-a-like that allowed users to design their own forms and feed it to the primary Wizard form (sheet), all the wizard had to do was adjust a few properties and drop it into the mix, works well. Regards
-
do you think you can send me a sample code of something like your Wizard app ? at this moment it's going well but I think I will have problem later :( Thanks Jonathan Pouliot
Well, if you follow James instructions above, it should do you pretty well. I really don’t feel right about releasing my code for this just yet, as it’s running in a current client’s system. Just shout when you need assistance and one of us will push you in the right direction, or possibly someone reading this may have something similar that they are a little more free to share. A word of caution up front though, in the current release of the .NET framework, forms created in this manner do not receive their OnClosing/OnClosed events naturally, and you should probably issue a Close on them manually when the container form receives its notification. A second solution, which I used, was to issue a custom set of Wizard related events to signal that the parent was about to close and it was time for the form(s) to cleanup. Using this method protects my code from issuing a second Close, just in case the boys and gals over at MSFT decide to fix the issue. The dispose methods do get called regardless. Regards
-
Well, if you follow James instructions above, it should do you pretty well. I really don’t feel right about releasing my code for this just yet, as it’s running in a current client’s system. Just shout when you need assistance and one of us will push you in the right direction, or possibly someone reading this may have something similar that they are a little more free to share. A word of caution up front though, in the current release of the .NET framework, forms created in this manner do not receive their OnClosing/OnClosed events naturally, and you should probably issue a Close on them manually when the container form receives its notification. A second solution, which I used, was to issue a custom set of Wizard related events to signal that the parent was about to close and it was time for the form(s) to cleanup. Using this method protects my code from issuing a second Close, just in case the boys and gals over at MSFT decide to fix the issue. The dispose methods do get called regardless. Regards
the only thing it's after the user create the form dynamicly I want to include action on some controls like buttons and I want to compile all the form with the controls action in one file *.cs and after compile it to an exe. What I want to know it's how can I create the CS file to add the action and the form design in, like VC# does ? Thanks
-
the only thing it's after the user create the form dynamicly I want to include action on some controls like buttons and I want to compile all the form with the controls action in one file *.cs and after compile it to an exe. What I want to know it's how can I create the CS file to add the action and the form design in, like VC# does ? Thanks
My wizard solution is something used by the clients developers, so it is more of a component than an application builder. Just out of curiosity, and I am definitely not the one that would try to stifle your ambition, but why are you trying to reinvent the wheel that was just built? It would seem to me that if you expose a good object model, extending an application built with .NET would be trivial without all of this, just having the clients developers use .NET to build extensions. Or are you looking for a mini environment like VBA in outlook? Regards
-
My wizard solution is something used by the clients developers, so it is more of a component than an application builder. Just out of curiosity, and I am definitely not the one that would try to stifle your ambition, but why are you trying to reinvent the wheel that was just built? It would seem to me that if you expose a good object model, extending an application built with .NET would be trivial without all of this, just having the clients developers use .NET to build extensions. Or are you looking for a mini environment like VBA in outlook? Regards
I'm creating a Trainer Maker and I need to use a Form designer and I need to compile the form the user will create and I need to include some action like retreive the Textbox text to use it for a value and add Buttons action like to poke and freeze that's it. I want to make something similar to Trainer Maker Kit (try to look at this application,check for screenshot, if you want of course), it's in VC++ i think and I want to make something that can equal the perfection of this program. Of course with the .NET Technology. at this moment the form Designer works fine the only "hic" it's for that .CS file creating dynamicly. I'm suppose that is almost the same way as the C# IDE does, but i don't know very well how can I remake this. I don't want to make something big just a little file with the Window Form Designer code for all the controls and the action I will put on the controls. I will check how can I figure it out, but I think I will post a lot of question on this board :) I hope I don't bugging you with all my questions, if it's the case just tell me please Thanks
-
I'm creating a Trainer Maker and I need to use a Form designer and I need to compile the form the user will create and I need to include some action like retreive the Textbox text to use it for a value and add Buttons action like to poke and freeze that's it. I want to make something similar to Trainer Maker Kit (try to look at this application,check for screenshot, if you want of course), it's in VC++ i think and I want to make something that can equal the perfection of this program. Of course with the .NET Technology. at this moment the form Designer works fine the only "hic" it's for that .CS file creating dynamicly. I'm suppose that is almost the same way as the C# IDE does, but i don't know very well how can I remake this. I don't want to make something big just a little file with the Window Form Designer code for all the controls and the action I will put on the controls. I will check how can I figure it out, but I think I will post a lot of question on this board :) I hope I don't bugging you with all my questions, if it's the case just tell me please Thanks
I think there is a sample in the C# section called LiveCode.NET that does something similar. I havent checked it out yet, but I am sure you have seen it in any event...