Visual Basic 6 Question

kdog

New member
Joined
Jan 15, 2004
Messages
1
Location
Virginia
> Thank you in advance.
>
> I need help finishing this code.
>
> In a nutshell, the code is suppose to open the form, open a file from the
> local harddrive and display it using a textbox.
>
> Now I would like the text inside the textbox to scroll completely. They
way
> it works now is, it scrolls the whole textbox up. I need just the text
> inside the textbox to scroll.
>
> Can anyone help me?
>
> Heres the code
>
>
>
****************************************************************************
> ****************
>
> Private Sub Timer6_Timer()
> Me.Caption = Mid(Me.Caption, 1 + 1, Val(Len(Me.Caption) - 1)) &
> Mid(Me.Caption, 1, 1)
> Unload Me
> End Sub
>
>
> Private Sub Form_Activate()
>
> Timer1.Enabled = True
> End Sub
>
>
> Private Sub Form_Load()
>
> Timer1.Interval = 35
> VScroll1.Max = Picture1.Height
> VScroll1.Min = 0 - Text1.Height
> VScroll1.Value = VScroll1.Max
> Open "C:\kevin.txt " For Input As #1 Open the file"
> Text1.Text = Input(LOF(1), #1) Read the file
> Close #1
> End Sub
>
>
>
> Private Sub Timer1_Timer()
>
>
> If VScroll1.Value >= VScroll1.Min + 20 Then
> VScroll1.Value = VScroll1.Value - 35
> Else
> VScroll1.Value = VScroll1.Max
>
> DoEvents
> End If
>
> Text1.Top = VScroll1.Value
> Text1.Visible = True
>
> DoEvents
> End Sub
>
>
>
> Private Sub Timer3_Timer()
> This will invert the caption highlight
> FlashWindow Me.hwnd, True
> End Sub
>
> Private Sub Timer4_Timer()
> If Label1.Visible = True Then
> Label1.Visible = False
> Else
> Label1.Visible = True
> End If
> End Sub
>
>
> Private Sub Timer5_Timer()
> Timer5.Interval = 1
> End Sub
>
>
****************************************************************************
> **
>
> Module1
> ********
> Option Explicit
>
> Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, _
> ByVal bInvert As Long) As Long
>
>
> Make form always stay on top
> Put this in a module......
> Private Declare Sub SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal
> hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As
Long,
> ByVal cy As Long, ByVal wFlags As Long)
>
>
****************************************************************************
> ****************
> Module2
> ********
>
> Make form always stay on top
> Put this in a module......
> Private Declare Sub SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal
> hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As
Long,
> ByVal cy As Long, ByVal wFlags As Long)
>
> Sub OnTOp(frm As Form)
> SetWindowPos Form1.hwnd, -1, 0, 0, 0, 0, 3
> End Sub
 

Attachments

Back
Top