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 / samples4 / ch06 / environ.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-08-13  |  1.3 KB  |  48 lines

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