home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 25 / nopv25.iso / 040A / INPUTB21.ZIP / INPUTBOX.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-12-31  |  3.7 KB  |  138 lines

  1. VERSION 4.00
  2. Begin VB.Form InputForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "InputForm"
  5.    ClientHeight    =   1305
  6.    ClientLeft      =   4410
  7.    ClientTop       =   1425
  8.    ClientWidth     =   4740
  9.    ControlBox      =   0   'False
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   1710
  21.    Left            =   4350
  22.    LinkTopic       =   "Form2"
  23.    MaxButton       =   0   'False
  24.    MinButton       =   0   'False
  25.    ScaleHeight     =   1305
  26.    ScaleWidth      =   4740
  27.    Top             =   1080
  28.    Width           =   4860
  29.    Begin VB.CommandButton Help 
  30.       Caption         =   "&Help"
  31.       Height          =   330
  32.       Left            =   3600
  33.       TabIndex        =   4
  34.       Top             =   840
  35.       Width           =   1035
  36.    End
  37.    Begin VB.TextBox Answer 
  38.       Height          =   315
  39.       Left            =   1800
  40.       TabIndex        =   1
  41.       Top             =   240
  42.       Width           =   2835
  43.    End
  44.    Begin VB.CommandButton Cancel 
  45.       Cancel          =   -1  'True
  46.       Caption         =   "Cancel"
  47.       Height          =   330
  48.       Left            =   2460
  49.       TabIndex        =   3
  50.       Top             =   840
  51.       Width           =   1035
  52.    End
  53.    Begin VB.CommandButton OK 
  54.       Caption         =   "OK"
  55.       Default         =   -1  'True
  56.       Height          =   330
  57.       Left            =   1320
  58.       TabIndex        =   2
  59.       Top             =   840
  60.       Width           =   1035
  61.    End
  62.    Begin MSComDlg.CommonDialog HelpDialog 
  63.       Left            =   60
  64.       Top             =   780
  65.       _Version        =   65536
  66.       _ExtentX        =   847
  67.       _ExtentY        =   847
  68.       _StockProps     =   0
  69.    End
  70.    Begin VB.Label Question 
  71.       AutoSize        =   -1  'True
  72.       BackStyle       =   0  'Transparent
  73.       Caption         =   "Question:"
  74.       Height          =   195
  75.       Left            =   105
  76.       TabIndex        =   0
  77.       Top             =   315
  78.       UseMnemonic     =   0   'False
  79.       Width           =   825
  80.    End
  81. Attribute VB_Name = "InputForm"
  82. Attribute VB_Creatable = False
  83. Attribute VB_Exposed = False
  84. ' InputBox.Frm
  85. ' Form used by InputBox.Bas
  86. ' (see that for more information)
  87. 1994-1997 Tuomas Salste (vbshop@netgate.net)
  88. Option Explicit
  89. Public CharCase As Long
  90. Private Sub Answer_Change()
  91. If CharCase Then
  92.     ChangeCase Answer
  93. End If
  94. End Sub
  95. Private Sub Answer_GotFocus()
  96. Answer.SelStart = 0
  97. Answer.SelLength = Len(Answer)
  98. End Sub
  99. Private Sub Cancel_Click()
  100. Answer = ""
  101. Tag = ""
  102. End Sub
  103. Private Sub ChangeCase(t As TextBox)
  104. Dim ss As Integer
  105. ss = t.SelStart
  106. Select Case CharCase
  107.     Case IBUcase
  108.         t = UCase(t)
  109.     Case IBLcase
  110.         t = LCase(t)
  111.     Case Else
  112. End Select
  113. t.SelStart = ss
  114. End Sub
  115. Private Sub Form_Activate()
  116. Dim RightBorder As Long
  117. Const MARG = 50
  118. Question.Refresh
  119. Answer.Left = Question.Left + Question.Width + MARG
  120. Answer.Width = ScaleWidth - Answer.Left - MARG
  121. Answer.SetFocus
  122. MousePointer = vbDefault
  123. End Sub
  124. Private Sub Form_Unload(Cancel As Integer)
  125. Tag = ""
  126. End Sub
  127. Private Sub Help_Click()
  128. With HelpDialog
  129.     .HelpFile = App.HelpFile
  130.     .HelpCommand = cdlHelpContext
  131.     .HelpContext = HelpContextID
  132.     .ShowHelp
  133. End With
  134. End Sub
  135. Private Sub OK_Click()
  136. Tag = "OK"
  137. End Sub
  138.