home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / vbpg32 / samples5 / ch14 / shelled1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-16  |  1.6 KB  |  51 lines

  1. VERSION 5.00
  2. Begin VB.Form frmShelled 
  3.    Caption         =   "Generic Shelled App"
  4.    ClientHeight    =   2100
  5.    ClientLeft      =   4890
  6.    ClientTop       =   1605
  7.    ClientWidth     =   3615
  8.    LinkTopic       =   "Form1"
  9.    PaletteMode     =   1  'UseZOrder
  10.    ScaleHeight     =   2100
  11.    ScaleWidth      =   3615
  12.    Begin VB.Label lblWindow 
  13.       Caption         =   "Window Handle:"
  14.       Height          =   255
  15.       Left            =   120
  16.       TabIndex        =   2
  17.       Top             =   900
  18.       Width           =   3135
  19.    End
  20.    Begin VB.Label lblProcessId 
  21.       Caption         =   "Process Id:"
  22.       Height          =   255
  23.       Left            =   120
  24.       TabIndex        =   1
  25.       Top             =   540
  26.       Width           =   3135
  27.    End
  28.    Begin VB.Label lblThreadId 
  29.       Caption         =   "Thread Id:"
  30.       Height          =   255
  31.       Left            =   120
  32.       TabIndex        =   0
  33.       Top             =   180
  34.       Width           =   3135
  35.    End
  36. Attribute VB_Name = "frmShelled"
  37. Attribute VB_GlobalNameSpace = False
  38. Attribute VB_Creatable = False
  39. Attribute VB_PredeclaredId = True
  40. Attribute VB_Exposed = False
  41. Option Explicit
  42. ' Copyright 
  43.  1997 by Desaware Inc. All Rights Reserved
  44. Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
  45. Private Declare Function GetCurrentThreadId Lib "kernel32" () As Long
  46. Private Sub Form_Load()
  47.     lblThreadId.Caption = lblThreadId.Caption & "  " & GetCurrentThreadId()
  48.     lblProcessId.Caption = lblProcessId.Caption & "  " & GetCurrentProcessId()
  49.     lblWindow.Caption = lblWindow.Caption & "  " & hWnd
  50. End Sub
  51.