Create VB Multilingual Applications
Microsoft's Visual Basic (VB) Resource Editor add-on for VB 5.0 lets you create multiple string tables, which are convenient for control over multilanguage support in software. The only catch is that VB automatically selects the string table, and you cannot change it during runtime. If you want to make the application switch languages during runtime, you must use old-style indexing.
An alternative, however, is to use the API function, SetThreadLanguage. With this function, you can switch languages in four easy steps:
- In a BAS module, add the code in Listing 1.
- Use the Resource Editor to create the appropriate string tables.
- In the language event in your program, add the appropriate code. For example, for German you add
SetThreadLocale eGERMAN
- Load the labels (or whatever you need) with LoadResString. For example, for labels you use
Me.Caption = LoadResString(101)
If you follow these four steps, VB will still automatically select the language but according to your setting. Thus, you'll get the language you want.
This API function works with the compiled version of your program only. If you use this code in development environments, no changes will take effect. In addition, the code will work with only single-threaded applications in VB.
Daniel Balos
balos@iname.com
More Proof That Microsoft Is Shooting Itself in the Foot
Brian Chaney's observations in "Is Microsoft Shooting Itself in the Foot?" (Reader to Reader, August 1998) are right on target. Based on my experience, Microsoft is quickly forgetting the folks in the trenches. I received my MCSE in October 1997. As of January, I had not received my beta software. I began calling twice a week, but to no avail. Finally, in May, I received it. When I called asking for an extension on my subscription so that it would expire in May 1999, a Microsoft representative flatly rejected the idea and told me there was no one I could complain to.
Microsoft seems to be doing everything in its power to alienate its users and support base. People will continue to buy Microsoft products because they are plentiful and highly visible, but Microsoft is adding a layer of doubt in their minds about its commitment to customers and its commitment to quality.
Vincent LaPaglia
skibum@csd.net
Remove Your NT Workstation from the Browser Election, Too
In "Remove Your NT Server from the Browser Election" (Reader to Reader, May 1998), Tommy Gustafsson wrote about how to remove your test Windows NT server from browser elections to make your network run smoother. Expanding on this concept, you can also stop your NT workstations from participating in browser elections without loss of functionality. If your NT network has a Primary Domain Controller (PDC) and Backup Domain Controller (BDC), those machines always win the browser elections. Consequently, stopping NT workstations from participating will have no affect, except to significantly reduce network traffic.
To stop a PC running NT Workstation 4.0 from participating in browser elections, log on as an administrator. Go to Control Panel, Services. Highlight Computer Browser, and click Stop to disable the current browser service. To disable future browser service, click Startup, select Disable, and click OK.
To stop a PC running Windows 95 from participating in browser elections, you need to edit the Registry. Launch regedit. Change (or add) the key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Browser\Parameters. Set the value as MaintainServerList=No. As always, be careful when modifying the Registry.
Steve Hong
steveho@juno.com
Microsoft Certification Study Tips
Because of changes at work, I've signed up to take the MCSE(+Internet) exam, with Windows NT Workstation 4.0 and NT Server 4.0 as the operating system (OS). As an experienced systems administrator and a former computer science university instructor, I know that some topics are hard to learn and take exams on. Here's some advice to help you.
Tip 1. There's a lot to learn, so find the time to study. With working full time, the biggest problem for many people is finding the time to study. Fortunately, my company lets its employees dedicate 5 hours a week for studying. But that isn't enough, so I also study on my free time. Whether or not your company will let you study on company time, you need to set a study schedule. You also need to choose a suitable location for studyingpreferably a place free from phones, people, and other interruptions.
Tip 2. You can't learn everything from a book or interactive program. You need hands-on experience. If possible, get a machine that you can practice on. However, don't mess with your NT servers and workstations at work unless they are set up for experimentation. I suggest that you set up a machine at home. Two machines work best if you are using an interactive program to study. You can use one to run the study program and the other to experiment on. In addition, two machines provide a way to shift between environments, simulating an OS. If you don't have a machine at home, consider buying one. Basic removable hard disks are inexpensive. Remember that for studying, blazing speed, sound, and graphics aren't important; the functionality of the system is. If you can't afford to buy a machine, borrow one. As for software, you can get a lot of free trial software.
I hope this advice helps. And best of luck in studying for and taking your exam.
Bent Mathiesen
bm-itafd@aalbkom.dk