Search found 228 matches
- Feb 03, 2009 16:26
- Forum: General
- Topic: Write to Floppy does nt work
- Replies: 4
- Views: 1254
Write to Floppy does nt work
Here I am again. :-) I wrote a pice of code for writing to a floppy. It don 't give an error, but does nothing. Here it is: #include "windows.bi" Dim As ZSTRING * 512 zsBuffer Dim As Handle hDevice Dim As Integer i Dim iBytesRead As Integer For i = 0 To 511 zsBuffer[i] = 160 Next hDevice=C...
- Feb 02, 2009 13:40
- Forum: General
- Topic: High 32-bits in SetFilePointer() from read sector-sub
- Replies: 5
- Views: 1548
Just as a side note, according to the msdn documentation, the second parameter is specified as LONG (32bit). So I am not sure whether you will want to pass Sector as a double and not an integer/long value, because it's slower and you might experience loss of accuracy. Later I used Ulongint types, a...
- Feb 02, 2009 13:39
- Forum: General
- Topic: High 32-bits in SetFilePointer() from read sector-sub
- Replies: 5
- Views: 1548
- Jan 31, 2009 22:51
- Forum: General
- Topic: High 32-bits in SetFilePointer() from read sector-sub
- Replies: 5
- Views: 1548
High 32-bits in SetFilePointer() from read sector-sub
I have a sub for reading a sector from disk. But I need the 3th argument from SetFilePointer, who is the high 32-bits from the diskaddress. I tried the way like how it is in C++, but that will not work. I need to know how the notation is from the variable, and how to DIM it. Any help? Sub HDRead(Sec...
- Jan 27, 2009 23:14
- Forum: General
- Topic: Drive geometry porting from C++ to FB
- Replies: 2
- Views: 1452
Try: <snip code> As-is this only reports the first physical drive. So still needs some work, hint hint. Great! I'm very glad with it. Even it shows the power of FreeBASIC. Bye, bye, C++. :-) Another drive is no problem, so even the report of the total sectors. Now, there is a lopt of work to do for...
- Jan 27, 2009 12:21
- Forum: General
- Topic: Drive geometry porting from C++ to FB
- Replies: 2
- Views: 1452
Drive geometry porting from C++ to FB
I found a C++ program for to get the drivegeometry. Now I am curious if it's possible to porting to FreeBASIC. Here it is: #define UNICODE 1 #define _UNICODE 1 /* The code of interest is in the subroutine GetDriveGeometry. The code in main shows how to interpret the results of the call. */ #include ...
- Dec 08, 2008 6:15
- Forum: General
- Topic: Example gui program menures: how to install fixed font?
- Replies: 4
- Views: 1167
There are also 3 fixed-pitch fonts available as stock objects, with only a single function call required to get the handle. Even though the fonts have different identifiers, on my Windows 2000 system OEM_FIXED_FONT and SYSTEM_FIXED_FONT appear to be the same font. Thank you, I learned a lot about g...
- Dec 06, 2008 20:49
- Forum: General
- Topic: Example gui program menures: how to install fixed font?
- Replies: 4
- Views: 1167
I’m not sure exactly what you are doing, so I created an example that shows how to set the font for a control, and how to set the font for the client area of the window. The other possibility is setting the font for the non-client area of the window (caption, menu, etc), but this requires system-wi...
- Dec 06, 2008 3:53
- Forum: General
- Topic: Example gui program menures: how to install fixed font?
- Replies: 4
- Views: 1167
Example gui program menures: how to install fixed font?
The example gui program menures which comes with FreeBASIC, writes
in one proportional font. This is not pretty for tables, and I should want to
innstall a fixed font in the program. Anyone who knows how to do that?
Greetings,
Jawade
in one proportional font. This is not pretty for tables, and I should want to
innstall a fixed font in the program. Anyone who knows how to do that?
Greetings,
Jawade
- Oct 14, 2008 4:01
- Forum: Beginners
- Topic: PEEK from console screen. Possible?
- Replies: 3
- Views: 1613
PEEK from console screen. Possible?
How to PEEK from console screen?
I found something like
SendMessage(hWnd, WM_SYSCOMMAND, 0xFFF5, 0); // Select All
SendMessage(hWnd, WM_SYSCOMMAND, 0xFFF0, 0); // Copy
But I don't know how to use it. Is it possible, and how?
Thanks.
I found something like
SendMessage(hWnd, WM_SYSCOMMAND, 0xFFF5, 0); // Select All
SendMessage(hWnd, WM_SYSCOMMAND, 0xFFF0, 0); // Copy
But I don't know how to use it. Is it possible, and how?
Thanks.
- May 30, 2008 14:42
- Forum: General
- Topic: BUG: Pressing VK_RMENU is same like VK_LCONTROL
- Replies: 10
- Views: 3701
By “I don’t really understand what you are trying to do”, I meant that I don’t understand your description of the problem and I don’t understand what your code is supposed to do. This is what I get for left-Alt: <code snipped> And this is what I get for right-Alt: <code snipped> I see no problem wi...
- May 29, 2008 19:11
- Forum: General
- Topic: BUG: Pressing VK_RMENU is same like VK_LCONTROL
- Replies: 10
- Views: 3701
Jawade, I don’t really understand what you are trying to do, but I can see several errors in your code. The GetKeyState function returns a short (in FB a 16-bit signed integer), with the high-order bit set if the specified key is down, or cleared if the specified key is up. If you were testing the ...
- May 29, 2008 16:01
- Forum: General
- Topic: BUG: Pressing VK_RMENU is same like VK_LCONTROL
- Replies: 10
- Views: 3701
Re: BUG: Pressing VK_RMENU is same like VK_LCONTROL
I tried your example and didn't see the problem you experienced. In the future, please post your code in code blocks. Strange. I have made a program with QBASIC, and there was the problem not. So I think FreeBASIC is the reason. In the example, if I press RIGHT-ALT, the two VK_LCONTROL and VK_CONTR...
- May 29, 2008 14:48
- Forum: General
- Topic: BUG: Pressing VK_RMENU is same like VK_LCONTROL
- Replies: 10
- Views: 3701
Re: BUG: Pressing VK_RMENU is same like VK_LCONTROL
erm, ALTGR entspricht LSTRG+(R)ALT ;) somit drückt die rechte Alt-Taste die LSTRG automatisch mit, sozusagen. Mach mal Word oder den Editor auf und probier folgendes: ALTGR + ß >>> \ STRG + ALT + ß >>> \ (!) mfG Cherry === Thanks for your reply, but I don't understand it. Can you give an example? J...
- May 29, 2008 14:26
- Forum: General
- Topic: BUG: Pressing VK_RMENU is same like VK_LCONTROL
- Replies: 10
- Views: 3701
Re: BUG: Pressing VK_RMENU is same like VK_LCONTROL
Here is a better example, I could not copy more spaces: #include "windows.bi" Dim Shared a As String Cls: Locate , , 0 Do a = InKey$ Locate 1, 1 Print "VK_CAPITAL... "; Right$(Bin$(GetKeyState(VK_CAPITAL) Or 4294967296), 32) Print "VK_NUMLOCK... "; Right$(Bin$(GetKeySta...