Frequently Asked Questions · Question 1: How can I develop an Arabic application using Visual Basic 6.0? · Answer First, you need to install the Arabic language pack for Windows XP or Windows 2000, to be able to use the RightToLeft property. On Windows 2000: "Regional Options" in the "General" tab, add Arabic to the "Language setting for the system" On Windows XP: "Regional and Language Options" go to the "Advanced" tab and change the "Language for non Unicode programs" to an Arabic language. PS. This will not affect the user interface language. Visual Basic is used to develop Arabic applications and you may find more information at:
Arabic Application Development Using Microsoft Visual Basic 6.0 · Question 2: Is it possible to transfer a Windows application to a Web application, using Visual Studio .NET? · Answer There is no wizard that can do this but the good news is that you can still host your Windows Forms application on a web site and give your users the URL that points to your application and they can run it using this URL. Keep in mind they need the .NET framework to do so. · Question 3: I'm using Visual C++ 6.0. I need to store data as Unicode and access it using Unicode instead of ANSI to make the application independent of the system locale. · Answer You need to build your project as Unicode. To take advantage of the MFC and C run-time support for Unicode, you need to: · Define _UNICODE. At Project settings\C/C++\Preprocessor definitions, define the symbol _UNICODE. · Specify entry point. In the Output category of the Link tab in the Project Settings dialog box, set the Entry Point Symbol to wWinMainCRTStartup. You will need to add some Unicode libraries and DLLs, you find them on your Visual Studio CDs or the MSDN. You need to make sure that your code is Unicode aware. · Question 4: I'm writing an bilingual application (Arabic/English) and was wondering how I can get an Arabic version of the common dialogs such as print, file open etc. · Answer First of all, the common dialogs are resources in the comdlg32.dll, and the version that ships with Arabic localized Windows 2000 and Windows XP contains English and two versions of Arabic (one is mirrored (right to left layout) and the other is not) resources, of course Windows 2000 and Windows XP multilingual version contains the same as the Arabic localized version. This means the common dialog that ships with the English Windows 2000 and Windows XP has the English resources only, which means there is no way for you to display Arabic common dialogs on such platforms. With this have been said, the only platforms that you can achieve the functionality you are looking for are Windows 2000 and Windows XP Arabic localized edition and Multilingual. Now, how it works on these platforms? Common dialog loads the appropriate resource language for your application, what this means? It means if your user interface is English it loads the English common dialog for you, and if it is Arabic user interface it loads one of the two Arabic resources for you. How common dialog knows that your Application is English or Arabic? The common dialog examines the owner window's extended styles as shown below,
So you can control the common dialogs language by setting the appropriate window style to your common dialog's owner window prior to loading the common dialog. · Question 5: Is there a way to convert from one codepage to another using Windows APIs? · Answer Windows does not have a single API that allows you to convert from CP (code page) to another CP but it has one API that allows you to convert from a given CP to Unicode and it has another one to convert from Unicode to given CP. These two APIs are MultiByteToWideChar and WideCharToMultiByte. The very first parameter for these two APIs is the coed page that you are converting from or converting to. So if you want to convert a string from CP1 to CP2 all what you need to do is //First convert the CP1 string to Unicode string MultiByteToWideChar(CP1,.); //Now your string is Unicode convert it to CP2 string WideCharToMultiByte(CP2,.); · Question 6:I am trying to set the RightToLeft property in design time to true but am unable to do so. Do I need to design my software on a BI-DIRECTIONAL platform? Or do I need to set something special in Windows 2000? · Answer First, you need to install the Arabic language pack for Windows XP or Windows 2000, to be able to use the RightToLeft property. On Windows 2000: "Regional Options" in the "General" tab, add Arabic to the "Language setting for the system" On Windows XP: "Regional and Language Options" go to the "Advanced" tab and change the "Language for non Unicode programs" to an Arabic language. PS. This will not affect the user interface language. · Question 7: I opened my Visual Basic 6.0, and by default the RightToLeft property is set to false. I have tried to set it as true, but the program doesn't accept it. It returns the property back to false again. · Answer
You need to make sure you
installed Arabic properly. · Question 8:I am facing small problem regarding the screen flipping in Visual Basic 6.0 for the Arabic conversion of my application. Some of the controls are not laid out from right-to-left properly, even when I specify RightToLeft = True. Example Treeview and Toolbar. Is there any work around? · Answer The RightToLeft property has limited effect over some controls. Examples Form, Treeview, Listview, Toolbar, Progressbar and Statusbar. In order to correctly achieve the RightToLeft look we need to adopt the SetWindowLong technique. The following is a code listing for its implementation. Create a module and declare the following APIs
At the form load add the mirroring effect as follows
|