none
PlusPlus Extension: Version 2

    General discussion

  • I have developed a Small Basic Extension. It allows for many additional operations in Small Basic, many of which are not included in other extensions.

    Download: http://www.mediafire.com/download.php?3985dxdlupakjs5 (Windows 7/ Vista)

    Download: http://www.mediafire.com/download.php?kgkf7j6h596192 (Windows XP)

    Here are a few:

    -PlusPlusSpeech.Speak speaks text in a specified format, volume, speed, age and gender of voice

    -PlusPlusRegistry allows for Registry reading

    -PlusPlusFile allows for enhanced file I/O such as sending files to the recycling bin and moving and copying folders and files

    -PlusPlusDialogs allows dialogs to be displayed with specified text, title, buttons, icons and default buttons

    -PlusPlusSerialPort gives access to the comm ports

    -PlusPlusClock provides dozens of time operations in both local time and UTC (Greenwich Mean Time/Universal Coordinated Time)

    -PlusPlusProcess allows for control of external processes

    -And much more!

    Here is a download link: http://www.mediafire.com/?bn7gb552naq5byz (OLD VERSION). Please note this is still a WIP and could be potentially buggy. If anyone asks, I might make the source (C#) available

    Enjoy!

    gungan37

    VERSION 2

    + Added support for Notification Area Icons and Balloons

    + Added support for hyperbolic trigonometry as well as the mathematical constant E

    + Added more GW operations

    + Added additional dialogs (Save and Open may not work correctly; I am working on this)

    + Cleaned up XML Documentation

    Download: http://www.mediafire.com/download.php?3985dxdlupakjs5






    • Changed type gungan37Editor Wednesday, April 04, 2012 1:02 AM accidentally specified wrong type
    • Edited by gungan37Editor Tuesday, April 17, 2012 11:02 PM
    Wednesday, April 04, 2012 1:02 AM
    Answerer

All replies

  • When I click "Download File", the file downloaded is PlusPlusExtension.7z. Is this the correct file?
    Thursday, April 05, 2012 8:55 PM
  • Yes, 7z is a common zip format - compatible with winzip, the files should be compressed inside it if you double click it - perhaps download 7Zip (powerful free zip software by googling for it).
    Thursday, April 05, 2012 9:55 PM
    Moderator
  • Sorry I should have made it a zip archive so everyone can use it. Here is the zip link: http://www.mediafire.com/download.php?8spy77sp9y9p6g3
    Thursday, April 05, 2012 11:17 PM
    Answerer
  • If anyone has any suggestions or comments, please feel free to say so. Suggestions for more functions are welcome too!
    Thursday, April 05, 2012 11:20 PM
    Answerer
  • Add a function where you can disable the Graphics Window close button.
    Saturday, April 07, 2012 5:11 PM
  • That is a great idea! I have worked on this and found that since the GraphicsWindow is a WPF window (which doesn't support a CanClose property or something like that), when the close button is taken away (by an external function), the minimize and maximize buttons go away with it. I may include this in the next release.
    Saturday, April 07, 2012 8:48 PM
    Answerer
  • I am currently working on some more classes. Features include:

    PlusPlusEvents: Provides access to system events

    PlusPlusTaskbar: Adds the ability to show notification balloons on the taskbar

    PlusPlusColors: Provides quick access to all SB colors as well as system colors

    PlusPlusMath: Adds more math functions

    This will hopefully be released this week.

    Tuesday, April 10, 2012 1:22 AM
    Answerer
  • Version 2 is now released (see edit to first post)!
    Saturday, April 14, 2012 11:33 PM
    Answerer
  • Does this extension only work with Windows system 7?

    Tuesday, April 17, 2012 5:30 PM
  • Sorry, should have clarified: some components have been reported to not work on XP such as PlusPlusGraphicsWindow.Icon, so an XP build will be out soon, but to answer your question, the Windows 7 Build will work fine on any OS but some features may not work.

    EDIT:

    XP Version is available here: http://www.mediafire.com/download.php?kgkf7j6h596192m

    Tuesday, April 17, 2012 10:49 PM
    Answerer
  • A new version of the PlusPlus Extension will be released soon, with XBOX 360 game controller support!
    Monday, April 23, 2012 10:41 PM
    Answerer
  • Just a question, why adding things that other already added to Small Basic ?

    Data Extension already does the XBOX controller support in case you didn't know, and many other extensions does the Processes, Dialogs, Registry, etc...

    Do something new, that no one has seen before, like, how about adding webcam support or something like that ?

    Tuesday, April 24, 2012 8:58 AM
  • Is it possible to have a feature where you can change the Window Style of the Graphics Window (like the Minimize, Maximize, and Close button style in Vista)?
    Tuesday, April 24, 2012 5:50 PM
  • Good question, AskoreDracson. Here are my thoughts:

    1) Many of my objects support things other extensions don't (like default buttons on dialog boxes, or gender and age of the voice with the PlusPlusSpeech object.

    2) I wrote the XBOX 360 Controller libraries as I worked to build my understanding of the MS XNA Framework, in hopes of eventually supporting all joysticks and gamepads.

    3) Also, I intend to make the extension open-source once it is complete--- something different from most extensions (e.g. Oskariok's Data Extension is obfuscated and is illegal to decompile).

    Tuesday, April 24, 2012 10:17 PM
    Answerer
  • The PlusPlusGraphicsWindow.WindowStyle object already exists. To mess with the Minimize, Maximize, and Close Buttons, you can also CanClose, CanResize, and CanResizeWithGrip.
    Tuesday, April 24, 2012 10:21 PM
    Answerer
  • Here is a list of sample programs:

    WZX090 Demonstrates the PlusPlusGraphicsWindow object.

    ZCC564 Demonstrates the PlusPlusSpeech and PlusPlusClock objects.
    Tuesday, April 24, 2012 11:13 PM
    Answerer
  • Nice to see new extension. It's actually interesting how you have reinvented the wheel.

    I have just tested only few features but I will definitely look more into your extension when I have time. For now my recommendation is to make something new that has newer done before.

    1) Many of my objects support things other extensions don't (like default buttons on dialog boxes, or gender and age of the voice with the PlusPlusSpeech object.

    That is true but for example why I haven't included all these tiny options is because those things that don't usually matter. Especially in Small Basic applications. Main Guideline is to keep it simple.

    2) I wrote the XBOX 360 Controller libraries as I worked to build my understanding of the MS XNA Framework, in hopes of eventually supporting all joysticks and gamepads.

    I also investigated the option of making extension with XNA but most of people don't have XNA installed. Adding XNA as prerequisite for extension would cause many difficulties for everyone.

    3) Also, I intend to make the extension open-source once it is complete--- something different from most extensions (e.g. Oskariok's Data Extension is obfuscated and is illegal to decompile).

    Closed source is because Small Basic is developed by Microsoft and it has closed source. Obfuscation and those things are just because one unhappy event. (Data Extension hasn't always been obfuscated. )

    Wednesday, April 25, 2012 12:01 PM
  • Thanks for the feedback Oskariok!

    1) I agree keeping it simple is important. However, the one thing (believe it or not) that made me decide to write the extension was the fact that no one else had made support for default buttons on dialogs- something I really needed.

    2) Yes, a prerequisite of XNA is a problem. Thanks for pointing that out!

    3) Too bad one unhappy event led to the obfuscation of the Data Extension. I wholeheartedly agree that sometimes obfuscation is necessary to stop malicious uses of your code, though.

    One more thing... I know you have support for some Aero features in the Data extension. I would like to add support for Jump Lists in my extension. Could you please tell me how to assign a Jump List  to _window after I have invoked it? (I am using the Windows API Code Pack)

    Wednesday, April 25, 2012 10:33 PM
    Answerer
  • I am (working on) adding webcam support to my extension. However, I do not own a webcam. I would gladly send anyone my code if they would like to test it or debug and improve it. Post your e-mail address if you want the code/ DLL.
    Friday, April 27, 2012 11:18 PM
    Answerer
  • Is there an extension to record sound, or can you implement it as a feature?
    Saturday, April 28, 2012 5:53 PM
  • Saturday, April 28, 2012 7:53 PM
    Answerer
  • PlusPlusGraphicsWindow.Show()  doesn't work for me. I imported WZX090 and got an error message "cannot find operation Show() in PlusPlusGraphicWindow"  Rest seems to work as intended.
    Saturday, May 19, 2012 8:30 PM
  • .Speak   Gender and age don't work for me. Always the same female voice.

    Saturday, May 19, 2012 8:46 PM
  • Sorry, .Show() is a feature in my debugging copy that will be available with the next release. .Speak and .Gender probably don't work because those voices are not installed on your computer and default to the female voice.
    Saturday, May 19, 2012 9:20 PM
    Answerer
  • I found a bug with the way you return numeric values. You seem to be using a region dependent number-to-string conversion, so that running your library in a region where the decimal sign is not a period, Small Basic doesn't interpret it as a number. For instance, on a system with the region set to Norway, numbers are output as 123,45 instead of 123.45. While this is correct for display purposes, it's forcing me to perform string replacement on any numeric value from your library.

    It would be nice if you could release a fix for this, or perhaps just release the source code, so it can be patched. I'm a professional systems programmer, and I'm teaching my cousin to code using Small Basic. He's loving it!

    Monday, June 18, 2012 12:56 AM
  • PlusPlusMouse gives global mouse x, y and button states when it should give mouse information about GraphicsWindow.

    Certain dialogs won't work without Data Extension so I would recommend you to remove those functions.

    Remember that code like this isn't an extension:

    public static Primitive AskForFile(Primitive Filter)
    {
        return Dialogs.AskForFile(Filter);
    }

    PlusPlusProcess and litdev's original process extension are exactly the same.

    PlusPlusTaskbar.ShowNotification doesn't handle invalid parameters properly. It crashes instead.

    Monday, June 18, 2012 8:48 AM
  • Sorry for the delay, guys, I've been out of town.

    Thorway: If you post your email address, I will gladly send you a copy of the source code. Sorry, this was my first ever project in a language other than SB, so I didn't consider many things such as locales. 

    Oskariok: PlusPlusMouse was designed to get the position relative to the screen, not the GW. Also, the functions that require the Data Extension will be removed in the next release for sure: I used it as a placeholder when debugging and forgot to remove it. The same goes for PlusPlusProcess (By the way I used this with LitDev's permission). Also, Version 3 will fix the bug in ShowNotification as well.

    Tuesday, June 26, 2012 4:48 PM
    Answerer
  • Also, if you want to patch it immediately, here is the new PlusPlusTaskbar code:

    /// <summary>
    	/// This class provides methods for interfacing with the notifiaction area such as showing a balloon
    	/// </summary>
    	[SmallBasicType]
    	public static class PlusPlusTaskbar
    	{
    
    		static NotifyIcon notifyicon = new NotifyIcon();
    		/// <summary>
    		/// Shows a notification balloon on the notification area.</summary>
    		/// <param name="Icon">The full file path of the notification area icon.</param>
    		/// <param name="TipTitle">The title of the balloon.</param>
    		/// <param name="TipText">The message displayed in the balloon.</param>
    		/// <param name="TipIcon">The icon of the balloon (can be "Info", "Warning", "Error" or "None").</param>
    		/// <param name="TimeOut">The amount of time to display the dialog (excludes time during which it is detected that the user is not actively using the computer).</param>
    		/// <returns>Nothing.</returns>
    		public static Primitive ShowNotification(Primitive Icon, Primitive TipTitle, Primitive TipText, Primitive TipIcon, Primitive TimeOut)
    		{
                try
                {
                    if (TipIcon == "Info")
                    {
                        notifyicon.Icon = new Icon(Icon);
                        notifyicon.BalloonTipIcon = ToolTipIcon.Info;
                        notifyicon.BalloonTipText = TipText;
                        notifyicon.BalloonTipTitle = TipTitle;
                        notifyicon.Visible = true;
                        notifyicon.ShowBalloonTip(TimeOut, TipTitle, TipText, ToolTipIcon.Info);
                        return ("");
                    }
                    else if (TipIcon == "Error")
                    {
                        notifyicon.Icon = new Icon(Icon);
                        notifyicon.BalloonTipIcon = ToolTipIcon.Error;
                        notifyicon.BalloonTipText = TipText;
                        notifyicon.BalloonTipTitle = TipTitle;
                        notifyicon.Visible = true;
                        notifyicon.ShowBalloonTip(TimeOut, TipTitle, TipText, ToolTipIcon.Error);
                        return ("");
                    }
                    else if (TipIcon == "Warning")
                    {
                        notifyicon.Icon = new Icon(Icon);
                        notifyicon.BalloonTipIcon = ToolTipIcon.Warning;
                        notifyicon.BalloonTipText = TipText;
                        notifyicon.BalloonTipTitle = TipTitle;
                        notifyicon.Visible = true;
                        notifyicon.ShowBalloonTip(TimeOut, TipTitle, TipText, ToolTipIcon.Warning);
                        return ("");
                    }
                    else
                    {
                        notifyicon.Icon = new Icon(Icon);
                        notifyicon.BalloonTipIcon = ToolTipIcon.None;
                        notifyicon.BalloonTipText = TipText;
                        notifyicon.BalloonTipTitle = TipTitle;
                        notifyicon.Visible = true;
                        notifyicon.ShowBalloonTip(TimeOut);
                        return ("");
                    }
                }
                catch (Exception ex)
                {
                        return("ERROR: " + ex.ToString());
                }
                
    		}

    Tuesday, June 26, 2012 4:52 PM
    Answerer
  • Tried these download links and got the message that the file was blocked for violation.  ???

    Saturday, January 19, 2013 3:59 PM
  • Tried these download links and got the message that the file was blocked for violation.  ???

    Hi Elmo!

    It looks like MediaFire flagged my download as against the TOS (term of service). It is most definitely not and I will submit a support ticket to get it unblocked.

    I will be releasing a new extension soon, the IO Extension, that contains the good parts of the PlusPlus Extension plus a heckuva lot more. It should be out soon and it will be supported, so I recommend holding off until then =)


    Please mark any answers and "vote as helpful" any posts that help you!

    Saturday, January 19, 2013 5:34 PM
    Answerer
  • Mediafire says that the file was removed for violation of the Terms of Service...  Do you have another download link for XP?

    Thursday, November 28, 2013 1:14 AM
  • You can also upload it to TechNet Gallery. I recommend that, because you plug into a community and get recognition for your downloads and ratings you get. You also get a Q&A feature to field questions and stuff like that.

    Ed Price, Power BI & SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Thursday, January 30, 2014 9:52 PM
    Owner
  • Mediafire says that the file was removed for violation of the Terms of Service...  Do you have another download link for XP?

    The I/O Extension, which replaced the PlusPlus Extension, is available here: http://social.msdn.microsoft.com/Forums/en-US/8a206925-8c0b-4d3c-939d-31cea582ff9e/new-extension-io-extension?forum=smallbasic

    It contains most of the PlusPlus features plus game controller and enhanced GUI support. You might also be interested in SB IDE++, my enhanced IDE for Small Basic: http://social.msdn.microsoft.com/Forums/en-US/d3e51b54-4913-4a12-9fad-122bda07a892/sb-ide-version-101?forum=smallbasic

    @Ed Price: that is a great idea! When I release the SB++ Compiler, I will post it to the Gallery.


    Please mark any answers and "vote as helpful" any posts that help you!


    Saturday, February 01, 2014 4:26 AM
    Answerer