Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

I rally need A simple Arabic notepad .

Posted on 1997-06-14
8
Medium Priority
?
250 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 7

Accepted Solution

by:
tward earned 200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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 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…
Suggested Courses

824 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