Just+Basic+Shared+Code

**This is a place to share code with other Just Basic programmers.** Tips and information should go on the tips page. If you have code that you don't want to allow others to modify, create a page on Member Pages and link to your code there. We ask for you to strive for quality over quantity! toc
 * Click here for instructions. ||  Click here for guidelines.  ||

=GUI Code=

General:
> ResizeHandler by Brent Thorn (uploaded with permission by user:tsh73) > Adjusting width, height of a window. Getting window border size user:tsh73 > Double and single click in a graphicbox user:tsh73 > actually, same trick could be used for a listbox (might be useful?): > Double and single click in a listbox user:tsh73

Custom windows:
> Find a file user:UncleBen > Folder Dialog user:UncleBen

Controls (workarounds):
> Splitter user:tsh73 > Spinner (UpDown control) user:tsh73 > Treeview user:tsh73 > Dials/gauges user:tsh73

=Graphics Code= > A Simple Graphic Demo, When I Fill My Gas Tank - user:Welopez > Testing Drawing Rules : join the fun ! user:alix > Trapping Key-presses with Inkey$ 1147477071 > Trapping Mouse Events with When Commands 1149909333 > How to FLUSH Without Running Out of Resources 1153583933 > Creating "Rubber Band" Graphic Objectsuser:steelweaver52 > GetPixelValue: function returning on - screen pixel color user:tsh73 > Drawing an arrow user:tsh73 > Smooth color transition - rainbow$ function user:tsh73 > getFontSize function (uses GetPixelValue) user:tsh73

=String Manipulation Code= > Loading a whole file into a string > Replace n-th word > Replace substring > Replace String Function using Word$ 1210894277 > Number to string, like 123->one hundred twenty three by Henry (uploaded with permission by user:tsh73) > FormatDate$ function user:UncleBen > Natural string compare (caring for numbers in-string) user:tsh73 > ASCII string compare function user:tsh73 > Pad string from left or right functions user:tsh73 > Word$ analog with multiple delimiters user:tsh73 > Custom USING$ function (thousand separators) user:tsh73 > sequent$ function (kind of word$ but MUCH faster) by wallgod

=Math Algorithms Code= > Understanding and Plotting Polar Coordinates user:steelweaver52 > Find the date for Easter in any given year user:Smeagle > VATCALCBASIC user:matthewhughes > Educational Resources - Math1193415749 > Graphics 101 – plotting a function (linked from LBPE) user:tsh73 > Numerically finding roots of a function in a range user:tsh73 > Complex numbers (a library & demonstrations) by tenochtitlanuk (uploaded with permission by user:tsh73) > Vector 2d library (a library & demonstrations) user:tsh73) > Scientific USING function user:tsh73 > ATAN2 function (uploaded with permission by user:tsh73) > Check for collision of two circles, get intersection points by user:AndyAmaya (uploaded with permission by user:tsh73)

=Sprite Code= > How to create and animate a sprite within one program user:alix > Orbiting planet user:UncleBen > A Jumping Sprite 1155525593 > Sprite Collision Detection user:AndyAmaya

=File I/O Code= > Random access I/O functions library user:UncleBen > Simple Database Framework 1182331187 > Saving variables as Text Files user:GhostWolfe

=File Management functions= > The FILES command 1205384928 > dirExists(path$, dirname$) function user:tsh73

=Media Code= > Code page link goes here! Enclose in double square brackets.

=Auxilary functions (exists in other languages)= > IIF: Instant "if" functions user:tsh73 > Inlist: In-list function (Is value in list?) user:tsh73 > Min, Max: Infamous Min, Max functions user:tsh73 > Swap: Sub for swapping two variables user:tsh73

=Windows Environment= > Environment Variables 1209674122 > Preventing more than one instance by user:AltBas (uploaded with permission by user:tsh73)

=Other Categories of Code=

//Add categories as needed!//

=Instructions= __Here is what you do:__

1) Create a NEW page. 2) Paste your Just Basic source code, a description about the code on the page. 3) Link the page back here under the appropriate category.

__Another way to create a page:__
 * 1) Visit the page that will link to your new page.
 * 2) Click the **edit** button at the top of the page.
 * 3) In the editing box, place your text cursor at the spot where you want the link to appear.
 * 4) Type the desired name of your new page inside of double square brackets. It will look something like this: ``My New Page``
 * 5) **Save** the edits.
 * 6) When viewing the page you just edited, click the link for the new page.
 * 7) When the new page opens, **edit** it and type or paste your code into the window.
 * 8) **Save** your new page and you're done. user:Alyce

toc =Guidelines= //Note: Code pages in this public area can be modified by all members. (Modifying means deleting non - working code, enhancing valid code, or correcting erroneous code.)//


 * Please make sure that code works properly.** Test it before posting it. No harmful code is allowed.

Please read the Attribution-ShareAlike license before sharing code - your code will be managed by this license: http://creativecommons.org/licenses/by-sa/2.5/