Solved

I rally need A simple Arabic notepad .

Posted on 1997-06-14
8
240 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

770 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