Search found 9389 matches

by fxm
Jan 29, 2020 17:45
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

And, if possible, your SUB for the time-display thread ?
by fxm
Jan 29, 2020 17:26
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

I think we will not be able to help you successfully if you do not provide us with your current full code.
(I am afraid that in the main thread, INPUTSCREEN uses the INPUT keyword that so must compete with output keywords in the time-display thread)
by fxm
Jan 29, 2020 10:03
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

@mark bower, General remark on some of your previous codes: Inside any [Mutexlock...Mutexunlok] block (or any [Screenlock...Screenunlock] block) of any thread (main thread and user threads), never place an ending instruction as 'If ... Then Exit ...' because the mutex remains locked (or the ...
by fxm
Jan 29, 2020 6:16
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

For the beauty of the thing, don't forget to destroy the mutex at the end (only when the thread is finished):

Code: Select all

.....
.....

isRunning => false

ThreadWait hThread

MutexDestroy ( mutex )
by fxm
Jan 28, 2020 17:34
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

Note: - [Screenlock...Scrennunlock] blocks are not compatible with multi-threading (otherwise, the program hangs). This is why a mutex block must be used around each such block to ensure the mutual exclusion. - The input keywords (like for keyboard, mouse) cannot be safely run when the screen is lo...
by fxm
Jan 28, 2020 14:25
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

Simple example but only working with a mutex: (I don't see how to make it work without mutex) Dim Shared As Integer x, y, wheel, buttons Dim Shared As Boolean quit = false Dim Shared As Any Ptr pmutex Dim As Any Ptr pthread Sub Thread (Byval p As Any Ptr) Do Mutexlock(pmutex) Getmouse(x, y, wheel, b...
by fxm
Jan 28, 2020 12:29
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

I never tried it because I don't think it works.
by fxm
Jan 28, 2020 9:34
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

Beware when using SCREENLOCK with multi-threading: - The screen is locked by stopping the thread that processes also the OS' events. - Thus, when the screen is locked, all other threads are stopped up to the screen unlocking. - Only runs the thread which has locked the screen. This behavior occurs ...
by fxm
Jan 28, 2020 5:58
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 24
Views: 378

Re: ON ERROR GOTO to display problem line

mark bower wrote:I do have mulithread in the program, but I honestly am not sure of its use in my program (I incorporated it with help from the Forum many years ago).

Could you point us to the corresponding topic(s) in the forum?
by fxm
Jan 26, 2020 10:24
Forum: Community Discussion
Topic: Pull Requests
Replies: 27
Views: 1352

Re: Pull Requests

#attach# / #detach# ?
by fxm
Jan 25, 2020 18:43
Forum: Community Discussion
Topic: Pull Requests
Replies: 27
Views: 1352

Re: Pull Requests

OKAY.
(I think in each of your two examples above, 'print y' should be replaced with 'print x', because '@x' is the destination address and '@y' is the source address)
by fxm
Jan 25, 2020 13:52
Forum: Community Discussion
Topic: Pull Requests
Replies: 27
Views: 1352

Re: Pull Requests

@JK But if we ever keep it, I wish it had the same type of declaration as the current POKE: declare sub poke any ( byval pdst as any ptr, byval psrc as any ptr, byval bytes as uinteger ) Consequently 'poke any, pdst, psrc, bytes' would act as 'fb_memmove( byval pdst , byval psrc , bytes)'. ??? By sp...
by fxm
Jan 17, 2020 21:16
Forum: Beginners
Topic: text viewport
Replies: 2
Views: 116

Re: text viewport

Is your question about the paragraph "Creating a Text View Port" at page 213 of the "A Beginner’s Guide to FreeBasic" book ?
If yes, see also VIEW PRINT.
by fxm
Jan 17, 2020 20:15
Forum: Beginners
Topic: Key inkey getkey
Replies: 21
Views: 427

Re: Key inkey getkey

Re beginners guide to free basic: I cannot get this example to work, please help.] So that your program can use the mouse in a command window, you must modify (if necessary) the properties of this command window (button in the top left corner) as following: in the 'properties / options' tab, unchec...
by fxm
Jan 17, 2020 15:32
Forum: Beginners
Topic: Key inkey getkey
Replies: 21
Views: 427

Re: Key inkey getkey

Re beginners guide to free basic: I cannot get this example to work, please help.] So that your program can use the mouse in a command window, you must modify (if necessary) the properties of this command window (button in the top left corner) as following: in the 'properties / options' tab, unchec...

Go to advanced search