Search found 2978 matches

by vdecampo
Jun 05, 2017 15:44
Forum: Beginners
Topic: Always on top
Replies: 9
Views: 352

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
by vdecampo
Jun 05, 2017 15:19
Forum: Beginners
Topic: Always on top
Replies: 9
Views: 352

Re: Always on top

Yes
by vdecampo
Jun 05, 2017 15:17
Forum: Community Discussion
Topic: A new section for FreeBasic on The Joyful Programmers forum
Replies: 28
Views: 1572

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...
by vdecampo
May 16, 2017 17:54
Forum: Linux
Topic: Question about gcc internal library
Replies: 10
Views: 523

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
by vdecampo
May 16, 2017 13:11
Forum: Windows
Topic: How to mark application to require admin privilegies to run?
Replies: 2
Views: 308

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...
by vdecampo
May 11, 2017 15:45
Forum: General
Topic: turtle 2.0
Replies: 31
Views: 1346

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
by vdecampo
May 08, 2017 12:09
Forum: General
Topic: Threads and thread-safety
Replies: 5
Views: 370

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...
by vdecampo
May 05, 2017 13:41
Forum: Beginners
Topic: Can functions return arrays?
Replies: 40
Views: 1511

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...
by vdecampo
Apr 18, 2017 17:50
Forum: Beginners
Topic: Optimising speed of loops
Replies: 12
Views: 801

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
by vdecampo
Apr 07, 2017 16:23
Forum: Windows
Topic: Access Violation Exception
Replies: 5
Views: 794

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...
by vdecampo
Apr 06, 2017 12:53
Forum: Libraries
Topic: Library FBImage for Windows/Linux 32/64-bit.
Replies: 42
Views: 5228

Re: Library FBImage for Windows/Linux 32/64-bit.

How did I miss this library?!
Another great addition thanks to DJ!

You rock!

-Vince
by vdecampo
Apr 03, 2017 16:42
Forum: Projects
Topic: Normal Mapping
Replies: 48
Views: 2779

Re: Normal Mapping

Can any of these functions be generalized into a software rendering library of sorts? This is very nice work.

-Vince
by vdecampo
Mar 26, 2017 0:36
Forum: General
Topic: Timer & Threads
Replies: 28
Views: 1612

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
by vdecampo
Mar 17, 2017 16:30
Forum: Beginners
Topic: Weird destructor problem
Replies: 10
Views: 592

Re: Weird destructor problem

Could you use GUIWIN ptr, new, and delete? Would this be a safer way to destroy a class mid-program? No the destructor will get called. Why would you destroy the whole class just to get rid of the window? And why couldn't you recreate the class if needed? Could you just put in a separate method to ...
by vdecampo
Mar 17, 2017 16:08
Forum: Beginners
Topic: Weird destructor problem
Replies: 10
Views: 592

Re: Weird destructor problem

Assuming GUIWIN is an FB class you created, you don't normally need to call the destructor explicitly as it will be called automatically when the variable falls out of scope. IIRC

-Vince

Go to advanced search