MsgBox Blaster, an easy way to create MessageRequester code
Posted: Wed Jul 09, 2003 7:57 am
Hello, new to PureBasic, very impressed with it so far.
Check out my first PureBasic program called MsgBox Blaster, which creates the MessageRequester code. (yeah I know the name is a throwback to VB, but MessageRequester Blaster just doesn't have the same ring to it). Thanks to all on this board, a large portion of the code came from some great posts!
I am pretty sure the "Test" feature to display a message is working correctly, but haven't been able to completely run through the "Copy" feature yet. The "copied" code works, but needs to be cleaned up.
I won't be able to work on it for a few days so am throwing it out in case any of you want to try it out. Just let me know if you find any bugs. I am sure there are a few obvious ones that I haven't come across yet.
All Windows standard msgbox features are available as well as the ability to customize the button text. Only thing that isn't straightforward is the Msg Length when you are customizing buttons. There has to be a cleaner way of doing it, I tried to automatically set the MsgLength, but it always ended up being too short. If you customize the buttons, play around with the MsgLength to find the optimum length for your message that doesn't truncate the message. Then take a look at the code that is copied, and let me know if there is a way to calc the msgspace length automatically.
Other then testing out the current features, I'll also be adding an option to add the Select code after the messagerequester. Down the road I may even try building custom Icons.
http://home.comcast.net/~akampmeier/Msgblast.zip
<IMG SRC="http://home.comcast.net/~akampmeier/Screenshotsmall.jpg">
Check out my first PureBasic program called MsgBox Blaster, which creates the MessageRequester code. (yeah I know the name is a throwback to VB, but MessageRequester Blaster just doesn't have the same ring to it). Thanks to all on this board, a large portion of the code came from some great posts!
I am pretty sure the "Test" feature to display a message is working correctly, but haven't been able to completely run through the "Copy" feature yet. The "copied" code works, but needs to be cleaned up.
I won't be able to work on it for a few days so am throwing it out in case any of you want to try it out. Just let me know if you find any bugs. I am sure there are a few obvious ones that I haven't come across yet.
All Windows standard msgbox features are available as well as the ability to customize the button text. Only thing that isn't straightforward is the Msg Length when you are customizing buttons. There has to be a cleaner way of doing it, I tried to automatically set the MsgLength, but it always ended up being too short. If you customize the buttons, play around with the MsgLength to find the optimum length for your message that doesn't truncate the message. Then take a look at the code that is copied, and let me know if there is a way to calc the msgspace length automatically.
Other then testing out the current features, I'll also be adding an option to add the Select code after the messagerequester. Down the road I may even try building custom Icons.
http://home.comcast.net/~akampmeier/Msgblast.zip
<IMG SRC="http://home.comcast.net/~akampmeier/Screenshotsmall.jpg">