Search found 9 matches

by mouse
Sun May 07, 2006 1:58 am
Forum: Coding Questions
Topic: Possible array copy bug?
Replies: 3
Views: 1134

I see what you're saying here Psychophanta, but in my opinion it seems a little inconsistant (and as far as I've seen undocumented). For example, as in the code below, you can't do the same with a structure.

BTW this isn't a gripe, it's just a personal thought! :?


Structure st
a.l
b.l ...
by mouse
Sat May 06, 2006 5:26 pm
Forum: Coding Questions
Topic: Possible array copy bug?
Replies: 3
Views: 1134

Possible array copy bug?

If you copy an array without specifying the element (ie a2()=a1() ) then both arrays point to the same memory space, so if you subsequently change either array both are updated.

Not sure if this should be a compile error, or if the array contents should be copied (which would be nice :D )


Dim a1 ...
by mouse
Sat Apr 29, 2006 7:22 pm
Forum: Coding Questions
Topic: Preventing console window close
Replies: 8
Views: 2563

Thanks for that Sparkie - appreciated!
by mouse
Sat Apr 22, 2006 1:48 am
Forum: Coding Questions
Topic: Preventing console window close
Replies: 8
Views: 2563

If it helps, the follwing illustrates that the #CTRL_C_EVENT and #CTRL_BREAK_EVENT work ok (as suggested by Fred), but the #CTRL_CLOSE_EVENT causes windows to think the program is trying to close but timed out. I don't know if this is a bug or a coding problem.

Don't know if the console handler ...
by mouse
Sat Apr 22, 2006 12:35 am
Forum: Coding Questions
Topic: Preventing console window close
Replies: 8
Views: 2563

If you return #True to the event callback, it should do the trick:

Thanks Fred, getting closer, but not quite there. Returning #True doesn't close the window, but Windows gives a dialog asking to [End Now] or [Cancel].

"Windows cannot end this program. It may need more time to complete an ...
by mouse
Fri Apr 21, 2006 11:27 pm
Forum: Coding Questions
Topic: Preventing console window close
Replies: 8
Views: 2563

Preventing console window close

Hi, is there any way to prevent a user from closing the console window while a program is running? I'm still very new to Windows programming, so I guess I'm missing something basic here! After reading various threads and articles I've tried the following two methods, neither of which work. Any help ...
by mouse
Sun Mar 12, 2006 7:50 pm
Forum: Coding Questions
Topic: Fixed size console window
Replies: 3
Views: 868

Thanks for that,

Works perfectly. Don't know how I managed to miss it though when I searched msdn! :oops:
by mouse
Sat Mar 11, 2006 4:49 am
Forum: Coding Questions
Topic: Fixed size console window
Replies: 3
Views: 868

Here's the best solution I've got so far. This results in a titled console window at 80x25 characters that can not be resized to a larger size. Obviously this solution is for a Windows machine only

test.pb
; open a graphical console
OpenConsole()
EnableGraphicalConsole(1)

; set fore and ...
by mouse
Sat Mar 11, 2006 12:11 am
Forum: Coding Questions
Topic: Fixed size console window
Replies: 3
Views: 868

Fixed size console window

Hi,

Just started coding in PB and wondering how I ever did without it! :)

I'm trying to port some ancient software to windows, and the easiest way seems to be to use a graphical console (it uses a lot of PRINT, TAB, INPUT etc). I open the console like this:


OpenConsole()
EnableGraphicalConsole ...