Search found 629 matches

by grindstone
Apr 17, 2019 12:39
Forum: General
Topic: Check if active
Replies: 4
Views: 345

Re: Check if active

Something like this? #Include "windows.bi" #Include "win\psapi.bi" Dim As HANDLE processhandle, hwnd Dim As ULong PID Dim As ZString*MAX_PATH filename hwnd = GetActiveWindow() If hwnd Then GetWindowThreadProcessId(hwnd, @PID) processHandle = OpenProcess(PROCESS_QUERY_INFORMATION ...
by grindstone
Mar 07, 2019 20:24
Forum: General
Topic: Loading Files
Replies: 6
Views: 500

Re: Loading Files

I would prefer the upper one, because FB does the memory management for me, and I can (mis-)use FB's string functions on the content.
by grindstone
Mar 07, 2019 9:41
Forum: General
Topic: Loading Files
Replies: 6
Views: 500

Re: Loading Files

Why that complicated?

Code: Select all

Open "MySoundFile.mp3" For Binary Access Read As #1
Dim As String g = Input(Lof(1), #1)
Close 1
by grindstone
Feb 08, 2019 10:56
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 737

Re: Matrix to string

The sub is that awfully slow, because with every extension the whole existing string is copied to an other memory location. Better once create an empty string of spaces of the necessary length an then replace the spaces with the converted doubles (maybe even faster with indexed strings instead of MI...
by grindstone
Feb 08, 2019 9:13
Forum: Tips and Tricks
Topic: Image Painting Demos [Windows only]
Replies: 22
Views: 1472

Re: Image Painting Demos [Windows only]

@MrSwiss: You can't help doing it...

@UEZ: Just consider it as a nonbinding expression of opinion and follow your way.
by grindstone
Jan 29, 2019 18:44
Forum: Beginners
Topic: Ownership?
Replies: 18
Views: 1061

Re: Ownership?

Working without any problems here (WinXP 32bit / FB 1.05 / FBEdit / -s console). Running from the FB folder of my data partition (D:\freeBasic\...)
by grindstone
Jan 27, 2019 18:53
Forum: Game Dev
Topic: Having trouble with tilesheets
Replies: 4
Views: 670

Re: Having trouble with tilesheets

If your problem is how to get an image section from an existing image, this can be done quite easy: ScreenRes 640,480,32 Dim As Any Ptr sourcepic = ImageCreate(200, 200) 'buffer for source picture Dim As Any Ptr grabpic = ImageCreate(100, 100) 'buffer for image section 'replace "marmot.bmp"...
by grindstone
Jan 26, 2019 14:18
Forum: Beginners
Topic: ShellExecuteW() (does a folder exist?)
Replies: 4
Views: 423

Re: ShellExecuteW() (does a folder exist?)

Sometimes I wonder why a BASIC dialect doesn't have BASIC functions like FileRead$() or IsFolder () ;-) Something like this? #Include "dir.bi" If Len(Dir("временная папка", fbDirectory)) Then Print "temp folder exists" Else Print "no temp folder" EndIf
by grindstone
Jan 21, 2019 10:04
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 1919

Re: No german umlauts with libcurl

If I submit "ä" instead of "%C3%A4" I get a response saying "Spezialseite nicht vorhanden" (special site not present).
by grindstone
Jan 20, 2019 16:26
Forum: Beginners
Topic: DIR does list (some) files as directories
Replies: 14
Views: 789

Re: DIR does list (some) files as directories

I would recommend to call DIR with all attributes set and check the desired attributes afterwards: #Include "dir.bi" ChDir "C:\Users\padawan\FreeBASIC-1.05.0-win64" Declare Sub listFiles (filespec As String, attrib As Integer) Sub listFiles (filespec As String, attrib As Integer)...
by grindstone
Jan 20, 2019 15:04
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 1919

Re: No german umlauts with libcurl

I assume you're not content with just passing percent-encoded ASCII URLs to the function? Your assumption is wrong. :-) It's all the same to me what I have to pass to the function, as long as it works. The URL that I extracted from the (german) homepage of Wikipadia already is percent-encoded (&quo...
by grindstone
Jan 18, 2019 10:12
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 1919

Re: No german umlauts with libcurl

As far as I can see, wget uses the libraries libeay32.dll and libssl32.dll. Does anyone know something about a description or header files (.h / .bi)?
by grindstone
Jan 18, 2019 9:26
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 1919

Re: No german umlauts with libcurl

caseih wrote:wget, on the other hand, retrieves the document just fine.
I can confirm that, thank you for the hint to wget. Is there a way to use wget as a library?
by grindstone
Jan 16, 2019 22:29
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 1919

Re: No german umlauts with libcurl

Same result with firewall off.
by grindstone
Jan 16, 2019 7:54
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 1919

Re: No german umlauts with libcurl

What library did you use?

When I run your DownloadPageWithUmlauts.exe I only get a console window showing "#D-U"

Go to advanced search