VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3135
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3135
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Const SW_MINIMIZE As Long = 6

Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long

Private Sub Form_Load()
    Dim AppPath As String, Text As String
    Dim hWnd As Long
    AppPath = App.Path & IIf(Right(App.Path, 1) = "\", "", "\")
    Open AppPath & "title.txt" For Input As #1
    Line Input #1, Text
    Close #1
    Text = Trim(Text)
    If Len(Text) > 0 Then
        hWnd = FindWindow(vbNullString, Text)
        If hWnd <> 0 Then
            ShowWindow hWnd, SW_MINIMIZE
        Else
            MsgBox "The Target not found!"
        End If
    End If
    End
End Sub
