home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / desaware / spyworks / coop2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-03-24  |  4.5 KB  |  152 lines

  1. VERSION 4.00
  2. Begin VB.Form Coop2 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Coop2"
  5.    ClientHeight    =   2085
  6.    ClientLeft      =   1875
  7.    ClientTop       =   4320
  8.    ClientWidth     =   4065
  9.    BeginProperty Font 
  10.       name            =   "MS Sans Serif"
  11.       charset         =   0
  12.       weight          =   700
  13.       size            =   8.25
  14.       underline       =   0   'False
  15.       italic          =   0   'False
  16.       strikethrough   =   0   'False
  17.    EndProperty
  18.    ForeColor       =   &H80000008&
  19.    Height          =   2490
  20.    Left            =   1815
  21.    LinkTopic       =   "Form1"
  22.    ScaleHeight     =   2085
  23.    ScaleWidth      =   4065
  24.    Top             =   3975
  25.    Width           =   4185
  26.    Begin VB.CommandButton ExitBut 
  27.       Caption         =   "Exit"
  28.       Height          =   525
  29.       Left            =   2700
  30.       TabIndex        =   8
  31.       Top             =   990
  32.       Width           =   1245
  33.    End
  34.    Begin DwsbcLibDemo.SubClass SubClass1 
  35.       Left            =   3450
  36.       Top             =   480
  37.       _Version        =   262144
  38.       _ExtentX        =   847
  39.       _ExtentY        =   847
  40.       _StockProps     =   0
  41.       CtlParam        =   ""
  42.       Persist         =   0
  43.       RegMessage1     =   ""
  44.       RegMessage2     =   ""
  45.       RegMessage3     =   ""
  46.       RegMessage4     =   ""
  47.       RegMessage5     =   ""
  48.       Type            =   0
  49.       Messages        =   "COOP2.frx":0000
  50.    End
  51.    Begin VB.Label Label2 
  52.       Height          =   435
  53.       Left            =   120
  54.       TabIndex        =   9
  55.       Top             =   1590
  56.       Width           =   3825
  57.    End
  58.    Begin VB.Label TotalLab 
  59.       Height          =   255
  60.       Left            =   1170
  61.       TabIndex        =   7
  62.       Top             =   1260
  63.       Width           =   1155
  64.    End
  65.    Begin VB.Label AmountLab 
  66.       Height          =   255
  67.       Left            =   1170
  68.       TabIndex        =   6
  69.       Top             =   900
  70.       Width           =   1155
  71.    End
  72.    Begin VB.Label CountLab 
  73.       Height          =   255
  74.       Left            =   1170
  75.       TabIndex        =   5
  76.       Top             =   540
  77.       Width           =   1155
  78.    End
  79.    Begin VB.Label CompanyLab 
  80.       Height          =   255
  81.       Left            =   1170
  82.       TabIndex        =   4
  83.       Top             =   180
  84.       Width           =   2745
  85.    End
  86.    Begin VB.Label Label1 
  87.       Caption         =   "Total"
  88.       Height          =   255
  89.       Index           =   3
  90.       Left            =   150
  91.       TabIndex        =   3
  92.       Top             =   1260
  93.       Width           =   915
  94.    End
  95.    Begin VB.Label Label1 
  96.       Caption         =   "Amount"
  97.       Height          =   255
  98.       Index           =   2
  99.       Left            =   150
  100.       TabIndex        =   2
  101.       Top             =   900
  102.       Width           =   915
  103.    End
  104.    Begin VB.Label Label1 
  105.       Caption         =   "Count"
  106.       Height          =   255
  107.       Index           =   1
  108.       Left            =   150
  109.       TabIndex        =   1
  110.       Top             =   540
  111.       Width           =   915
  112.    End
  113.    Begin VB.Label Label1 
  114.       Caption         =   "Company"
  115.       Height          =   255
  116.       Index           =   0
  117.       Left            =   150
  118.       TabIndex        =   0
  119.       Top             =   180
  120.       Width           =   915
  121.    End
  122. Attribute VB_Name = "Coop2"
  123. Attribute VB_Creatable = False
  124. Attribute VB_Exposed = False
  125. Option Explicit
  126. Private Sub ExitBut_Click()
  127.     Unload Me
  128. End Sub
  129. Private Sub Form_Load()
  130.     Me.Caption = Me.Caption & " hWnd is " & Hex$(Me.hwnd)
  131.     SubClass1.HwndParam = Me.hwnd
  132.     SubClass1.RegMessage1 = COOP_MESSAGE
  133. End Sub
  134. Private Sub SubClass1_WndMessage(wnd As Long, msg As Long, wp As Long, lp As Long, retval As Long, nodef As Integer)
  135. Dim cs As CoopStructure
  136. Dim lpcs As Long, lres As Long
  137.     ' Get the address of this local CoopStructure
  138.     ' and copy the contents of the lp address to
  139.     ' this local CoopStructure
  140.     lpcs = dwGetAddressForObject(cs)
  141.     lres = dwXCopyDataBynumFrom(lpcs, lp, Len(cs), wp)
  142.     ' Place the contents of from the CoopStructure into
  143.     ' the Labels on this form.
  144.     CompanyLab.Caption = StrConv(cs.CompanyName, vbUnicode)
  145.     CountLab.Caption = cs.count
  146.     AmountLab.Caption = cs.Amount
  147.     TotalLab.Caption = cs.Total
  148.     Label2.Caption = Hex$(lres)
  149.     retval = &H100000FF 'return a value
  150.     nodef = True
  151. End Sub
  152.