Search found 436 matches

by Lothar Schirm
Dec 16, 2022 15:16
Forum: General
Topic: PMap Does not work correctly?
Replies: 15
Views: 1840

Re: PMap Does not work correctly?

Thank you fxm! You wrote: But it seems to me that there is a "bug?" (IMHO) in the 'Pmap' function only, that adds +1 pixel offset for the max value. Maybe confusion between number of pixels (100 - 10 + 1 = 91) of the viewport, and number of intervals between pixels (100 - 10 = 90). If I wo...
by Lothar Schirm
Dec 15, 2022 17:21
Forum: General
Topic: PMap Does not work correctly?
Replies: 15
Views: 1840

PMap Does not work correctly?

I get unexpected results with PMap (FreeBASIC 1.09, Windows 11). What is wrong? ScreenRes 500, 500 View (10, 10) - (100, 100) Window (0, 0) - (9, 9) Print "Logical x=4.5, Physical x="; PMap(4.5, 0) '' Expected 55, result: 45.5 Print "Logical y=4.5, Physical y="; PMap(4.5, 1) '' E...
by Lothar Schirm
Nov 22, 2022 14:40
Forum: Beginners
Topic: FbEdit - internal debugger
Replies: 5
Views: 1056

Re: FbEdit - internal debugger

I guess the internal debugger of FBEdit works only with fbc32. Dear Lothar, thank you for the hint. Unfortunately it does not work either. Absolutely no reaction. OK, so I have to stick with an external debugger. Some years ago I tried the internal debugger of FBEdit with the actual version of fbc ...
by Lothar Schirm
Nov 19, 2022 14:25
Forum: Beginners
Topic: FbEdit - internal debugger
Replies: 5
Views: 1056

Re: FbEdit - internal debugger

I guess the internal debugger of FBEdit works only with fbc32.
by Lothar Schirm
Aug 28, 2022 10:56
Forum: Sources, Examples, Tips and Tricks
Topic: mouse pointer hit box via fb, winapi and sdl2
Replies: 3
Views: 1516

Re: mouse pointer hit box via fb, winapi and sdl2

Very nice examples and write up. Good job! For the windows API example, the HWND of the fb graphics window is exposed through ScreenControl and the following could be used if FindWindowA() could be unreliable due to duplicate window titles: #include "fbgfx.bi" function getFBGfxHWND() as H...
by Lothar Schirm
Aug 26, 2022 16:22
Forum: Sources, Examples, Tips and Tricks
Topic: Simple Macro for Debugging
Replies: 0
Views: 2323

Simple Macro for Debugging

Simple macro for debugging, may be helpful perhaps for somebody to check the vaule of variables in a running program: '=============================================================================== ' Debug.bi ' Macro for debugging '===================================================================...
by Lothar Schirm
Jul 25, 2022 8:37
Forum: Sources, Examples, Tips and Tricks
Topic: Windows Console - Extended Input Subroutine
Replies: 9
Views: 2138

Re: Windows Console - Extended Input Subroutine

In graphics mode, I use Draw String ..., "_" to place the text cursor at the right position, in the same way as the Input function. Code: Sub TextCursor() 'Im Grafik-Mode den Cursor setzen. Vorher muss mit View und Window der 'Grafikbildschirm in sein ursprüngliches Koordinatensystem zurüc...
by Lothar Schirm
Jul 24, 2022 8:33
Forum: Sources, Examples, Tips and Tricks
Topic: Windows Console - Extended Input Subroutine
Replies: 9
Views: 2138

Re: Windows Console - Extended Input Subroutine

Nice code! Nearly the same as I use it myself for console programs. You can easily extend your code if you do not only use ESC or ENTER as Exitcode, but also the cursor keys UP, DOWN and also TAB and SHIFT TAB so that you can navigate within an arry of input fields. This allows you to enter data int...
by Lothar Schirm
Mar 07, 2022 14:42
Forum: General
Topic: SIne Wave
Replies: 27
Views: 2081

Re: SIne Wave

Lothar Schirm I like mapping and mapping functions when needed. This method worked well in my globe drawing algorithm. The globes look the same at any size and didn't require a lot of code or code rewriting. I guess its a matter of coding preferences. 'To compile fbc -s gui globe.bas 'Globe Drawing...
by Lothar Schirm
Mar 06, 2022 14:46
Forum: General
Topic: SIne Wave
Replies: 27
Views: 2081

Re: SIne Wave

Generally, for plotting mathematical functions I would not use physical screen coordinates, I use "Window" in order to use mathematical coordinates. See second example in https://www.freebasic.net/wiki/KeyPgWindow . This makes coding easier (no mapping required) and better readable, in my ...
by Lothar Schirm
Mar 05, 2022 16:03
Forum: Libraries & Headers
Topic: sGUI
Replies: 250
Views: 76091

Re: sGUI

Hi Coolman, you could try FB_GUI by BasicScience, seems to use xFont (see my last post in "Simple GUI").
by Lothar Schirm
Mar 05, 2022 15:58
Forum: Sources, Examples, Tips and Tricks
Topic: Simple GUI
Replies: 77
Views: 22498

Re: Simple GUI

Hi Lothar Schirm! And there is no desire to implement the xFont library in your library? This would help with the font size and make it possible to use not only 127 ASCII characters, but also Unicode. In any case, I like what you do. I do not want to invest further work in this GUI. I just need som...
by Lothar Schirm
Mar 04, 2022 18:59
Forum: Sources, Examples, Tips and Tricks
Topic: Simple GUI
Replies: 77
Views: 22498

Re: Simple GUI

Hi Coolman, the font size is 8 x 16 pixels, as defined by Width in the Sub OpenWindow of GUI.bi. No simple way to change this to a larger font, 16 pixels is the largest font height.
by Lothar Schirm
Mar 04, 2022 14:42
Forum: Sources, Examples, Tips and Tricks
Topic: Simple GUI
Replies: 77
Views: 22498

Re: Simple GUI

Hi Ray,
"Simple GUI" is not a Windows API GUI, it is pure FreeBASIC on a FB grafics screen. See URL on first post for download (there are also some screenshots).
by Lothar Schirm
Jan 14, 2022 16:45
Forum: Windows
Topic: Lutz Ifers WinAPI Tutorial
Replies: 10
Views: 2760

Re: Lutz Ifers WinAPI Tutorial

Hi Ray, I do not use Malwarebytes. I use Firefox and Kaspersky Internet Security. When I go to that site, I see a small black warning triangel at the left side of the URL. This seems to mean that Kaspersky cannot verify the site (whatever that means - no certificate?). But when I enter "freebas...