VERSION 5.00
Begin VB.Form Form6 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Visor de texto"
   ClientHeight    =   4560
   ClientLeft      =   45
   ClientTop       =   405
   ClientWidth     =   7080
   DrawStyle       =   1  'Dash
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Form6.frx":0000
   LinkTopic       =   "Form6"
   MaxButton       =   0   'False
   ScaleHeight     =   4560
   ScaleWidth      =   7080
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame3 
      BorderStyle     =   0  'None
      Height          =   4695
      Left            =   7320
      TabIndex        =   12
      Top             =   0
      Width           =   7095
      Begin VB.PictureBox Picture4 
         BorderStyle     =   0  'None
         Height          =   495
         Left            =   2640
         ScaleHeight     =   495
         ScaleWidth      =   1695
         TabIndex        =   19
         Top             =   3960
         Width           =   1695
         Begin VB.CommandButton Command5 
            Caption         =   "Detener"
            Height          =   495
            Left            =   0
            TabIndex        =   20
            Top             =   0
            Width           =   1695
         End
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         Caption         =   "Espere..."
         Height          =   255
         Left            =   720
         TabIndex        =   13
         Top             =   2280
         Width           =   5415
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Tamaño"
      Height          =   855
      Left            =   5760
      TabIndex        =   5
      Top             =   3720
      Width           =   1335
      Begin VB.PictureBox Picture3 
         BorderStyle     =   0  'None
         Height          =   495
         Left            =   120
         ScaleHeight     =   495
         ScaleWidth      =   1095
         TabIndex        =   9
         Top             =   240
         Width           =   1095
         Begin LibreAVC.IconoCtrl IconoCtrl3 
            Height          =   240
            Left            =   120
            TabIndex        =   16
            Top             =   120
            Width           =   240
            _ExtentX        =   423
            _ExtentY        =   423
            Picture         =   "Form6.frx":058A
         End
         Begin LibreAVC.IconoCtrl IconoCtrl2 
            Height          =   240
            Left            =   720
            TabIndex        =   15
            Top             =   120
            Width           =   240
            _ExtentX        =   423
            _ExtentY        =   423
            Picture         =   "Form6.frx":08DC
         End
         Begin LibreAVC.IconoCtrl IconoCtrl1 
            Height          =   255
            Left            =   720
            TabIndex        =   14
            Top             =   0
            Width           =   255
            _ExtentX        =   0
            _ExtentY        =   0
         End
         Begin VB.CommandButton Command4 
            Height          =   495
            Left            =   0
            TabIndex        =   11
            Top             =   0
            Width           =   495
         End
         Begin VB.CommandButton Command3 
            Height          =   495
            Left            =   600
            TabIndex        =   10
            Top             =   0
            Width           =   495
         End
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Buscar"
      Height          =   855
      Left            =   0
      TabIndex        =   1
      Top             =   3720
      Width           =   5775
      Begin VB.PictureBox Picture1 
         BorderStyle     =   0  'None
         Height          =   375
         Left            =   3600
         ScaleHeight     =   375
         ScaleWidth      =   2055
         TabIndex        =   3
         Top             =   360
         Width           =   2055
         Begin VB.CheckBox Check1 
            Caption         =   "Coincidir mayúsculas"
            Height          =   255
            Left            =   0
            TabIndex        =   4
            Top             =   0
            Width           =   2055
         End
      End
      Begin VB.TextBox Text2 
         Height          =   495
         Left            =   120
         TabIndex        =   2
         Top             =   240
         Width           =   2295
      End
      Begin VB.PictureBox Picture2 
         BorderStyle     =   0  'None
         Height          =   495
         Left            =   2520
         ScaleHeight     =   495
         ScaleWidth      =   975
         TabIndex        =   6
         Top             =   240
         Width           =   975
         Begin LibreAVC.IconoCtrl IconoCtrl5 
            Height          =   240
            Left            =   120
            TabIndex        =   18
            Top             =   120
            Width           =   240
            _ExtentX        =   423
            _ExtentY        =   423
            Picture         =   "Form6.frx":0C2E
         End
         Begin LibreAVC.IconoCtrl IconoCtrl4 
            Height          =   240
            Left            =   600
            TabIndex        =   17
            Top             =   120
            Width           =   240
            _ExtentX        =   423
            _ExtentY        =   423
            Picture         =   "Form6.frx":0F80
         End
         Begin VB.CommandButton Command1 
            Height          =   495
            Left            =   480
            TabIndex        =   7
            Top             =   0
            Width           =   495
         End
         Begin VB.CommandButton Command2 
            Caption         =   "<"
            Height          =   495
            Left            =   0
            TabIndex        =   8
            Top             =   0
            Width           =   495
         End
      End
   End
   Begin VB.TextBox Text1 
      Height          =   3615
      Left            =   0
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      Top             =   0
      Width           =   7095
   End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim PosicionPuntero As Long
Private Const EM_SETSEL = &HB1

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal Msg As Long, wParam As Any, lParam As Any) As Long

Private Sub Command1_Click()
Dim Posicion As Long, Id As Long, metodo As VbCompareMethod
If Text2.Text = "" Or Text1.Text = "" Then Exit Sub
If Check1.Value = 1 Then metodo = vbBinaryCompare Else metodo = vbTextCompare
Posicion = InStr(PosicionPuntero + 1, Text1.Text, Text2.Text, metodo)
Text1.SetFocus
If Posicion > 0 Then
SendMessage Text1.hWnd, EM_SETSEL, ByVal Posicion - 1, ByVal Posicion + Len(Text2.Text) - 1
SendKeys "{LEFT}", True
SendMessage Text1.hWnd, EM_SETSEL, ByVal Posicion - 1, ByVal Posicion + Len(Text2.Text) - 1
PosicionPuntero = Posicion
Else
Beep
End If
End Sub

Private Sub Command2_Click()
Dim Posicion As Long, Id As Long, metodo As VbCompareMethod
If Text2.Text = "" Then Exit Sub
If Check1.Value = 1 Then metodo = vbBinaryCompare Else metodo = vbTextCompare
Posicion = InStrRev(Text1.Text, Text2.Text, PosicionPuntero - 1, metodo)
Text1.SetFocus
If Posicion > 0 Then
SendMessage Text1.hWnd, EM_SETSEL, ByVal Posicion - 1, ByVal Posicion + Len(Text2.Text) - 1
SendKeys "{LEFT}", True
SendMessage Text1.hWnd, EM_SETSEL, ByVal Posicion - 1, ByVal Posicion + Len(Text2.Text) - 1
PosicionPuntero = Posicion
Else
Beep
End If
End Sub

Private Sub Command3_Click()
Text1.FontSize = Text1.FontSize + 1
End Sub

Private Sub Command4_Click()
Text1.FontSize = Text1.FontSize - 1
End Sub

Private Sub Command5_Click()
Call CaptureConsole.StopProcess
End Sub

Private Sub Form_Load()
Call Lang.Form6Captions
Frame3.Left = 0
PosicionPuntero = 0
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If Frame3.Visible = True Then
    If IntDocView.DesbloquearCierre = 1 Then Call CaptureConsole.StopProcess Else Cancel = 1
End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set Form6 = Nothing
End Sub

Private Sub Text1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
PosicionPuntero = Text1.SelStart
End Sub
