Welcome, Guest |
You have to register before you can post on our site.
|
Latest Threads |
As technology rapidly evo...
Forum: Utilities
Last Post: Frankvab
06-15-2025, 06:09 AM
» Replies: 14
» Views: 165
|
Everybody's heard about t...
Forum: Utilities
Last Post: Frankvab
06-15-2025, 06:07 AM
» Replies: 22
» Views: 1,367
|
MBA Assignment Help in Du...
Forum: General Discussion
Last Post: hafsahomar
06-11-2025, 07:05 AM
» Replies: 0
» Views: 22
|
лучшие песни медляки слуш...
Forum: Petr
Last Post: WillieTop
06-08-2025, 02:21 AM
» Replies: 0
» Views: 30
|
пинк слушать онлайн беспл...
Forum: SMcNeill
Last Post: WillieTop
06-08-2025, 02:20 AM
» Replies: 0
» Views: 25
|
скачать музыку российскую...
Forum: madscijr
Last Post: WillieTop
06-08-2025, 02:18 AM
» Replies: 0
» Views: 25
|
нежная музыка mp3 скачать
Forum: Keybone
Last Post: WillieTop
06-08-2025, 02:17 AM
» Replies: 0
» Views: 26
|
лучшая песня слушать онла...
Forum: bplus
Last Post: WillieTop
06-08-2025, 02:16 AM
» Replies: 0
» Views: 30
|
пикник слушать онлайн луч...
Forum: Spriggsy
Last Post: WillieTop
06-08-2025, 02:15 AM
» Replies: 0
» Views: 26
|
какая сейчас популярная м...
Forum: RhoSigma
Last Post: WillieTop
06-08-2025, 02:14 AM
» Replies: 0
» Views: 20
|
|
|
idea - a "Rosetta Code" of classic games? |
Posted by: madscijr - 06-07-2022, 11:25 AM - Forum: General Discussion
- No Replies
|
 |
What could be interesting and cool would be a sub-wiki or thread dedicated to simply compiling links (+source code) to versions of every classic game done in QB64 (or a link to source code for any done in another language). This might help beginning programmers looking to recreate a certain game or learn.
|
|
|
Is there a way to delete the Alt+PrtScr image from Windows? |
Posted by: Pete - 06-06-2022, 10:18 PM - Forum: Help Me!
- Replies (2)
|
 |
For instance, with _CLIPBOARD$ you just use: _CLIPBOARD$ = "" but not so with _CLIPBOARDIMAGE. For example, _CLIPBOARDIMAGE = 0 doesn't clear it, it just takes a snap shot of the current window. What I was looking for is a way to use Alt + PrtScr to copy the active window to the clipboard, save it to a file, and then remove it from the Windows clipboard.
Without being able to remove it from the Windows clipboard so I can poll for the next Alt + PrtScr instance, I need the extra
click back on the Qb64 app step, as seen in the example code, below. Caution, it will add a file to your local directory labeled as: screenshot(1).bmp.
To try it out...
1) Run the app.
2) Click the window you want to screen shot to make it active.
3) Press Alt + PrtScr
4) Click in the window of the Qb64 app.
5) Look for the screenshot in your local folder.
Code: (Select All) REM This utility will make store screen shots in the local directory.
SCREEN _NEWIMAGE(370, 90, 32)
_SCREENMOVE 0, 0
DO
CLS
PRINT " Alt+PrtScr on active window then clcik here."
DO
_LIMIT 30
WHILE _MOUSEINPUT: WEND
IF _MOUSEBUTTON(1) THEN EXIT DO
IF INKEY$ = CHR$(27) THEN SYSTEM
LOOP
CLS: PRINT " Working..."
img& = _CLIPBOARDIMAGE
IF img& < -1 THEN
' Find the next sequential available screenshot number.
DO
num = num + 1
num$ = LTRIM$(STR$(num))
IF _FILEEXISTS("screenshot(" + num$ + ").bmp") = 0 THEN EXIT DO
LOOP
screenshot$ = "screenshot(" + num$ + ")"
SaveImage img&, screenshot$
IF img& < -1 THEN _FREEIMAGE img&
DO
i = i + 1
IF _FILEEXISTS("screenshot(" + num$ + ").bmp") THEN
PRINT: PRINT " Image saved..."
_DELAY 1
EXIT DO
ELSE
IF i = 10 THEN
PRINT: PRINT "Unable to capture screen image."
END
END IF
END IF
LOOP
END IF
LOOP
SUB SaveImage (image AS LONG, filename AS STRING)
' Subroutine code by Rob, AKA Galleon Dragon available in QB64 Phoenix Wiki.
bytesperpixel& = _PIXELSIZE(image&)
IF bytesperpixel& = 0 THEN PRINT "Text modes unsupported!": END
IF bytesperpixel& = 1 THEN bpp& = 8 ELSE bpp& = 24
x& = _WIDTH(image&)
y& = _HEIGHT(image&)
b$ = "BM????QB64????" + MKL$(40) + MKL$(x&) + MKL$(y&) + MKI$(1) + MKI$(bpp&) + MKL$(0) + "????" + STRING$(16, 0) 'partial BMP header info(???? to be filled later)
IF bytesperpixel& = 1 THEN
FOR c& = 0 TO 255 ' read BGR color settings from JPG image + 1 byte spacer(CHR$(0))
cv& = _PALETTECOLOR(c&, image&) ' color attribute to read.
b$ = b$ + CHR$(_BLUE32(cv&)) + CHR$(_GREEN32(cv&)) + CHR$(_RED32(cv&)) + CHR$(0) 'spacer byte
NEXT
END IF
MID$(b$, 11, 4) = MKL$(LEN(b$)) ' image pixel data offset(BMP header)
lastsource& = _SOURCE
_SOURCE image&
IF ((x& * 3) MOD 4) THEN padder$ = STRING$(4 - ((x& * 3) MOD 4), 0)
FOR py& = y& - 1 TO 0 STEP -1 ' read JPG image pixel color data
r$ = ""
FOR px& = 0 TO x& - 1
c& = POINT(px&, py&) 'POINT 32 bit values are large LONG values
IF bytesperpixel& = 1 THEN r$ = r$ + CHR$(c&) ELSE r$ = r$ + LEFT$(MKL$(c&), 3)
NEXT px&
d$ = d$ + r$ + padder$
NEXT py&
_SOURCE lastsource&
MID$(b$, 35, 4) = MKL$(LEN(d$)) ' image size(BMP header)
b$ = b$ + d$ ' total file data bytes to create file
MID$(b$, 3, 4) = MKL$(LEN(b$)) ' size of data file(BMP header)
IF LCASE$(RIGHT$(filename$, 4)) <> ".bmp" THEN ext$ = ".bmp"
f& = FREEFILE
OPEN filename$ + ext$ FOR OUTPUT AS #f&: CLOSE #f& ' erases an existing file
OPEN filename$ + ext$ FOR BINARY AS #f&
PUT #f&, , b$
CLOSE #f&
END SUB
My thanks to Rob for making the screenshot sub available.
Pete
|
|
|
the apocalypse! |
Posted by: krovit - 06-06-2022, 08:45 PM - Forum: General Discussion
- Replies (20)
|
 |
Hi!!
We all worried when there was the change at the top of QB64 and the reassurances were not enough to dispel the doubts...
I'm definitely off topic but try to understand me... I don't know anything about what happened and I can't orient myself... it's gone (almost) everything... and qb64 looks dead (for sure he is dying).
QB64 Phoenix is a fork of QB64... ?
In addition to all this there is also the fact of the language (I do not speak English) which makes everything more difficult
Years of development in QB64 destined to die... is it possible that this is destiny?
Tell me something please and inform me about the situation...
Thank you!
------
I read the presentation of SMcNeill but you know and give for obvious a bunch of things that I do not know.
And if qb64 phonex is a "clone" of qb64 as compatible with the original?
|
|
|
Old forum threads on Ping usuage |
Posted by: doppler - 06-06-2022, 01:06 PM - Forum: Help Me!
- Replies (3)
|
 |
Someone has access to the old forum threads ? In need to monitor some raspberry pi's on my home network using ping. I know the old forum had some before it all got nuked. Some very good examples and code. I should have saved a couple (my bad).
If someone saved the old forum (pre-nuking) please provide a URL.
|
|
|
DavsIDE - Alternative IDE for the QB64 compiler |
Posted by: Dav - 06-06-2022, 02:07 AM - Forum: Dav
- Replies (24)
|
 |
DavsIDE is an alternative IDE to use with QB64. I started this back in 2010, when QB64's IDE was still very slow to use. However, the QB64 IDE today is FAR better than back in 2010 , making my IDE almost useless now. Although DavsIDE is no longer being actively developed, I will update it from time to time to correct bugs and to thank the people that have supported it over the years. It has a read me file (DavsIDE.txt) so read that for more information on how to use the IDE.
- Dav
NOTE: This is for Windows only, and is in .EXE format only, no source included.
Latest version:
davside-v131.zip (Size: 467.75 KB / Downloads: 156)
(Uses the newer font, with more selectable font sizes, 8pt to 18pt)
Older version:
davside-v130.zip (Size: 452.31 KB / Downloads: 97)
(Uses the older font, selectable sizes 12pt, 14pt, 16pt)
|
|
|
BUG? Compile errors with filenames that contain $ in them. |
Posted by: Dav - 06-05-2022, 04:09 PM - Forum: General Discussion
- Replies (3)
|
 |
Working with an error in my QB64 IDE, with the help of RNBW, (posted about here) it was discovered the latest version of QB64 won't compile correctly when the .BAS filename has an $ in it. Previous QB64 versions did compile them, but not v0.6 and newer.
Example, save a file with $ in it, like Money$.bas, it will have a compile error. Without the $ it will compile.
- Dav
|
|
|
Reading a single value from Registry (Win) |
Posted by: euklides - 06-05-2022, 03:51 PM - Forum: General Discussion
- Replies (1)
|
 |
I'm looking for a way to read a single value from the registry (Win).
This exemple lists recents files opened in CorelDRAW Home & Student
Program written in VBA Excel.
Is it possible to have something same in QB64 ???
Thank's for help.
'---VBA EXCEL PROG---
a$ = "HKEY_CURRENT_USER\Software\Corel\CorelDRAW Home & Student\18.0\PPHome\Application Preferences\Framework\RecentFiles"
MsgBox RegKeyRead(a$)
stop
'---
Function RegKeyRead(i_RegKey As String) As String
Dim myWS As Object
On Error Resume Next
Set myWS = CreateObject("WScript.Shell")
RegKeyRead = myWS.RegRead(i_RegKey)
End Function
'---
|
|
|
Digital Cube |
Posted by: SierraKen - 06-04-2022, 10:28 PM - Forum: Programs
- No Replies
|
 |
![[Image: Sierraken-s-Digital-Cube.jpg]](https://i.ibb.co/r633tvW/Sierraken-s-Digital-Cube.jpg)
Was playing with SIN and COS again today and came across a cool color-changing layered cube that changes from strange lines to fuzzy pixels. It's much brighter than this photo shows.
Code: (Select All) Screen _NewImage(800, 600, 32)
_Title "Sierraken's Digital Cube"
Do
_Limit 50
c1 = Rnd * 255
c2 = Rnd * 255
c3 = Rnd * 255
tt = (Rnd * 360)
For t = 0 To tt Step .1
r = (Rnd * 50) - 25
x = (Sin(r) * 100 + r) + 400 + r
y = (Cos(tt) * 100 + r) + 300 + r
Circle (x, y), 1, _RGB32(c1, c2, c3)
Next t
Loop Until InKey$ = Chr$(27)
|
|
|
|