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 / articles / vbbultn / source / coop2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-04-06  |  3.5 KB  |  121 lines

  1. VERSION 2.00
  2. Begin Form Coop2 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Coop2"
  6.    ClientHeight    =   1650
  7.    ClientLeft      =   1875
  8.    ClientTop       =   4320
  9.    ClientWidth     =   4065
  10.    Height          =   2055
  11.    Left            =   1815
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   1650
  14.    ScaleWidth      =   4065
  15.    Top             =   3975
  16.    Width           =   4185
  17.    Begin ccSubClass SubClass1 
  18.       Left            =   3450
  19.       Messages        =   COOP2.FRX:0000
  20.       Top             =   480
  21.    End
  22.    Begin CommandButton ExitBut 
  23.       Caption         =   "Exit"
  24.       Height          =   525
  25.       Left            =   2700
  26.       TabIndex        =   8
  27.       Top             =   990
  28.       Width           =   1245
  29.    End
  30.    Begin Label TotalLab 
  31.       Height          =   255
  32.       Left            =   1170
  33.       TabIndex        =   7
  34.       Top             =   1260
  35.       Width           =   1155
  36.    End
  37.    Begin Label AmountLab 
  38.       Height          =   255
  39.       Left            =   1170
  40.       TabIndex        =   6
  41.       Top             =   900
  42.       Width           =   1155
  43.    End
  44.    Begin Label CountLab 
  45.       Height          =   255
  46.       Left            =   1170
  47.       TabIndex        =   5
  48.       Top             =   540
  49.       Width           =   1155
  50.    End
  51.    Begin Label CompanyLab 
  52.       Height          =   255
  53.       Left            =   1170
  54.       TabIndex        =   4
  55.       Top             =   180
  56.       Width           =   2745
  57.    End
  58.    Begin Label Label1 
  59.       BackColor       =   &H00C0C0C0&
  60.       Caption         =   "Total"
  61.       Height          =   255
  62.       Index           =   3
  63.       Left            =   150
  64.       TabIndex        =   3
  65.       Top             =   1260
  66.       Width           =   915
  67.    End
  68.    Begin Label Label1 
  69.       BackColor       =   &H00C0C0C0&
  70.       Caption         =   "Amount"
  71.       Height          =   255
  72.       Index           =   2
  73.       Left            =   150
  74.       TabIndex        =   2
  75.       Top             =   900
  76.       Width           =   915
  77.    End
  78.    Begin Label Label1 
  79.       BackColor       =   &H00C0C0C0&
  80.       Caption         =   "Count"
  81.       Height          =   255
  82.       Index           =   1
  83.       Left            =   150
  84.       TabIndex        =   1
  85.       Top             =   540
  86.       Width           =   915
  87.    End
  88.    Begin Label Label1 
  89.       BackColor       =   &H00C0C0C0&
  90.       Caption         =   "Company"
  91.       Height          =   255
  92.       Index           =   0
  93.       Left            =   150
  94.       TabIndex        =   0
  95.       Top             =   180
  96.       Width           =   915
  97.    End
  98. Option Explicit
  99. Sub ExitBut_Click ()
  100.     Unload Me
  101. End Sub
  102. Sub Form_Load ()
  103.     SubClass1.HwndParam = hWnd
  104.     SubClass1.RegMessage1 = COOP_MESSAGE
  105. End Sub
  106. Sub SubClass1_WndMessage (wnd As Integer, msg As Integer, wp As Integer, lp As Long, retval As Long, nodef As Integer)
  107. Dim cs As CoopStructure
  108. Dim lpcs As Long
  109.     ' Get the address of this local CoopStructure
  110.     ' and copy the contents of the lp address to
  111.     ' this local CoopStructure
  112.     lpcs = dwGetAddressForObject(cs)
  113.     dwCopyDataBynum lp, lpcs, Len(cs)
  114.     ' Place the contents of from the CoopStructure into
  115.     ' the Labels on this form.
  116.     CompanyLab.Caption = cs.CompanyName
  117.     CountLab.Caption = cs.Count
  118.     AmountLab.Caption = Format$(cs.Amount, "Currency")
  119.     TotalLab.Caption = Format$(cs.Total, "Standard")
  120. End Sub
  121.