Tuesday, July 20, 2021

New ErrorHandler VFPX Project

I released a new project to VFPX today called ErrorHandler. It’s a highly configurable and customizable error handler for any VFP application. Implementing ErrorHandler is as simple as adding a few files to your project, adding one line of code to your application startup, and deploying a few files with your application (some of which, such as wwDotNetBridge, you may already be deploying).

ErrorHandler supports logging error information to a table, displaying an easy-to-understand dialog to the user (see image below, although you can replace that dialog with one of your choosing), notifying support staff about the error via email or support ticket, and recovering from the error (either continuing in the application but not returning to the method that caused the error or terminating the application).

errordialog

See the documentation included with the project for complete details on how to implement and customize ErrorHandler in your applications.

Wednesday, June 02, 2021

Virtual Fox Fest 2021 (October) Speaker Reminder

Just a reminder that the deadline to submit session proposals for Virtual Fox Fest is next Monday, June 7th. You'll find details on our Call for Speakers page. We look forward to your ideas and session proposals.

Virtual Fox Fest is October 14, 20, and 26, 2021.

Tuesday, May 18, 2021

Virtual Fox Fest 2021 (October)

We're excited to offer you Virtual Fox Fest 2021 (October), a three-day online conference presenting the latest in Microsoft Visual FoxPro development techniques and interoperability with other technologies. This conference provides a venue for VFP developers to come together virtually to learn more about how our fellow developers are using and extending VFP. For details about Virtual Fox Fest, please see https://virtualfoxfest.com.

The conference is going to be on October 14th, 20th, and 26th, 2021.

We've issued the Call for Speakers for Virtual Fox Fest. If you are interested in presenting, please read the document referenced in that page and consider submitting sessions.

Tuesday, May 11, 2021

Virtual Fox Fest 2021 (May) Follow-up

Here are some follow-up notes about Virtual Fox Fest 2021 (May), the second online event hosted by Geek Gatherings:

  • Videos for all presentations are now available on YouTube for free to everyone, as our contribution to the VFP community. Be sure to subscribe to our channel.
  • If you didn't attend Virtual Fox Fest and want materials (white papers and sample code) for the presentations, go to https://geekgatherings.com/Registration and "register" for the conference. You're not really registering since it's over, but in the Registration Fees section of the registration page, you'll see "Virtual Fox Fest 2020 Session Materials (download)". The cost of the materials is $99. You can also purchase materials for the 2020 conference if you missed that, and there's an opportunity to sponsor Virtual Fox Fest, which means your name will be listed on our Sponsors page.
  • The next Virtual Fox Fest is scheduled for this fall: October 14, 20, and 26, 2021. We'll be issuing the call for speakers in the next week or two. Watch for announcements of speakers and sessions by the summer.
  • We have tentative dates for an in-person Southwest Fox conference next year: October 27-30, 2022, at the same location as previous years: the SanTan Conference Center in Gilbert, Arizona.
  • If you didn't attend Virtual Fox Fest, check out our Facebook page and see what you missed, then plan to attend a future one so you can join in the fun.

Monday, April 26, 2021

Virtual Fox Fest 2021 (May) is Almost Here!

Our thanks to all those who responded to our plea not to wait for the last minute. Here’s a reminder in case you got busy and forgot...

Virtual Fox Fest 2021 (May) is next week on May 6, 2021!  Get registered today! https://geekgatherings.com/Registration

Only 10 days until we gather virtually via the Internet! We look forward to seeing everyone soon.

Tuesday, April 13, 2021

Virtual Fox Fest 2021 (May): Procrastinators Unite and Register Today!

We’re glad so many have already registered for the May 6th Virtual Fox Fest. We still have room for many more.

If you’re planning to attend, please register sooner rather than later. Our hard working registration staff (Rick) is an organizer, and has a full-time job and then some working on customer projects. If too many of you wait until the week of the conference to register, some people may not get the credentials in time to see the first session on May 6th. It literally takes minutes for you to register, but it takes us longer to process your registration.

We don’t want you to miss all the details about the conference we’ll be sharing over the next couple of weeks. We want you to have a chance to read the white papers and download the examples once we release them before the conference starts. We’d hate to see you miss the opportunity to get a head start on all the goodies. Go get registered! Now, really, don’t waste another minute. Here is the link: http://geekgatherings.com/Registration

Virtual Fox Fest is May 6th, 2021! Conference website: https://virtualfoxfest.com/

Thursday, March 25, 2021

Getting Localized Day and Month Names

If you need to get a localized day or month name (such as "Thursday" or "March" in English, which are "Donnerstag" and "März" in German), there are Windows API calls that can help you but they can be complicated to use. This is especially true if you need the localized names in a language other than the one the user's machine is configured for. We have numerous customers that have their machine configured to use, for example, German, but want these names displayed in English.

wwDotNetBridge and .NET to the rescue. Pass this function a date or datetime value, the type of name wanted (see the comments in the code for the values; for example, use 2 for an abbreviated name such as "Thu" for "Thursday"), and a BCP-47 language code such as "en-US" for U.S. English or "de-DE" for Germany German. For example, to put a list of English month names into an array, use something like:

dimension laMonths[12]
for lnI = 1 to 12
laMonths[lnI] = GetDateName(date(2021, lnI, 1), 3, 'en-US')
next

Here's the code for the GetDateName function. It assumes the files for wwDotNetBridge are in place:

function GetDateName(tuDate, tnType, tcCulture)
local loBridge, lcFormat, loCulture, lcReturn
do wwDotNetBridge
loBridge = GetwwDotNetBridge()
do case
case tnType = 1
&& day
lcFormat = '{0:dddd}'
case tnType = 2
&& abbreviated day
lcFormat = '{0:ddd}'
case tnType = 3
&& month
lcFormat = '{0:MMMM}'
case tnType = 4
&& abbreviated month
lcFormat = '{0:MMM}'
endcase
loCulture = loBridge.CreateInstance('System.Globalization.CultureInfo', ;
tcCulture)
lcReturn = loBridge.InvokeStaticMethod('System.String', 'Format', loCulture, ;
lcFormat, tuDate)
return lcReturn

Tuesday, March 23, 2021

Time to Register for Virtual Fox Fest

Thanks to all who have already registered for Virtual FoxFest (May 6, 2021); we appreciate your support and our speakers are excited to share their sessions with you soon.

That said, we know there are those who have not registered and have good intentions to do so before the conference starts. Please do so sooner than later. It literally takes minutes to register. Here is the link: http://geekgatherings.com/Registration

Our Virtual Fox Fest shirt store has been updated for 2021! Check it out at https://geekgatherings.logosoftwear.com/. You can choose your favorite color or put the VFF logo on any item LogoSoftwear sells. You’ll find instructions for customizing your purchase at https://virtualfoxfest.com/geekwear.aspx.

After much consideration, we’ve decided to stick with a virtual event this fall. It will be structured similarly to Virtual Fox Fest 2020. Dates will be announced later. We’re already looking forward to a live Southwest Fox in 2022.

Saturday, February 20, 2021

Announcing Virtual Fox Fest May 2021

We had so much fun at Virtual Fox Fest 2020 that we’ve decided to do more online conferences. They won’t all be three-day events; in fact, the next one (Thursday, May 6, 2021) is a one-day event. However, it’ll still have the same great features everyone loves about VFF: great speakers delivering great sessions, live chatting during presentations, and getting to hang out virtually with new and old friends. This event will feature classic sessions from Southwest Fox, updated for 2021. Registration is available now so sign up today!

We’re still discussing whether to hold Southwest Fox in Arizona this fall. We expect to announce our plans for a fall conference by the end of March.

Wednesday, January 20, 2021

Changing Execution Priority on Demand

Recently, a friend asked me if it was possible to change the execution priority for some tasks on the fly. The issue was that when a user on a terminal server runs a report in Stonefield Query, which can be computing intensive as it retrieves and massages the data required for the report, other users may experience slower response. I did some research and it turned out to be easy to do, thanks to Rick Strahl's wwDotNetBridge.

The following code changes the priority for the running application to BelowNormal (see the documentation for the System.Diagnostics.ProcessPriorityClass enum for the different priority levels):

do wwDotNetBridge
loBridge = GetwwDotNetBridge()
loProcess = loBridge.InvokeStaticMethod('System.Diagnostics.Process', 'GetCurrentProcess')
loProcess.PriorityClass = loBridge.GetEnumValue('System.Diagnostics.ProcessPriorityClass.BelowNormal')

(This assumes you have wwDotNetBridge.prg included in your project and wwDotNetBridge.dll and ClrHost.dll in the current folder or VFP path.)

Use this code just before some process you want to run at a lower priority. Use similar code but a different value, such as Normal, to set the priority back again after the process is done.

As I have said many times, there's almost nothing we can't do in VFP with wwDotNetBridge.