Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do VFP controls fake it?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01037136
Message ID:
01037922
Views:
16
>Hi Dawa,
>
>I don't know why and when this was decided...it was before my time. My understanding is that there were serious challenges to using Win controls upfront and compatibility with 2.x issues but I don't know the details.
>
>As to changing the cursor, I believe there's an API function that can do that and you can call it in the GotFocus of the control you want to effect. I don't know of any way to do it purely in VFP.
>
>As to advantages to bitmaps over Win controls: There are many advantages. Early on in VFP there was concern that the runtimes were large; however, apps didn't consure that much GDI memory. Now, the 4-5MB VFP runtime seems little and we still have the advantage of very small footprints for VFP controls.
>
>I've seen several non-VFP apps crash and burn because they became memory pigs because everything was a Win control.
>
>You do lose some native control with controls not being Win controls (with an hwnd, etc) but what you gain in speed and memory conservation more than makes up for it IMHO.
>
>
>See?
>
>>>There's an internal event handler that intercepts everything before it gets to Windows. So everything is completely internal to VFP (for the most part).
>>

John,

Thanks for the reply!

I did a test as have suggested except I used c#.net instead of VB.NET:

>Try this: Create a VFP form and add a 1000 textboxes to it (You can do it in code with ASELOBJ). Now, so the same thing in VB6 or VB.Net. Run each and then check system resources while running using Task Manager.

But the result is actually superizingly the opposite.
I created a VFP Project called tb.pjx so I have tb.exe
I create a windows application in c# which I named vstb.csproj so I have vstb.exe in the release folder.
From task manager:

Image name Mem Usage Peak Mem Usage
tb.exe 16,908 16,908
vstb.exe 9,396 11,980
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Previous
Reply
Map
View

Click here to load this message in the networking platform