ScriptUO
Casa de TrailMyx => Programming / Operating Systems => Topic started by: Coragin on March 10, 2010, 05:39:47 AM
-
When I was learning visual basic, 5 or 6, I was able to learn windows forms and form object functions by selecting a premade 1-x forms template. This template would come with a menu bar with open file dialog box and about box. And the about box had a Ok/Close button. By having these simple premade teamplates it made it easy for me to check properties and get basic properties to how a menu strip and button would work.
Examples:
I was able to use a button/menustrip to open a new form
I was able to use a button/menustrip to close a form
These are two very basic functions I know, but also two very basic functions I totally forgot. And since Visual Studio 2008 dont have these types of templates available I have no examples. And to be honest I am just now relearning everything, so can anyone give me two templates in C#?
1. A template with a button and menustrip that does the same thing, open a new form (form2). In the second form (form2), an ok button that closes the form (form2). And an exit on the menustrip of the main form (form1), that closes the program. Very basic I know.
2. An open/save file control, that will open the open/save file dialog box.
The book I am reading explains C# in a great way, right now its covering Objects. It has done a great way of explaining everything, but this chapter is amazing.
-
Answer: Because they Can....
-
OK i made you a testForm with a menu and usual submenus under them. I implemented the About that opens a new window and 2 buttons. 1 that closes the window.
Hope this gets you starting :)
-
OK i made you a testForm with a menu and usual submenus under them. I implemented the About that opens a new window and 2 buttons. 1 that closes the window.
Hope this gets you starting :)
Thank you so much!
Any chance you can re-up this with savedialogs?
I need save directory path
I need save file as
Both in menu and button...
I have probably gone through about 50 tutorials on the web and cant seem to find one that will work :(
-
Ok i will have a look at it as soon as possible due to work.
EDIT: Attachment added with SaveAs method, although its a dummy, just shows you the structure.
-
you will need to put code in
if (dialogSave.ShowDialog() == DialogResult.OK)
to handle the save. forgot to tell you that :)
-
Thanks, thats what I needed, pretty soon I will be able add a feature to the vast menu of uoboost. lol.