Projects

Find all our projects in development below.
All source code is GNU General Public License (GPL)

eBay Auction Builder 1.x

Browsing SetValueForm.frm (3.93 KB)

VERSION 5.00
Begin VB.Form SetValueForm 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "(Caption)"
   ClientHeight    =   1095
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4830
   ClipControls    =   0   'False
   Icon            =   "SetValueForm.frx":0000
   LinkTopic       =   "SetValueForm"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1095
   ScaleWidth      =   4830
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3480
      TabIndex        =   3
      Top             =   600
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "OK"
      Default         =   -1  'True
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2160
      TabIndex        =   2
      Top             =   600
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   1080
      MaxLength       =   300
      TabIndex        =   1
      Top             =   120
      Width           =   3615
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "(Command)"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   195
      Left            =   120
      TabIndex        =   0
      Top             =   180
      Width           =   825
   End
End
Attribute VB_Name = "SetValueForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim AllowNoValue As Boolean
Dim ReturnNullChar As Boolean
Sub SetFlags(Flags As Long)
If (Flags And GI_DEFAULTENABLED) > 0 Then Command1.Enabled = True
If (Flags And GI_ALLOWNOVALUE) > 0 Then AllowNoValue = True
If (Flags And GI_RETURNNULLCHAR) > 0 Then ReturnNullChar = True
End Sub


Private Sub Command1_Click()
SetValueFormValue = Text1.Text
Unload Me
End Sub

Private Sub Command2_Click()
If ReturnNullChar Then
SetValueFormValue = Chr(0)
Else
SetValueFormValue = ""
End If
Unload Me
End Sub

Private Sub Form_Load()
AllowNoValue = False
ReturnNullChar = False
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
If ReturnNullChar Then
SetValueFormValue = Chr(0)
Else
SetValueFormValue = ""
End If
End If
End Sub


Private Sub Text1_Change()
If Not AllowNoValue Then
If Text1.Text = "" Then Command1.Enabled = False
If Text1.Text <> "" Then Command1.Enabled = True
End If
End Sub


Download SetValueForm.frm

Back to file list


Back to project page