Solved

URGENT: TextBox Query

Posted on 2006-11-25
5
141 Views
Last Modified: 2010-08-05
the following API call tells me if I have more than one line of text in a textbox

If SendMessage(txtForm.hwnd, EM_GETLINECOUNT, 0&, 0&) > 1 Then

How can I tell if the text goes beond the right border, in the case of a single line textbox ?

MTIA

Darrin
0
Comment
Question by:dwe0608
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
Ark earned 500 total points
ID: 18013364
If SendMessage(txtForm.hwnd, EM_POSFROMCHAR, Len(txtForm.Text) - 1, ByVal 0&) * Screen.TwipsPerPixelX > txtFrom.Width Then
0
 
LVL 27

Expert Comment

by:Ark
ID: 18013365
PS
Const EM_POSFROMCHAR = &HD6
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

809 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