Solved

I rally need A simple Arabic notepad .

Posted on 1997-06-14
8
243 Views
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,,,?
0
Comment
Question by:ahmedzz
  • 4
  • 2
  • 2
8 Comments
 
LVL 5

Expert Comment

by:y96andha
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

0
 

Author Comment

by:ahmedzz
ID: 1427262
Edited text of question
0
 
LVL 5

Expert Comment

by:y96andha
ID: 1427263
OK, you need an arabic version for my method to work.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Accepted Solution

by:
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...
0
 

Author Comment

by:ahmedzz
ID: 1427265
Edited text of question
0
 

Author Comment

by:ahmedzz
ID: 1427266
Edited text of question
0
 

Author Comment

by:ahmedzz
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.
0
 
LVL 7

Expert Comment

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 61
MS Access Search and Replace Using VBA 6 91
MS SQL Update query with connected table data 3 58
Problem to line 23 72
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

679 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