473,698 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to know when you are on next line when Multiline is switched on?.

I am trying to find out when i reach the next line when multiline is
switched on and i DON'T PRESS ENTER TO GO TO THE NEXT LINE(lines
method is there for that purpose). Is there any other method i can use
so that when i automatically type on the next line i can know. I tried
to compare the Textlength with the width function but unfortunately
the width is calculated in Pixels and textlength is calculated in just
number of characters. Can anybody help
Nov 15 '05 #1
1 1555
100
Hi Rocketman,
Do you use TextBox or RichTextBox?
If you use RichTextBox you have method GetLineFromChar Index
That method return the index of the physical line (the line on the screen
not the line on the text) of the character, which index is passed as a
parameter.
I guess it might help you somehow to solve your problem.

HTH
B\rgds
100

"Rocketman" <m_*******@yaho o.com> wrote in message
news:e9******** *************** ***@posting.goo gle.com...
I am trying to find out when i reach the next line when multiline is
switched on and i DON'T PRESS ENTER TO GO TO THE NEXT LINE(lines
method is there for that purpose). Is there any other method i can use
so that when i automatically type on the next line i can know. I tried
to compare the Textlength with the width function but unfortunately
the width is calculated in Pixels and textlength is calculated in just
number of characters. Can anybody help

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5126
by: Keith Smith | last post by:
Is there an easy way to make the {Enter} key take the cursor to the next control without using a KeyDown event on each control?
7
4031
by: Joel Finkel | last post by:
Folks, I have a form that has several TextBoxes, some of which have the TextMode set to MultiLine. Each is pre-loaded with data from a database. The user is allowed to modify each entry. The problem is that only the modified data from the SingleLine TextBoxes are returned. The original data are returned for the MultiLine TextBoxes. Also, if the page is sent to the server (for validation, for instance), only the modified data for the...
1
2568
by: mosscliffe | last post by:
I have a Gridview created by dragging a table onto a web form page and I have enabled the edit key. One of my field is a multi-line 'text' field. How do I change the standard textbox created into a multiline one. Any help, pointers or examples greatly appreciated, as I have to get this working very quickly
7
4542
by: teo | last post by:
Hallo I need to extract a subtext from a text. The subtext must contain a given word. The subtext bounds are: vbCr (return) vbLf (new line) vbCrLf (return+new line)
11
6243
by: rossum | last post by:
I want to declare a const multi-line string inside a method, and I am having some problems using Environment.NewLine. I started out with: class foo { public void PrintStuff() { const string multiline = "The first line." + Environment.NewLine +
2
3659
by: BillE | last post by:
I need to create a multi-line label dynamically. Since labels aren't multi-line, I'm creating a textbox and making it look like a label with the multiline property set to true. I want to increase the height of the textbox only if there are multiple lines, and leave it at the default height if the text does not wrap after setting the Text property. I thought I could use the Lines property after setting the Text property,
7
6402
by: prakashleo | last post by:
hi to all I am using vb 6.0 I want to move to the next line in the text box after reaching text length 70 characters can any one help me
27
2831
by: pamela fluente | last post by:
Hello, for the following code, VS suggests that construct (width= height= ) is out of date and a newer one is recommended: <table><tr><td width="92" height="38" valign="middle">AnyThing</td></ tr></table> Would you please tell me the right construct (clearly must be functionally equivalent).
0
1043
by: aarbit | last post by:
I've got these 3 lines in a string: abc def ghi Then, I take that string and run it with this: If Regex.IsMatch(myString, "^def$", RegexOptions.Multiline) Then outString = "Matches"
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.