I was very glad when filippo published his Gradient button library, and immediately started to change the buttons in my application, to improve their look.
I found that when there are many buttons it is a lot of work, so I created a tool.
The main problem is that you cannot locate a Fgbutton on the form using the visual designer, meaning that you have to guess the position, check by running and correct, may be more then once.
So the solution, implemented by the attached tool is to design on the visual designer by putting basic buttons, and then use the tool to convert the buttons to FG buttons. At this point new and old applications are the same.
The process is this:
1. Open the application source with notepad or similar, copy "sub designer" to a new text file named src.txt , save it into the same directory as the tool. Close the source (carefully, don't save it - you may loose it...).
2. Run the tool , press start and look at the three configurations of the button: basic, FG with one color and FG gradient with two colors. Play with the properties and see the effect.
3. When you are happy with the design - press the "select" button next to the configuration you like (one or two colors), or "next" if you want to keep the basic button (unchanged).
4. Repeat until there are no more buttons.
5.Close and open dst.txt file.
6 copy the lines defining the FG buttons to a app_start or a sub in your application, run at application start.
7.Delete manually from the application (using the visual designer) all the buttons that appear in the list at the end of dst.txt file.
notes:- I did not include imagebuttons, but they can be added easily.
- Make sure you have the last version of the fggradientbuttons library.
My reward for this tool is the improved look of your applications
Filippo: there is a bug, after declaring a button with new2, width and height can be changed only to decreased size. Looks as if the button is changed but the face bitmap does not.
Edit: version 2, display of button name and operation on both basic buttons and imagebuttons.
Edit: I changed the buttons in the application, using itself. In addition to the process described above I had to change several .color to .backcolor or .endcolor and also fontcolor to forecolor, and to add fs.bringtofront .
ver.2.1 with new buttons.
I found that when there are many buttons it is a lot of work, so I created a tool.
The main problem is that you cannot locate a Fgbutton on the form using the visual designer, meaning that you have to guess the position, check by running and correct, may be more then once.
So the solution, implemented by the attached tool is to design on the visual designer by putting basic buttons, and then use the tool to convert the buttons to FG buttons. At this point new and old applications are the same.
The process is this:
1. Open the application source with notepad or similar, copy "sub designer" to a new text file named src.txt , save it into the same directory as the tool. Close the source (carefully, don't save it - you may loose it...).
2. Run the tool , press start and look at the three configurations of the button: basic, FG with one color and FG gradient with two colors. Play with the properties and see the effect.
3. When you are happy with the design - press the "select" button next to the configuration you like (one or two colors), or "next" if you want to keep the basic button (unchanged).
4. Repeat until there are no more buttons.
5.Close and open dst.txt file.
6 copy the lines defining the FG buttons to a app_start or a sub in your application, run at application start.
7.Delete manually from the application (using the visual designer) all the buttons that appear in the list at the end of dst.txt file.
notes:- I did not include imagebuttons, but they can be added easily.
- Make sure you have the last version of the fggradientbuttons library.
My reward for this tool is the improved look of your applications
Filippo: there is a bug, after declaring a button with new2, width and height can be changed only to decreased size. Looks as if the button is changed but the face bitmap does not.
Edit: version 2, display of button name and operation on both basic buttons and imagebuttons.
Edit: I changed the buttons in the application, using itself. In addition to the process described above I had to change several .color to .backcolor or .endcolor and also fontcolor to forecolor, and to add fs.bringtofront .
ver.2.1 with new buttons.
Attachments
Last edited: