*/
Want to see what people are talking about? See the latest forum posts.
*/

View \CTIPS.FRM

Tip of the Day routines

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


VERSION 4.00
Begin VB.Form frmTips
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   " Tip of the Day"
   ClientHeight    =   2325
   ClientLeft      =   3975
   ClientTop       =   3495
   ClientWidth     =   4650
   ControlBox      =   0   'False
   Height          =   2820
   Icon            =   "cTips.frx":0000
   Left            =   3915
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2325
   ScaleWidth      =   4650
   ShowInTaskbar   =   0   'False
   Top             =   3060
   Width           =   4770
   Begin VB.CommandButton cmdAnother
      Caption         =   "&Another..."
      Height          =   495
      Left            =   2280
      TabIndex        =   1
      Top             =   1740
      Width           =   1035
   End
   Begin VB.CommandButton cmdOK
      Cancel          =   -1  'True
      Caption         =   "&OK"
      Default         =   -1  'True
      Height          =   495
      Left            =   3480
      TabIndex        =   0
      Top             =   1740
      Width           =   1035
   End
   Begin VB.Label lblTip
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Label1"
      BeginProperty Font
         name            =   "MS Serif"
         charset         =   0
         weight          =   400
         size            =   9.75
         underline       =   0   'False
         italic          =   0   'False
         strikethrough   =   0   'False
      EndProperty
      Height          =   1515
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   4395
   End
End
Attribute VB_Name = "frmTips"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
' Form Name:    frmTips.frm
' Author:       Deborah Kurata, InStep Technologies
' Edited by:    Larry Rebich, The Bridge, Inc.
' Date:         95/06/09 - Deborah
'               95/09/17 - Larry
' Description:  Displays the "Tip of the Day"
' Revisions:
'
    Option Explicit
' Public: **********************************
' Public member variables

' Private: *********************************
' Private member variables

' Define the collections object
    Private m_colTips As cTips
Private Sub cmdAnother_Click()
' Another random tip
    Dim sTip As String              'store temp tip here
    sTip = lblTip                   'initialize it
    While sTip = lblTip             'same?
        sTip = m_colTips.NextTip  'Select a random tip
    Wend
    lblTip = sTip                   'display it
End Sub
Private Sub cmdOK_Click()
    Unload Me       'unload the form
End Sub
Private Sub Form_Load()
    Move (Screen.Width - Width)  2, (Screen.Height - Height)  2 'center me
    Set m_colTips = New cTips       'Create the instance
    lblTip = m_colTips.RandomTip    'Select a random tip
End Sub
Private Sub Form_Unload(Cancel As Integer)
    Set m_colTips = Nothing         'Clear all object references
    Set frmTips = Nothing
End Sub

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.