Solved

I rally need A simple Arabic notepad .

Posted on 1997-06-14
8
238 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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now