This isn't an array. It looks like you are using a Listbox control. They are 2 very different things.
-Vince
Search found 2980 matches
- Jun 08, 2017 19:31
- Forum: General
- Topic: How to use Arrays In FreeBASIC
- Replies: 12
- Views: 2361
- Jun 06, 2017 18:49
- Forum: Beginners
- Topic: Always on top
- Replies: 9
- Views: 948
Re: Always on top
#Include "windows.bi" Dim As POINT pt Do If GetCursorPos(@pt) Then Print pt.x, pt.y End If If GetAsyncKeyState(VK_LBUTTON) Then Print "Left Button Pressed" Sleep 100 Loop Until InKey=Chr(27) You can get a list of all the virtual key codes Here -Vince
- Jun 05, 2017 15:44
- Forum: Beginners
- Topic: Always on top
- Replies: 9
- Views: 948
Re: Always on top
Yes Here is a start for your wish list. This will get the screen coordinates of the mouse whether inside or outside of the program window #Include "windows.bi" Dim As POINT pt Do If GetCursorPos(@pt) Then Print pt.x, pt.y End If Sleep 100 Loop Until InKey=Chr(27) -Vince
- Jun 05, 2017 15:19
- Forum: Beginners
- Topic: Always on top
- Replies: 9
- Views: 948
- Jun 05, 2017 15:17
- Forum: Community Discussion
- Topic: A new section for FreeBasic on The Joyful Programmers forum
- Replies: 28
- Views: 5367
Re: A new section for FreeBasic on The Joyful Programmers forum
I was watching some MIT lectures while researching the idea of creating a new programming language and the one key point the professor spoke of was that it would need to have at a minimum, associative arrays as a standard data type. I searched the FB forum and found several discussions of which I w...
- May 16, 2017 17:54
- Forum: Linux
- Topic: Question about gcc internal library
- Replies: 10
- Views: 1755
Re: Question about gcc internal library
St_W wrote:I'd rather suggest to enable compiler optimizations if you're already using the gcc backend of FreeBasic.
Another suggestion would be to optimize your algorithms.
-Vince
- May 16, 2017 13:11
- Forum: Windows
- Topic: How to mark application to require admin privilegies to run?
- Replies: 2
- Views: 776
Re: How to mark application to require admin privilegies to run?
You need to create a manifest file that goes with your EXE file. Example (MyApp.exe.manifest) <?xml version="1.0" encoding="utf-8" ?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm...
- May 11, 2017 15:45
- Forum: General
- Topic: turtle 2.0
- Replies: 31
- Views: 2753
Re: turtle 2.0
[quote="bplus"Also screen 20 is a shade too tall for my laptop, I checked out screen in help and see I am restricted to preset sizes.[/quote]
Check out the ScreenRes command. You can specify height/width of most any size.
-Vince
Check out the ScreenRes command. You can specify height/width of most any size.
-Vince
- May 08, 2017 12:09
- Forum: General
- Topic: Threads and thread-safety
- Replies: 5
- Views: 771
Re: Threads and thread-safety
A routine is thread-safe when it is re-entrant without concern of race conditions or variable value collisions. What this generally means is that there are no global variables accessed by the routine and that every entry will have its own safe copy of variables or values. There are exceptions to wan...
- May 05, 2017 13:41
- Forum: Beginners
- Topic: Can functions return arrays?
- Replies: 40
- Views: 3544
Re: Can functions return arrays?
You you can pass a pointer to the array. The biggest issue is there is no mechanism to dynamically declare an array based on the return from a function (That I know of). For instance in C# you can do... string[] parts = somestring.Split(','); This would declare a string array of parts based on the r...
- Apr 18, 2017 17:50
- Forum: Beginners
- Topic: Optimising speed of loops
- Replies: 12
- Views: 1671
Re: Optimising speed of loops
The best speed optimization for loops is to unroll them. Do as many calculations per loop as you can. For example, instead of counting from 1 to 100 doing a calculation each iteration, step by 5 and do 5 calculations per loop.
-Vince
-Vince
- Apr 07, 2017 16:23
- Forum: Windows
- Topic: Access Violation Exception
- Replies: 5
- Views: 1593
Re: Access Violation Exception
You need to pin the byte array and marshal it to a fixed memory buffer. Example IntPtr unmanagedPointer = Marshal.AllocHGlobal(bytes.Length); Marshal.Copy(bytes, 0, unmanagedPointer, bytes.Length); // Call unmanaged code Marshal.FreeHGlobal(unmanagedPointer); Then you need to copy the result back to...
- Apr 06, 2017 12:53
- Forum: Libraries
- Topic: FBImage static Win/Lin 32/64-bit
- Replies: 58
- Views: 13507
Re: Library FBImage for Windows/Linux 32/64-bit.
How did I miss this library?!
Another great addition thanks to DJ!
You rock!
-Vince
Another great addition thanks to DJ!
You rock!
-Vince
- Apr 03, 2017 16:42
- Forum: Projects
- Topic: Normal Mapping
- Replies: 50
- Views: 8001
Re: Normal Mapping
Can any of these functions be generalized into a software rendering library of sorts? This is very nice work.
-Vince
-Vince
- Mar 26, 2017 0:36
- Forum: General
- Topic: Timer & Threads
- Replies: 28
- Views: 3008
Re: Timer & Threads
You shouldn't have to mutex reading the timer, but IIRC the timer only has a resolution accuracy of 15ms. Also, at least under Windows, you cannot guarantee a thread will start executing immediately when it is called.
-Vince
-Vince