🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #190

Re: How to find out the cursor position

#190
From: Jeffrey Renton
Date: Tue, 25 Nov 1997 12:47
56 lines
3019 bytes
Ě	SelLength Ś returns or sets the number of characters selected.
Ě	SelStart Ś returns or sets the starting point of text selected; indicates
the position of the insertion point if no text is selected.
Ě	SelText Ś returns or sets the string containing the currently selected
text; consists of a zero-length string ("") if no characters are selected.

These properties aren't available at design time.

Syntax

object.SelLength [= number]
object.SelStart [= index]
object.SelText [= value]

The SelLength, SelStart, and SelText property syntaxes have these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To
list.
number	A numeric expression specifying the number of characters selected.
For SelLength and SelStart, the valid range of settings is 0 to text length
Ś the total number of characters in the edit area of a ComboBox or TextBox
control.
index	A numeric expression specifying the starting point of the selected
text, as described in Settings.
value	A string expression containing the selected text.
Remarks

Use these properties for tasks such as setting the insertion point,
establishing an insertion range, selecting substrings in a control, or
clearing text. Used in conjunction with the Clipboard object, these
properties are useful for copy, cut, and paste operations.
When working with these properties:

Ě	Setting SelLength less than 0 causes a run-time error.
Ě	Setting SelStart greater than the text length sets the property to the
existing text length; changing SelStart changes the selection to an
insertion point and sets SelLength to 0.
Ě	Setting SelText to a new value sets SelLength to 0 and replaces the
selected text with the new string.
-- 
Hope this helps...

Jeffrey Renton
jrenton AT ees DOT enron DOT com


Manuel Hoeger <Manuel.Hoeger@t-online.de> wrote in article
<65914i$k1s$1@news01.btx.dtag.de>...
> Can you tell me how to find out the cursor position in a variable or a
> Text box on Runtime?
> I work with Visual Basic 4.0
> Thank you!!
> Manuel
> 
> 
Technical Details
Message-ID: <01bcf9a0$606b9c80$151418ac@ees-9706268>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!uw.edu.pl!news.icm.edu.pl!fu-berlin.de!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.direct.ca!Supernews60!supernews.com!nntp.flash.net!news.airnews.net!cabal11!news.sesqui.net!newsman.enron.com!news
References: <65914i$k1s$1@news01.btx.dtag.de>

Show Full Headers
Complete Article Headers
Newsgroups: microsoft.public.vb.controls,microsoft.public.vb.winapi,comp.lang.basic.visual.misc,comp.lang.basic.visual.3rdparty,pl.comp.lang.vbasic
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!uw.edu.pl!news.icm.edu.pl!fu-berlin.de!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.direct.ca!Supernews60!supernews.com!nntp.flash.net!news.airnews.net!cabal11!news.sesqui.net!newsman.enron.com!news
From: "Jeffrey Renton" <jrenton@ees.enron.com>
Subject: Re: How to find out the cursor position
X-Nntp-Posting-Host: 172.24.20.21
Message-ID: <01bcf9a0$606b9c80$151418ac@ees-9706268>
Sender: news@enron.com (news Admin)
Organization: Enron Corp.
X-Newsreader: Microsoft Internet News 4.70.1161
References: <65914i$k1s$1@news01.btx.dtag.de>
Date: Tue, 25 Nov 1997 12:47:55 GMT
Lines: 56
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit