Solved

URGENT: TextBox Query

Posted on 2006-11-25
5
139 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
Comment Utility
If SendMessage(txtForm.hwnd, EM_POSFROMCHAR, Len(txtForm.Text) - 1, ByVal 0&) * Screen.TwipsPerPixelX > txtFrom.Width Then
0
 
LVL 27

Expert Comment

by:Ark
Comment Utility
PS
Const EM_POSFROMCHAR = &HD6
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VB6 convert MSHFlexgrid1 cells 7 51
Window placement 17 64
Vb.net 2008 2 49
VBA/SQL - Connect to SQL server and pull data 4 65
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

763 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

9 Experts available now in Live!

Get 1:1 Help Now