Click here to Skip to main content
15,886,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Dave Kreskowiak29-Jan-09 3:17
mveDave Kreskowiak29-Jan-09 3:17 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri29-Jan-09 19:44
Anubhava Dimri29-Jan-09 19:44 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Dave Kreskowiak30-Jan-09 1:55
mveDave Kreskowiak30-Jan-09 1:55 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri29-Jan-09 22:18
Anubhava Dimri29-Jan-09 22:18 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Ashutosh Phoujdar29-Jan-09 23:16
Ashutosh Phoujdar29-Jan-09 23:16 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri30-Jan-09 0:59
Anubhava Dimri30-Jan-09 0:59 
QuestionHow to copy conditional rows and paste them in new worksheet. Pin
jptxrose28-Jan-09 10:56
jptxrose28-Jan-09 10:56 
QuestionAutoscroll in textbox Pin
Kschuler28-Jan-09 5:17
Kschuler28-Jan-09 5:17 
I have a multiline textbox control on a form. When a user focuses on the textbox I want to check and see if a certain string (user's name and todays date) are in the textbox. If not, I want to automatically add the user's name and todays date to the end of the textbox and position the curor and scroll to the bottom. I am having trouble with the scrolling/cursor positioning part. My code will scroll down, but the cursor ends up moving to where ever the user clicked in the textbox. Does anyone know of a way to ignore where they clicked so as to override where the cursor goes? Is there another event that fires that I can grab? Am I missing something obvious here?

Private Sub txtInput_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtInput.GotFocus
    Dim strAutoLabel As String = gblstrUserName.Trim & " - " & Now.ToString("M/d/yy")

    'If the textbox does not contain the auto label, add it
    If Not txtInput.Text.Contains(strAutoLabel) Then
        If txtInput.Text.Trim.Length <> 0 Then txtInput.Text &= vbCrLf & vbCrLf
        txtInput.Text &= strAutoLabel & vbCrLf
        txtInput.SelectionStart = txtInput.Text.Length - 1
        txtInput.ScrollToCaret()
    End If
End Sub


I'd appreciate any help or advice you can give me.
AnswerRe: Autoscroll in textbox Pin
Mr Oizo28-Jan-09 22:47
Mr Oizo28-Jan-09 22:47 
GeneralRe: Autoscroll in textbox Pin
Kschuler29-Jan-09 4:25
Kschuler29-Jan-09 4:25 
Questioncould not find installable ISAM Pin
NaliniNagarajan28-Jan-09 2:56
NaliniNagarajan28-Jan-09 2:56 
AnswerRe: could not find installable ISAM Pin
Dave Kreskowiak29-Jan-09 3:14
mveDave Kreskowiak29-Jan-09 3:14 
QuestionProblem running remote process using WMI [modified] Pin
thecornflake28-Jan-09 2:07
thecornflake28-Jan-09 2:07 
AnswerRe: URGENT problem running remote process using WMI Pin
EliottA28-Jan-09 2:55
EliottA28-Jan-09 2:55 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 3:09
thecornflake28-Jan-09 3:09 
GeneralRe: URGENT problem running remote process using WMI Pin
EliottA28-Jan-09 3:19
EliottA28-Jan-09 3:19 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 3:21
thecornflake28-Jan-09 3:21 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 4:32
thecornflake28-Jan-09 4:32 
GeneralRe: URGENT problem running remote process using WMI Pin
Uros Calakovic28-Jan-09 5:29
Uros Calakovic28-Jan-09 5:29 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 5:50
thecornflake28-Jan-09 5:50 
Questionhow to develop print dialog box Pin
vidhish27-Jan-09 23:37
vidhish27-Jan-09 23:37 
AnswerRe: how to develop print dialog box Pin
dan!sh 28-Jan-09 0:04
professional dan!sh 28-Jan-09 0:04 
QuestionHelp Pin
yaya_star27-Jan-09 21:15
yaya_star27-Jan-09 21:15 
AnswerRe: Help Pin
Ashutosh Phoujdar27-Jan-09 21:29
Ashutosh Phoujdar27-Jan-09 21:29 
QuestionODBC Pin
Stephen Lintott27-Jan-09 21:08
Stephen Lintott27-Jan-09 21:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.