Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beautify Visual FoxPro 2

Status
Not open for further replies.

Rick C. Hodgin

Programmer
Oct 15, 2021
172
US
One thing I started doing a couple years back, was to modify my startup.prg to include some code which loaded the _screen.Picture from a folder that I had. I would get the ADIR() of all the JPG or PNG images, and then randomly select one based on an algorithm using SECONDS(). The images I had in that folder were all set to my monitor's resolution, and they would provide a nice non-white backdrop for doing development.

Another thing I did was visit Programming Fonts.org. There, I was able to test out a lot of different programming fonts, and finally settled on Fantasque Sans Mono. I think it's a beautiful font, but there are lots to choose from.

Something other than Courier New and white ... spices up your dev environment a little bit. IMO, once you modify startup.prg to set your _screen.Picture to something (I have a large library of animal and fish themes, but they can be anything), you'll never want to be in the white-only camp again.

Does anybody else have anything they've done to beautify VFP?

--
Rick C. Hodgin
 
The most essential thing I do in the VFP IDE is changing the syntax color of strings to red.

Many years ago I learned from Cindy Winegarden you can set more colors with registry entries in HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualFoxPro\9.0\Options

But I never bother to change these, though I prefer the dark theme in Visual Studio and you can establish that with these colorpairs, too.

Chriss
 
Part of my dyslexia spectrum includes some other eye issues. 3D video games make me nauseous. And dark theme colors make the text all blur together. I almost can't read anything after a few seconds of looking at the dark theme. It's really something.

--
Rick C. Hodgin
 
Rick,

I have to say that I disagree with you.

For me, when I am programming, I want to focus all my attention on my code. I don't need my font to be beautiful or rmy background screen to have a frequently-changing image. I want plain black text on a white background, in a simple monospaced font like Courier New.

However, that is very much my personal opinion. Other people will have different tastes, which is perfectly fine of course. And you are right to encourage a discussion on the subjext.

One exception to my black-on-white rule is syntax highlighting in code windows. This is undoubtedly a good thing - even though we will all have different opinions on the actual colours to choose.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Rick, Mike,

it's all a matter of taste. I'm really so used to Courier New that I wouldn't look for other fonts. I don't like too condensed letters, that allows to have longer lines, but makes usual length lines too short for best readability. But as you say, it's a matter of taste. I find a a white background somewhat stressing my eyes to narrow, even in a dimmed environment, others will say so about a light color on black just causing a blur by how they shine. There are different takes on what's working best and that just points out you don't find a one theme that fits all.

I like the background picture Microsoft has before you sign in, you can get them from an Assets folder within Windows or you load a Bing Wallpaper app for such backgrounds in the Microsft store so it changes the desktop, not just the background you only see during startup or when you lock Windows.

I use command window a lot and use the _screen as output, so it's better a plain color. This works nice, because you can use CTRL+ALT+SHIFT to see the _screen, no matter how many forms are currently on it. That goes as far as having a major impact on whether I like or dislike keyboards based on of how easy you can use this shortcut.

I could clearly also use any redefinition, but it's in the finger memory.

Chriss
 
Rick, despite what I said above, I have jsut taken a look at your recommended Fantasque Sans Mono font. It does look quite attractive. I can see why you like it. But it won't replace Courier New in my affection. Maybe that's because of some secret memory of when I used an IBM Selectric typewriter.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
There are some other nice fonts too. I narrowed the choices down to about six before settling on Fantasque Sans Mono. I use it everywhere now. The author also makes a version without the looped k, but I use the looped k version.

Fantasque Sans Mono also has some nice ligatures. >= becomes a single-stack character. Same with <= and == and ->, etc. Nice visuals in programming.

I also created a font called Buggie:
It's based off the handwriting of one of the girls on my son's Robotics Team. Most distinct handwriting I've ever seen. She now uses that font for all her school assignments and notes. Buggie is her nickname.

My coworkers all have different views on fonts and images. One only likes to use one monitor, which I find amazing. He also likes a white background.

Another leaves the font Courier New, but uses fantasy Sci-Fi like the Hobbit themed backgrounds. He has some really nice ones.

Each person will move to their tastes. I definitely prefer the non-white background, but _screen.BackColor = RGB(192,192,192) will also get you there. I do make sure none of my images are too dark or too bright. And my alternate WAIT WINDOW I created (goWw) uses the blue them coloring from Visual Studio.

Lots of options. I think the non-white helps with my dyslexia. It breaks things up better for me.

--
Rick C. Hodgin
 
Rick, Mike, Chriss (all other in future too),

First of all, my opinion is that, a pure white background in a considerable brightness setting is somewhat problematic to our eyes because as we know white reflects lights in the room heavily. I usually set a bit very light gray and in an optimum brightness.

Also, specifying different colors for different sections, like Command, Reserved words, Variable, Strings etc, helps a lot in identifying typing mistake very quickly. Say, if your color for Commands is BLUE and if you type ALLTRIM as ALLTIM by mistake, it wouldn't turn BLUE, so you know!

In VS and Android Studio, I use dark theme. I have never tried to alter any color schemes in them because the existing combo is good enough.

In VFP, however, I changed to font CONSOLAS. I see that it has got the beauty of TrueType and same time it is uni-width (what is that word for that 'mono-width'? where all your characters have same width on screen). I am very much happy with this font in VFP. If it is possible to turn dark mode in VFP, I would certainly like to try it once.

Rajesh

EDIT: Having said all these, as you all mentioned already, these are all personal tastes. My BEST may not be BEST to you based on mere personal taste or any other matter.
 
Rick said:
I also created a font called Buggie:
It's based off the handwriting of one of the girls on my son's Robotics Team. Most distinct handwriting I've ever seen. She now uses that font for all her school assignments and notes. Buggie is her nickname.

Dear Rick, that's really cool... the children must have felt excited to receive such a thing from you!

Rajesh
 
uni-width (what is that word for that 'mono-width'? where all your characters have same width on screen)

Rajesh, the usual word for that in English is "mono-spaced".

(What is it in German? I've heard of "einzeilige", but I'm not sure if that is the same thing.)

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Rajesh, with the registry colors it's possible to set a dark theme in VFP, I'm positive about this, too, because when you program a lot of the day the white background can become the source of sleep problems, and using a blue filter means the color scheme changes to something that's not as beautiful anymore. So a dark theme helps with that, you could still use both depending on time of the day, i.e. a light theme in the morning and a dark theme in afternoon/evening sessions.

Not everyone is affected by this and I admit I am also respecting there was a lot of research on best color themes that finally led to white background for textual displays. And I think that's not to have the similarity to paper, that's also based on standards about light in work environments.

Earlier the standard was light text on a dark screen mainly to save the CRT screens phosphor layers or produce less x-rays. I think a lot of programmers of that time were so used to dark screens that they complained about the white background standard that arose and maybe that led to the middle grey forms typical for earlier Windows versions, but still with white controls. Early LCD also had a difficulty to need the longest time to change from white to black, response time is the technical term for that.

Actual working space norms ask for a good lighted environment and then a white background is less effected by bright environmental light than a dark background, I guess that plays a major role. Evening and even less so nightly programming sessions are not considered healthy, though they sometimes can be very productive.

Chriss
 
Chriss, that's very interesting. It never occurred to me that a light background might be causing me sleep problems, but it does sound plausible. Perhaps I should follow Rick's advice after all. But it's difficult to change something as important as your working environment when you have been using it for so many years.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
You get used to it pretty quick.

My advice: Use images without much detail. The more detail the more it looks visually cluttered IMO. Ocean scenes. Nature scenes. Etc.

Whenever I go to our build pc to make a build, it doesn't have the modified startup.prg, so I'm manually typing _screen.Picture = ... to use an image. It's almost like the white hurts my eyes now.

--
Rick C. Hodgin
 
Blue filter has become a standard feature of phones and also in Windows, look for night light settings.

Chriss
 
Here's the relevant part of the start.prg program I use:

Code:
DIMENSION laFiles[1]
ADIR(laFiles, "C:\Users\user\Pictures\slideshow\*.jpg")
lnI = INT(ROUND(RAND(INT(SECONDS())) * ALEN(laFiles, 1), 0))
TRY
    _screen.Picture = "C:\Users\user\Pictures\slideshow\" + laFiles[lnI, 1]
CATCH
    _screen.Picture = "C:\Users\user\Pictures\slideshow\favorite_image.png"
ENDTRY

IF EMPTY(_screen.Picture)
    _screen.Picture = "C:\Users\user\Pictures\slideshow\favorite_image.png"
ENDIF

_screen.FontName = "Fantasque Sans Mono"
_screen.FontSize = 12

--
Rick C. Hodgin
 
I've been thinking about this, but I have to say that I have decided not to follow Rick's lead. I'll stick to a plain white screen with the default font. But thank you, Rick, for sharing your ideas and posting your code.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
You're welcome. There are developers on our team that don't like the image backgrounds or alternate fonts. It's definitely a personal issue.

The only reason I even considered it in the first place was because some distros of Linux I use have a semi-translucent terminal window, which lets you see the background under the terminal window's content. It's only a 15% or 20% translucency, but it added enough to make it not just a solid color.

I tried manually _screen.Picture at first, and then added the startup.prg code with a host of relatively neutral images that also especially have the upper-left area relatively clear so when I do ? "text" it is in that area.

But absolutely, it's 100% a personal choice. I'll never go back, and when I'm on another computer that doesn't have my startup code, I reproduce it and download some images because it's so much less intrusive than the default white IMO.

Note also that I have dyslexia, and some other related eye issues which make my eyes see things that aren't there, or combine things in unusual ways. The white is an odd input form. And dark is worse. It's really quite interesting how it all works. :)

--
Rick C. Hodgin
 
Rick said:
which make my eyes see things that aren't there, or combine things in unusual ways. The white is an odd input form. And dark is worse.

I see, a background image helps you as it's more natural than a plain white or black screen. with I know you picked your images well, but you could also take any picture made brighter by lowering the contrast. GDIplusX could help with that.



Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top