...region).
So before you can PUT the array, you need to place these values into it.
The header is 4 bytes, and an entire buffer in SCREEN 13 is 320 * 200 = 64000 bytes, so the buffer needs to be 64004 bytes long. If the buffer is made out of QB INTEGERs, then it will need to contain 32002...
Here's the approach I take, by the way. It is conceptually a bit cleaner than repeatedly adding to a string.
padded$ = RIGHT$("000000" + LTRIM$(STR$(number%)), 7)
Of course this only works with positive numbers.
Here is some information on the QuickSort, in case anybody is still a bit confused:
faq314-336 "What is the Quick Sort, and how fast is it, really?"
Hehe, you were told to avoid 2000? Whoever recommended that to you was misinformed :-) Windows 2000 is the most stable of the mainstream Windows line yet released. It lacks a few of the features of XP, but in part that is what actually makes it stable. Also, 2000 is faster than XP -- in some...
SEWill, I think what you need to see is that SUBs automatically return to the place from which they were called, as soon as QB reaches the end of the subroutine. Here is a simple example:
DECLARE SUB test ()
PRINT "a"
test
PRINT "c"
SUB test
PRINT "b"
END SUB...
mgh730,
What you need to do is wrap up the routines to draw the mouse cursor inside SUBs. Then, you can maintain two versions of the cursor, one in PUT format and one in a simple array that's easy for you to access (or you could even figure out how to read it directly from the PUT array -- in...
...Typically, this can be done by numbering from left to right across each row, and then top-down. The index of square (column,row) would then be row*width + column, and the coordinate of a square can then be extracted using integer division and modulus (the \ and MOD operators in QB): row =...
But because it's not object-oriented, it doesn't run itself. You can't just add a bunch of controls to a form. You can't just ask an object to draw itself. Building up forms dynamically is difficult and requires container structures outside of the parent object, etc. It is my belief that any...
PEEK and POKE are for accessing memory directly. On very old systems, like the VIC20, TRS-80, Z80, etc., hardware access was achieved by accessing memory at special locations. The memory access would then be intercepted and translated into a hardware command. This is still done to a much more...
Mode X is a slang name for a VGA hack that achieves 320x240 in 8-bit colour with square pixels. I recommend you read up on it in Michael Abrash's Black Book, he explains all the VGA options very well. It's a much more difficult mode to work with compared with mode 13h (SCREEN 13), though...
An NT class Windows will not crash at all, and in all likelihood if you misplace a pointer while running under Windows 9x, you will simply crash another program that is running. You could also crash the system, but it would not be permanent (you could just reboot). The chance of actually...
The preferred method for calling assembler functions from QB is to make a separate assembler module, assemble it to its own OBJ file using an assembler like MASM or TASM, then link the OBJ file into the project. You can then use a DECLARE statement to specify parameters, calling convention and...
...(through ReadProcessMemory). Other flags of interest are PROCESS_VM_WRITE and SYNCHRONIZE, the latter of which allows the handle to be used in Wait* API functions (e.g. WaitForSingleObject) to block until the process exits.
Once the process has been successfully opened and the handle has...
I know all about it, actually I've read Abrash's Black Book, but QB can't properly take advantage of most of those tricks. Anyway, as far as I am concerned, the art of realtime graphics is somewhat lost now that we have 3D accelerators to take care of it for us. Not that it's trivial to do with...
I know all about it, actually I've read Abrash's Black Book, but QB can't properly take advantage of most of those tricks. Anyway, as far as I am concerned, the art of realtime graphics is somewhat lost now that we have 3D accelerators to take care of it for us. Not that it's trivial to do with...
It's important to decouple renderer from graphic display program. I know people who have written complex raytracing programs which can handle arbitrary image sizes and pixel bit depths, and they got around the display mode problem by simply not displaying the result. Instead, they dump it to a...
agual, as far as I understand it, he doesn't want the scientific notation. He wants to see 0.00000000000000001 instead of 1D-16. However, your suggestion of using PRINT USING can still be applied, if he's using PRINT to display the values. I provided a more generic solution since he was simply...
Here's a little hack job I did back in my BBSing years. I assume it works. It seems similar to one of the examples already posted. If this code does not work, then your modem may not be following the RS232 specification correctly.
DECLARE SUB prunt (a$)
OPEN "COM4:" FOR RANDOM AS #1...
This should in theory not differ from talking to a regular line modem. As long as the wireless modem is connected to one of the standard COM ports, you can access the modem using PRINT and LINE INPUT. The following statement should allow you to access the modem if it is on COM1 with no parity, 8...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.