| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 41 online users. » 0 Member(s) | 39 Guest(s) Applebot, Bing
|
| Latest Threads |
Example Program
Forum: Extensions
Last Post: martmen
03-13-2026, 04:15 PM
» Replies: 0
» Views: 24
|
BASIC Jam 7 is in progres...
Forum: Discussion
Last Post: eddylo
03-11-2026, 12:40 AM
» Replies: 3
» Views: 112
|
LitDev extension
Forum: Extensions
Last Post: martmen
02-24-2026, 07:20 AM
» Replies: 2
» Views: 167
|
Button with icons
Forum: Extensions
Last Post: martmen
02-09-2026, 06:33 PM
» Replies: 6
» Views: 288
|
How to think correctly?
Forum: Discussion
Last Post: litdev
02-06-2026, 04:20 PM
» Replies: 47
» Views: 17,202
|
Draw sample
Forum: Extensions
Last Post: martmen
01-29-2026, 06:51 PM
» Replies: 13
» Views: 624
|
Drawing
Forum: Extensions
Last Post: AbsoluteBeginner
01-29-2026, 10:53 AM
» Replies: 1
» Views: 178
|
ZScript
Forum: Discussion
Last Post: z-s
01-22-2026, 03:31 AM
» Replies: 0
» Views: 140
|
I think that no more Smal...
Forum: Discussion
Last Post: eddylo
01-20-2026, 11:02 PM
» Replies: 0
» Views: 118
|
Small Basic Coder-A New G...
Forum: Discussion
Last Post: AbsoluteBeginner
01-17-2026, 07:57 PM
» Replies: 1
» Views: 512
|
|
|
| The Small Archives - Program 1 |
|
Posted by: sm4llprogrammer2008 - 05-10-2025, 06:29 PM - Forum: Standard Small Basic
- No Replies
|
 |
Name: Smallsweeper
Created on Version: 1.3
Status: Experiment
Theme: Minesweeper
Link: https://smallbasic.com/program/?MBGB956.000
Code: GraphicsWindow.Hide()
Program.Delay(6000)
GraphicsWindow.Title = "Loading"
GraphicsWindow.CanResize = "False"
GraphicsWindow.BrushColor = "Black"
GraphicsWindow.DrawText(0, 0, "Loading Smallsweeper...")
GraphicsWindow.Top = 0
GraphicsWindow.Left = 0
GraphicsWindow.Show()
Program.Delay(4000)
GraphicsWindow.Hide()
GraphicsWindow.Clear()
GraphicsWindow.Title = "Smallsweeper"
GraphicsWindow.Width = 1536
GraphicsWindow.Height = 864
GraphicsWindow.Top = 0
GraphicsWindow.Left = 0
GraphicsWindow.CanResize = "True"
GraphicsWindow.BrushColor = "White"
width = 10 ' Number of columns
height = 10 ' Number of rows
mines = 20 ' Total mines on the board
For i = 1 To mines
x = Math.GetRandomNumber(width) - 1
y = Math.GetRandomNumber(height) - 1
While board[x][y] = -1 ' Ensure no duplicate mines
x = Math.GetRandomNumber(width) - 1
y = Math.GetRandomNumber(height) - 1
EndWhile
board[x][y] = -1
EndFor
For x = 0 To width - 1
For y = 0 To height - 1
If board[x][y] <> -1 Then
count = 0
For dx = -1 To 1
For dy = -1 To 1
If board[x + dx][y + dy] = -1 Then
count = count + 1
EndIf
EndFor
EndFor
board[x][y] = count
EndIf
EndFor
EndFor
cellSize = 20
GraphicsWindow.BackgroundColor = "Gray"
For x = 0 To width - 1
For y = 0 To height - 1
GraphicsWindow.DrawRectangle(x * cellSize, y * cellSize, cellSize, cellSize)
EndFor
EndFor
GraphicsWindow.MouseDown = OnMouseClick
Sub OnMouseClick
mouseX = GraphicsWindow.MouseX
mouseY = GraphicsWindow.MouseY
cellX = Math.Floor(mouseX / cellSize)
cellY = Math.Floor(mouseY / cellSize)
' Reveal cell logic
If board[cellX][cellY] = -1 Then
GraphicsWindow.ShowMessage("Game Over! You hit a mine.", "Smallsweeper")
Program.End()
Else
GraphicsWindow.DrawText(cellX * cellSize + 5, cellY * cellSize + 5, board[cellX][cellY])
EndIf
EndSub
GraphicsWindow.Show()
|
|
|
How I discovered Small Basic |
|
Posted by: sm4llprogrammer2008 - 05-06-2025, 02:09 AM - Forum: Discussion
- Replies (1)
|
 |
Bored, scrolling through the MS Store, of course checking everything that Microsoft ever published, I found Small Basic 1.3 (UWP), it didn't have extension compatibility, and I thought it was a great start.
Since then I've been more familiar with JScript, Python and PowerShell, I've downloaded SB 1.2's MSI installer and got the extension compatible version, tested out LitDev extension (since it was the first one I came across, the only one that worked from the extensions lib). I felt happy for my first LD program.
All of this began this year (2025), and I'm very proud of finding some welcoming programming lang for me.
QUICK EDIT
By extensions lib I meant the extensions list on MS Learn. (or Tech Community iirc)
|
|
|
| Twin Basic |
|
Posted by: Lester - 05-04-2025, 07:18 PM - Forum: Discussion
- No Replies
|
 |
I came across a new Basic language called Twin BASIC. Its in late BETA, and is scheduled for release in early summer. I played with it for an hour or two yesterday and it looks good. According to the website: "twinBASIC is a modern BASIC compiler that aims to be fully compatible with all existing VB6 and VBA code"
Check it out, Lester
|
|
|
| Fun fact |
|
Posted by: sm4llprogrammer2008 - 05-02-2025, 07:58 PM - Forum: Discussion
- No Replies
|
 |
Windows' built-in VGA typeface/font is Fixedsys, you might find worth it using on your Small Basic GW projects.
|
|
|
| Zahl ins deutsche Format umwandeln |
|
Posted by: martmen - 05-02-2025, 03:26 PM - Forum: Extensions
- Replies (3)
|
 |
Hallo zusammen,
Das Programm (mit der Erweiterung LitDev) WNWQ963.000 formatiert eine Zahl in das deutsche Format mit Tausendertrennzeichen und Rundung.
Hat jemand einen Vorschlag für eine Verbesserung der Optimierung?
Vielen Dank
Martin
|
|
|
| Hey |
|
Posted by: sm4llprogrammer2008 - 04-20-2025, 06:27 PM - Forum: Discussion
- No Replies
|
 |
I'm making a website for submitting and sharing SB programs quickly.
It'll be easier to share SB programs there.
Just telling. (if any of you want to use the website)
|
|
|
| Small Basic hash retriever |
|
Posted by: sm4llprogrammer2008 - 04-20-2025, 04:09 PM - Forum: Standard Small Basic
- No Replies
|
 |
This is for the safety guaranteed for the file integrity kingdom of Windows.
ID: QQNW492.000
Link: https://smallbasic.com/program/?QQNW492.000
Requires: LitDev 1.2.30.0 Beta or higher, Small Basic 1.2 (web download version, 1.3 is UWP and doesn't support libs)
Code: main()
Sub main
TextWindow.Hide()
path = LDDialogs.InputBox("Get a MD5 hash of a file. Use 'dialog' to open a file selection dialog instead.", "Hash Retriever")
If path = "dialog" Then
getFile = LDDialogs.OpenFile("All files (*.*)|*.*", "")
retrievedHash = LDEncryption.MD5HashFile(getFile)
showHash()
Else
retrievedHash = LDEncryption.MD5HashFile(path)
showHash()
EndIf
EndSub
Sub showHash
TextWindow.Hide()
TextWindow.Title = ""
TextWindow.Show()
TextWindow.WriteLine("MD5 Hash: "+retrievedHash)
TextWindow.Write("Retrieve another hash? (Y/N) ")
getYorN = TextWindow.Read()
If getYorN = "y" Then
main()
ElseIf getYorN = "n" Then
Program.End()
EndIf
EndSub
Feel free to expand or to bundle in your own SB apps!
|
|
|
|