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 / desaware / demo32 / sw5demo / coop2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-05-23  |  7.4 KB  |  237 lines

  1. VERSION 4.00
  2. Begin VB.Form Coop2 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Coop2"
  5.    ClientHeight    =   1650
  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          =   2055
  20.    Left            =   1815
  21.    LinkTopic       =   "Form1"
  22.    ScaleHeight     =   1650
  23.    ScaleWidth      =   4065
  24.    Top             =   3975
  25.    Width           =   4185
  26.    Begin VB.CommandButton ExitBut 
  27.       Caption         =   "Exit"
  28.       BeginProperty Font 
  29.          name            =   "MS Sans Serif"
  30.          charset         =   0
  31.          weight          =   700
  32.          size            =   8.25
  33.          underline       =   0   'False
  34.          italic          =   0   'False
  35.          strikethrough   =   0   'False
  36.       EndProperty
  37.       Height          =   525
  38.       Left            =   2700
  39.       TabIndex        =   8
  40.       Top             =   990
  41.       Width           =   1245
  42.    End
  43.    Begin DwsbcLibDemo.SubClass SubClass1 
  44.       Left            =   3450
  45.       Top             =   480
  46.       _Version        =   262144
  47.       _ExtentX        =   847
  48.       _ExtentY        =   847
  49.       _StockProps     =   0
  50.       CtlParam        =   ""
  51.       Persist         =   0
  52.       RegMessage1     =   ""
  53.       RegMessage2     =   ""
  54.       RegMessage3     =   ""
  55.       RegMessage4     =   ""
  56.       RegMessage5     =   ""
  57.       Type            =   0
  58.       Messages        =   "COOP2.frx":0000
  59.    End
  60.    Begin VB.Label TotalLab 
  61.       BeginProperty Font 
  62.          name            =   "MS Sans Serif"
  63.          charset         =   0
  64.          weight          =   700
  65.          size            =   8.25
  66.          underline       =   0   'False
  67.          italic          =   0   'False
  68.          strikethrough   =   0   'False
  69.       EndProperty
  70.       Height          =   255
  71.       Left            =   1170
  72.       TabIndex        =   7
  73.       Top             =   1260
  74.       Width           =   1155
  75.    End
  76.    Begin VB.Label AmountLab 
  77.       BeginProperty Font 
  78.          name            =   "MS Sans Serif"
  79.          charset         =   0
  80.          weight          =   700
  81.          size            =   8.25
  82.          underline       =   0   'False
  83.          italic          =   0   'False
  84.          strikethrough   =   0   'False
  85.       EndProperty
  86.       Height          =   255
  87.       Left            =   1170
  88.       TabIndex        =   6
  89.       Top             =   900
  90.       Width           =   1155
  91.    End
  92.    Begin VB.Label CountLab 
  93.       BeginProperty Font 
  94.          name            =   "MS Sans Serif"
  95.          charset         =   0
  96.          weight          =   700
  97.          size            =   8.25
  98.          underline       =   0   'False
  99.          italic          =   0   'False
  100.          strikethrough   =   0   'False
  101.       EndProperty
  102.       Height          =   255
  103.       Left            =   1170
  104.       TabIndex        =   5
  105.       Top             =   540
  106.       Width           =   1155
  107.    End
  108.    Begin VB.Label CompanyLab 
  109.       BeginProperty Font 
  110.          name            =   "MS Sans Serif"
  111.          charset         =   0
  112.          weight          =   700
  113.          size            =   8.25
  114.          underline       =   0   'False
  115.          italic          =   0   'False
  116.          strikethrough   =   0   'False
  117.       EndProperty
  118.       Height          =   255
  119.       Left            =   1170
  120.       TabIndex        =   4
  121.       Top             =   180
  122.       Width           =   2745
  123.    End
  124.    Begin VB.Label Label1 
  125.       Caption         =   "Total"
  126.       BeginProperty Font 
  127.          name            =   "MS Sans Serif"
  128.          charset         =   0
  129.          weight          =   700
  130.          size            =   8.25
  131.          underline       =   0   'False
  132.          italic          =   0   'False
  133.          strikethrough   =   0   'False
  134.       EndProperty
  135.       Height          =   255
  136.       Index           =   3
  137.       Left            =   150
  138.       TabIndex        =   3
  139.       Top             =   1260
  140.       Width           =   915
  141.    End
  142.    Begin VB.Label Label1 
  143.       Caption         =   "Amount"
  144.       BeginProperty Font 
  145.          name            =   "MS Sans Serif"
  146.          charset         =   0
  147.          weight          =   700
  148.          size            =   8.25
  149.          underline       =   0   'False
  150.          italic          =   0   'False
  151.          strikethrough   =   0   'False
  152.       EndProperty
  153.       Height          =   255
  154.       Index           =   2
  155.       Left            =   150
  156.       TabIndex        =   2
  157.       Top             =   900
  158.       Width           =   915
  159.    End
  160.    Begin VB.Label Label1 
  161.       Caption         =   "Count"
  162.       BeginProperty Font 
  163.          name            =   "MS Sans Serif"
  164.          charset         =   0
  165.          weight          =   700
  166.          size            =   8.25
  167.          underline       =   0   'False
  168.          italic          =   0   'False
  169.          strikethrough   =   0   'False
  170.       EndProperty
  171.       Height          =   255
  172.       Index           =   1
  173.       Left            =   150
  174.       TabIndex        =   1
  175.       Top             =   540
  176.       Width           =   915
  177.    End
  178.    Begin VB.Label Label1 
  179.       Caption         =   "Company"
  180.       BeginProperty Font 
  181.          name            =   "MS Sans Serif"
  182.          charset         =   0
  183.          weight          =   700
  184.          size            =   8.25
  185.          underline       =   0   'False
  186.          italic          =   0   'False
  187.          strikethrough   =   0   'False
  188.       EndProperty
  189.       Height          =   255
  190.       Index           =   0
  191.       Left            =   150
  192.       TabIndex        =   0
  193.       Top             =   180
  194.       Width           =   915
  195.    End
  196. Attribute VB_Name = "Coop2"
  197. Attribute VB_Creatable = False
  198. Attribute VB_Exposed = False
  199. Option Explicit
  200. Private Sub ExitBut_Click()
  201.     Unload Me
  202. End Sub
  203. Private Sub Form_Load()
  204.     Me.Caption = Me.Caption & " hWnd is " & Hex$(Me.hWnd)
  205.     SubClass1.HwndParam = Me.hWnd
  206.     SubClass1.RegMessage1 = COOP_MESSAGE
  207. End Sub
  208. #If Win32 Then
  209.     Private Sub SubClass1_WndMessage(wnd As Long, msg As Long, wp As Long, lp As Long, retval As Long, nodef As Integer)
  210. #Else
  211.     Private Sub SubClass1_WndMessage(wnd As Integer, msg As Integer, wp As Integer, lp As Long, retval As Long, nodef As Integer)
  212. #End If
  213. Dim cs As CoopStructure
  214. Dim lpcs As Long, lres As Long
  215.     ' Get the address of this local CoopStructure
  216.     ' and copy the contents of the lp address to
  217.     ' this local CoopStructure
  218.     lpcs = dwGetAddressForObject(cs)
  219.     #If Win32 Then
  220.         lres = dwXCopyDataBynumFrom(lpcs, lp, Len(cs), wp)
  221.     #Else
  222.         dwCopyDataBynum lp, lpcs, Len(cs)
  223.     #End If
  224.     ' Place the contents of from the CoopStructure into
  225.     ' the Labels on this form.
  226.     #If Win32 Then
  227.         CompanyLab.Caption = StrConv(cs.CompanyName, vbUnicode)
  228.     #Else
  229.         CompanyLab.Caption = cs.CompanyName
  230.     #End If
  231.     CountLab.Caption = cs.count
  232.     AmountLab.Caption = cs.Amount
  233.     TotalLab.Caption = cs.Total
  234.     retval = &H100000FF 'return a value
  235.     nodef = True
  236. End Sub
  237.