VB 6.0 - hi
Asked By Anish V
01-Feb-10 12:29 AM
Dear All,
I need a help in VB6.0. I want to set the cursor after text in the textbox. Does anyone has any idea?
Thanks in advance
Anish
Sakshi a replied to Anish V
this will do that,
Text1.SelStart = len(text1.text)
Thanks and Regards,
http://www.CodeCollege.NET
http://www.InterviewsGuru.info
Santhosh N replied to Anish V
You can make use of SelStart property of the textbox and assign the length of the text length to that, so that cursor would be placed at the end..
Text1.SelStart = Len(Text1.Text)
paresh tank replied to Anish V
Hi Anish,
It is possible to set cursor at any position dynamically at run time using following code.
private Sub Text1_GotFocus()
Text1.SelStart = number
End Sub
in place of number you have to specify position in text box.
It will work for you..
Ok….
Anish V replied to paresh tank
Hello Paresh
,It Really worked. Thanks for your help.
Regards
Anish
Anish V replied to Sakshi a
Hi Sakshi,
Thanks for your reply. It works.
Regards
Anish
Anish V replied to Santhosh N
Hi egg egg,
Thanks for your reply. It works.
Regards
Anish
Santhosh N replied to Anish V
Sakshi a replied to Anish V
welcome.
Thanks and Regards,
http://www.CodeCollege.NET
http://www.InterviewsGuru.info
Newbie .NET Framework Used VB 6 Trying out VB.Net 2008 How is the following code made easier in .Net? VB 6 sample. '10 textboxes on a form. Private Sub txtTest_GotFocus(Index as Integer) txtTest(Index).SelStart = 0 txtTest(Index).SelLength = Len(txtTest(Index).Text) Exit Sub End Sub With VB.Net I am required to enter this in 10 seperate text box fields. How is this easier??? Next Question. How do you retrireve the ItemData from a combobox in VB.Net when it is not there?? What is the limit of controls on a VB.Net form, since there is not longer the Index of a control?? Any tips might the evaluation of .Net. - - Thanks in advance Have a Great Day bob robert11@mountaincable.net VB.NET Discussions ComboBox1.Items.AddRange (1) TextBox3.GotFocus (1) TextBox4.GotFocus (1) TextBox1.GotFocus (1
Highlighted in RichTextBoX C++ / VB I noted that RichTextBox has not ForeColor Property and when text is Selected, color highlighted is different as other controls (Black wtih White characters) Is there some property to set colors in rtb's ? Beforehand, thank you very much - - Luis Garcia IT Consultant VB Controls Discussions RichTextBoX (1) SELxx (1) ForeColor (1) SelLength (1) SelColor (1) SelStart (1) TextBox (1) Luis (1) RTB has a set of SELxx properties, where you can set different properties of selected text. Among them there is SelColor property, which you can use to retrieve or set the color of the currently selected text Use SelStart and SelLength to change selection if necessary. Remember that RTB, unlike regular TextBox, may have different settings for different parts of the content. This is why there is no ForeColor property. Though I don't think there is a way to change the highlighted colors. Dmitriy
Compiler error in idl file C++ / VB Hello! I have a com dll with a idl file. You can see the idl 29436E27-1873-4E12-80CB-2EC7E3113684), helpstring("IParamItem Interface"), pointer_default(unique) ] interface IParamItem : IUnknown { [propget, helpstring("property mOrigParam")] HRESULT mOrigParam([out, retval] BSTR *pVal); [propput, helpstring("property mOrigParam")] HRESULT mOrigParam([in] BSTR pVal); [propget, helpstring("property mStartPos")] HRESULT mStartPos([out, retval] long *pVal); [propput, helpstring("property mStartPos")] HRESULT mStartPos([in] long pVal); [propget, helpstring property mStartValue")] HRESULT mStartValue([out, retval] long *pVal); [propput, helpstring("property mStartValue")] HRESULT mStartValue([in] long pVal); [propget, helpstring("property mEndValue")] HRESULT mEndValue([out, retval] long *pVal); [propput, helpstring("property mEndValue")] HRESULT mEndValue([in] long
How to pass an object from C++ C++ / VB Hello! We have a C# asp.net web application that is using a COM dll 29436E27-1873-4E12-80CB-2EC7E3113684), helpstring("IParamItem Interface"), pointer_default(unique) ] interface IParamItem : IUnknown { [propget, helpstring("property mOrigParam")] HRESULT mOrigParam([out, retval] BSTR *pVal); [propput, helpstring("property mOrigParam")] HRESULT mOrigParam([in] BSTR pVal); [propget, helpstring("property mStartPos")] HRESULT mStartPos([out, retval] long *pVal); [propput, helpstring("property mStartPos")] HRESULT mStartPos([in] long pVal); [propget, helpstring property mStartValue")] HRESULT mStartValue([out, retval] long *pVal); [propput, helpstring("property mStartValue")] HRESULT mStartValue([in] long pVal); [propget, helpstring("property mEndValue")] HRESULT mEndValue([out, retval] long *pVal); [propput, helpstring("property mEndValue")] HRESULT mEndValue([in] long
UpDown control vs, rolling one's own with VScrollBar C++ / VB In order to use the UpDown Control, I have to make sure that the users may be better to roll on;es own conterol using a VScrollBar and TextBox. Opinions? VB Controls Discussions BnByKAJqKKKBhWPpA8Va3pqahaQ6MsEjuqiaaVW (1) HOg3TvOJLfW4NgSd0Q7tTQHcgIV (1) WAARCAAwADMDASIA (1) Iuzgl2IGSQOgHb1HPBFUo (1) JYy20MeMnHbjGWzoaF (1) GRUjNaiiikMKm8I2X2 (1) Extender t. Use an updown instead. Here's a class-based replacement for the OCX: http: / / vb.mvps.org / samples / UpDown - - .NET: It's About Trust! http: / / vfred.mvps.org Yep - add effects, which decide between ;) SCNR Olaf Ah, did not even notice that. Exactly what http: / / vb.mvps.org / samples / UpDown does. - - .NET: it is About Trust! http: / / vfred.mvps.org Most your point of view, why selfwritten control-behaviour (hosted in other Code- Modules than a VB-UserControl) has to be a "bad thing". A "real control" - in my thinking there are a ListBox named L with IntegralHeight = False) Option Explicit Event ValueChanged() Private mMin&, mMax& Public Property Get Max() As Long Max = mMax End Property Public Property Let Max(ByVal NewValue As Long) If mMax = NewValue Then Exit Property mMax = NewValue UpdateRange