www.pudn.com > windowsrunning > frmShowWind.frm


VERSION 5.00 
Begin VB.Form frmShowWind  
   BackColor       =   &H000000FF& 
   BorderStyle     =   0  'None 
   ClientHeight    =   3195 
   ClientLeft      =   0 
   ClientTop       =   0 
   ClientWidth     =   4680 
   ControlBox      =   0   'False 
   KeyPreview      =   -1  'True 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   213 
   ScaleMode       =   3  'Pixel 
   ScaleWidth      =   312 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   3  'Windows Default 
   Begin VB.Label lblKey  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "PRESS ESCAPE TO CLOSE" 
      Height          =   195 
      Left            =   240 
      TabIndex        =   0 
      Top             =   300 
      Width           =   2055 
   End 
End 
Attribute VB_Name = "frmShowWind" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
' 
'  I have been to great troubles to learn all of the techniques in this program. 
'  I have spent many, many hours and late nights coding the many functions which I 
'  have included. As much as I resent it, Planet Source Code requires that I put 
'  the source code in the zip file. So I have placed it in here for you to view. 
'  Please use it wisely. And give me credit for all of the hard work that I have 
'  done. My biggest fear is that somebody will do an almost straight rip of this 
'  code, and take the credit for themselves. Please do not let this happening. I'm 
'  placing a lot of trust there. So please, use this program, use this code, and 
'  give me credit for it. If anybody rips all my routines, then my secret spy's 
'  (and I have a lot of them, as soon as I hire them) will tell me, and I'll get 
'  into my private jet (as soon as I buy it) and track you down over the whole 
'  world and eventually KILL YOU. You get the idea? Thanks. Read on for something 
'  a little more interesting! 
' 
' Code is Copyright Jolyon Bloomfield, February 2000 
' 
 
Private Declare Function 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) _ 
    As Long 
 
Public Sub DoStuph(ByVal hWnd As Long) 
Load Me 
Dim Enumit As Enumerator 
Set Enumit = New Enumerator 
If Enumit.IsValidWindow(hWnd) = False Then Unload Me 
 
Dim Positions As RECT 
Positions = modConst.GetWindowRects(hWnd) 
 
Left = Positions.Left * Screen.TwipsPerPixelX 
Top = Positions.Top * Screen.TwipsPerPixelY 
Width = (Positions.Right - Positions.Left) * Screen.TwipsPerPixelX 
Height = (Positions.Bottom - Positions.Top) * Screen.TwipsPerPixelY 
lblKey.Left = (ScaleWidth - lblKey.Width) / 2 
lblKey.Top = (ScaleHeight - lblKey.Height) / 2 
 
SetWindowPos Me.hWnd, -1, 0&, 0&, 0&, 0&, 3 
 
Me.Show 1 
 
End Sub 
 
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) 
Unload Me 
End Sub 
 
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) 
Unload Me 
End Sub 
 
Private Sub Form_Unload(Cancel As Integer) 
Me.Hide 
frmProperty.Show 
End Sub