I rally need A simple Arabic notepad .

Posted on 1997-06-14
Last Modified: 2012-06-21
Hi is there anyway that i can use VB to creat or maybe modify the English notepad (that comes with VB as a sample)
modify it to where it types from right to lift, i think there is a way to do that,I just need the simple codes that tells it to allways start from right, and whenever i type a charcter that the curser will advance to the lift of that letter instead of the normal way.
I need this as a tools to help my kids learn their languag.

I have the English version of win95 and (no bi-directional platform) , and every time I try to switch it, it wont change.
Now I think I can achieve the right to lift effect if I can trick the notepad in two ways
1-always make the text right justified .
2-whenever there is an input of any letter that the courser position would advance to the lift of that letter instead the normal (right).

By doing that, the notepad will act as if you are typing from right to lift.
And the codes for that is what I need!!!
many thanks

Ok, what about the Enter key, is there something that makes it start up a new line on the bttom,,,?
Question by:ahmedzz
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2

Expert Comment

ID: 1427261
I cannot test this, as my Windows version doesn't support right to left reading, but try this:

Add this code to the declarations section of MDINOTE.BAS:

Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Const GWL_EXSTYLE = (-20)
Public Const WS_EX_RTLREADING = &H2000

Add this code to the Form_Load event of NOTEPAD.FRM:

    Dim oldexstyle As Long
    oldexstyle = GetWindowLong(Text1.hwnd, GWL_EXSTYLE)
    SetWindowLong Text1.hwnd, GWL_EXSTYLE, oldexstyle Or WS_EX_RTLREADING


Author Comment

ID: 1427262
Edited text of question

Expert Comment

ID: 1427263
OK, you need an arabic version for my method to work.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Accepted Solution

tward earned 100 total points
ID: 1427264
If I understand your question try the following:

In the TEXTbox_keypress event just do the following:

SendKeys "{LEFT}"

This will basically give the effect of moving the cursor to the left after each character is typed in...

Anyway it worked for what I needed...

Author Comment

ID: 1427265
Edited text of question

Author Comment

ID: 1427266
Edited text of question

Author Comment

ID: 1427267
It sounds good, and it worked , but what about the enter key , is there a way to make it advance down instead of going up too.

Expert Comment

ID: 1427268
You put this out as another question and I answered it there!

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 9 hours left to enroll

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question