QUICKTIP.FRM
上传用户:ling1220
上传日期:2007-01-10
资源大小:313k
文件大小:9k
- VERSION 5.00
- Begin VB.Form Quick_Tip
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Dialog
- Caption = "Quick Tip"
- ClientHeight = 3420
- ClientLeft = 1650
- ClientTop = 2115
- ClientWidth = 4755
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Icon = "QUICKTIP.frx":0000
- LinkTopic = "Quick_Tip"
- MaxButton = 0 'False
- MinButton = 0 'False
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 3420
- ScaleWidth = 4755
- Begin VB.CheckBox Check1
- Caption = "Showtips on startup"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 4
- Top = 3000
- Value = 1 'Checked
- Width = 1695
- End
- Begin VB.CommandButton Next_Tip_Button
- Appearance = 0 'Flat
- Caption = "&Next Tip"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 3600
- TabIndex = 1
- Top = 3000
- Width = 1095
- End
- Begin VB.CommandButton Quick_Tip_OK_Button
- Appearance = 0 'Flat
- Caption = "OK"
- Default = -1 'True
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 2280
- TabIndex = 0
- Top = 3000
- Width = 1095
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- Caption = "See the Internet site http://www.imagica.net for more info !!!!"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 195
- Left = 255
- TabIndex = 5
- Top = 2520
- Width = 4305
- End
- Begin VB.Image Image1
- Appearance = 0 'Flat
- Height = 480
- Left = 360
- Picture = "QUICKTIP.frx":0442
- Top = 255
- Width = 480
- End
- Begin VB.Label Label1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Did You Know..."
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 255
- Left = 840
- TabIndex = 2
- Top = 480
- Width = 1575
- End
- Begin VB.Label tip_text
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Tip Text...................."
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 1455
- Left = 360
- TabIndex = 3
- Top = 960
- Width = 4095
- WordWrap = -1 'True
- End
- Begin VB.Shape Shape1
- BackColor = &H00FFFFFF&
- FillColor = &H00FFFFFF&
- FillStyle = 0 'Solid
- Height = 2535
- Left = 240
- Top = 240
- Width = 4335
- End
- Begin VB.Line Line4
- BorderColor = &H00FFFFFF&
- X1 = 4680
- X2 = 4680
- Y1 = 2880
- Y2 = 120
- End
- Begin VB.Line Line3
- BorderColor = &H00808080&
- X1 = 4680
- X2 = 120
- Y1 = 120
- Y2 = 120
- End
- Begin VB.Line Line2
- BorderColor = &H00FFFFFF&
- X1 = 4680
- X2 = 120
- Y1 = 2880
- Y2 = 2880
- End
- Begin VB.Line Line1
- BorderColor = &H00808080&
- X1 = 120
- X2 = 120
- Y1 = 120
- Y2 = 2880
- End
- End
- Attribute VB_Name = "Quick_Tip"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim current_tip As String
- Dim quick_ini As String
- Private Sub Check1_Click()
- Form1.showtip.Value = Check1.Value
- End Sub
- Private Sub Form_Load()
- tip_tex = ""
- quick_ini = App.Path + "QUICKTIP.INI"
- start_tip = Trim(rtv_ini_data(quick_ini, "TIP", "START"))
-
-
-
- If start_tip = "T" Then
- show_tip = 1
- Else
- show_tip = 0
- End If
- Dim i As Integer
- i = SetWindowPos(Me.hWnd, HWND_TOPMOST, _
- Me.Left Screen.TwipsPerPixelX, Me.Top Screen.TwipsPerPixelY, _
- Me.Width Screen.TwipsPerPixelX, Me.Height Screen.TwipsPerPixelY, 0)
- load_tip
- Me.Left = (Screen.Width / 2) - (Me.Width / 2)
- Me.Top = (Screen.Height / 2) - (Me.Height / 2)
- End Sub
- Private Sub load_tip()
- quick_ini = App.Path + "QUICKTIP.INI"
- current_tip = rtv_ini_data(quick_ini, "TIP", "CURRENT")
- tip_text = rtv_ini_data(quick_ini, "TIP", current_tip)
- current_tip = CStr(Val(current_tip) + 1)
- error_check = rtv_ini_data(quick_ini, "TIP", current_tip)
- If error_check = "unknown" Then
- current_tip = "1"
- End If
- xx = upd_ini_data(quick_ini, "TIP", "CURRENT", current_tip)
- End Sub
- Private Sub More_Tip_Button_Click()
- MsgBox "Place more Tip help under this button", 0
- End Sub
- Private Sub Next_Tip_Button_Click()
- load_tip
- End Sub
- Private Sub Quick_Tip__Click()
- MsgBox "Place your help under this button", 0
- End Sub
- Private Sub Quick_Tip_OK_Button_Click()
- Dim start_tip As String
- If show_tip Then
- start_tip = "T"
- Else
- start_tip = "F"
- End If
- quick_ini = CurDir$ + "QUICKTIP.INI"
- xx = upd_ini_data(quick_ini, "TIP", "START", start_tip)
-
- Unload Quick_Tip
- End Sub
- Private Function rtv_ini_data$(ini_File$, ini_select$, ini_entry$)
- ' rtv_ini_data("XXX.INI","ENVIRONMENT","PATH")
- Dim temp_string As String
-
- rtv_ini_data$ = ""
-
- Section$ = ini_select$
- Entry$ = ini_entry$
- DefaultValue$ = "unknown"
- EntryValue$ = Space$(1000)
- EntryValueSize = 1000
-
- X% = GetPrivateProfileString(Section$, Entry$, DefaultValue$, EntryValue$, EntryValueSize, ini_File$)
- If X% = 0 Then
- box_msg$ = " Invalid Entry -> " + Section$ + "/" + Entry$
- MsgBox box_msg$, 16, "Loading Error"
- End If
-
- Len_string = Len(Trim$(EntryValue$)) - 1
- temp_string = Left$(EntryValue$, Len_string)
- rtv_ini_data$ = temp_string
- End Function
- Private Function upd_ini_data$(ini_File$, ini_select$, ini_entry$, EntryValue$)
- ' upd_ini_data("XXX.INI","ENVIRONMENT","PATH", "C:")
-
- upd_ini_data$ = ""
-
- Section$ = ini_select$
- Entry$ = ini_entry$
-
- X% = WritePrivateProfileString(Section$, Entry$, EntryValue$, ini_File$)
- If X% = 0 Then
- box_msg$ = " Invalid Entry -> " + Section$ + "/" + Entry$
- MsgBox box_msg$, 16, "Loading Error"
- End If
-
- End Function
- Private Sub show_tip_Click()
- End Sub