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 / ch06 / environ.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-16  |  1.3 KB  |  49 lines

  1. VERSION 5.00
  2. Begin VB.Form frmEnviron 
  3.    Caption         =   "Environment Reader"
  4.    ClientHeight    =   2790
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1515
  7.    ClientWidth     =   5475
  8.    LinkTopic       =   "Form1"
  9.    PaletteMode     =   1  'UseZOrder
  10.    ScaleHeight     =   2790
  11.    ScaleWidth      =   5475
  12.    Begin VB.ListBox lstEnv 
  13.       Height          =   1785
  14.       Left            =   180
  15.       TabIndex        =   0
  16.       Top             =   240
  17.       Width           =   5055
  18.    End
  19.    Begin VB.Label lblVal 
  20.       Caption         =   "Label1"
  21.       Height          =   555
  22.       Left            =   180
  23.       TabIndex        =   1
  24.       Top             =   2100
  25.       Width           =   5055
  26.    End
  27. Attribute VB_Name = "frmEnviron"
  28. Attribute VB_GlobalNameSpace = False
  29. Attribute VB_Creatable = False
  30. Attribute VB_PredeclaredId = True
  31. Attribute VB_Exposed = False
  32. Option Explicit
  33. ' Copyright 
  34.  1997 by Desaware Inc. All Rights Reserved
  35. Dim ev As New EVClass
  36. ' Load the list box with environment strings
  37. Private Sub Form_Load()
  38.     Dim e$
  39.     Dim cnt%
  40.     Do
  41.         e$ = ev.GetString(cnt%)
  42.         If e$ <> "" Then lstEnv.AddItem e$
  43.         cnt% = cnt% + 1
  44.     Loop While e$ <> ""
  45. End Sub
  46. Private Sub lstEnv_Click()
  47.     lblVal.Caption = ev.GetStringValue(lstEnv.Text)
  48. End Sub
  49.