home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmAddTask
- Caption = "Add Task"
- ClientHeight = 5505
- ClientLeft = 2160
- ClientTop = 2190
- ClientWidth = 5025
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 5505
- ScaleWidth = 5025
- Begin VB.CommandButton btnClear
- Caption = "Clear"
- Height = 315
- Left = 4260
- TabIndex = 19
- Top = 2700
- Width = 615
- End
- Begin VB.CommandButton btnBrowse
- Caption = "Browse..."
- Height = 315
- Left = 3300
- TabIndex = 18
- Top = 2700
- Width = 915
- End
- Begin VB.Frame Frame1
- Caption = "Priority"
- Height = 675
- Left = 1260
- TabIndex = 9
- Top = 1500
- Width = 3615
- Begin VB.OptionButton optLow
- Caption = "Low"
- Height = 255
- Left = 2520
- TabIndex = 12
- Top = 300
- Width = 1035
- End
- Begin VB.OptionButton optMedium
- Caption = "Medium"
- Height = 255
- Left = 1320
- TabIndex = 11
- Top = 300
- Value = -1 'True
- Width = 1035
- End
- Begin VB.OptionButton optHigh
- Caption = "High"
- Height = 255
- Left = 360
- TabIndex = 10
- Top = 300
- Width = 1035
- End
- End
- Begin VB.TextBox txtComment
- Height = 315
- Left = 1260
- TabIndex = 8
- Top = 3540
- Width = 3615
- End
- Begin VB.TextBox txtCookie
- Height = 315
- Left = 1260
- TabIndex = 7
- Top = 3120
- Width = 3615
- End
- Begin VB.TextBox txtURL
- Height = 315
- Left = 1260
- Locked = -1 'True
- TabIndex = 6
- Top = 2700
- Width = 1995
- End
- Begin VB.TextBox txtCreator
- Height = 315
- Left = 1260
- TabIndex = 5
- Text = "API Test Program"
- Top = 2280
- Width = 3615
- End
- Begin VB.TextBox txtTask
- Height = 315
- Left = 1260
- TabIndex = 4
- Text = "Edit This Page"
- Top = 1080
- Width = 3615
- End
- Begin VB.CommandButton btnTaskPrompt
- Caption = "Add Task For User"
- Height = 375
- Left = 2880
- TabIndex = 3
- Top = 4140
- Width = 1755
- End
- Begin VB.CommandButton btnAddTask
- Caption = "Add Task"
- Height = 375
- Left = 1260
- TabIndex = 2
- Top = 4140
- Width = 1455
- End
- Begin VB.Label Label8
- Caption = $"addtask.frx":0000
- Height = 855
- Left = 120
- TabIndex = 20
- Top = 4620
- Width = 4815
- WordWrap = -1 'True
- End
- Begin VB.Label Label7
- Caption = "Comment:"
- Height = 255
- Left = 120
- TabIndex = 17
- Top = 3600
- Width = 1035
- End
- Begin VB.Label Label4
- Caption = "Cookie:"
- Height = 255
- Left = 120
- TabIndex = 16
- Top = 3180
- Width = 1035
- End
- Begin VB.Label Label3
- Caption = "URL:"
- Height = 255
- Left = 120
- TabIndex = 15
- Top = 2760
- Width = 1035
- End
- Begin VB.Label Label2
- Caption = "Created By:"
- Height = 255
- Left = 120
- TabIndex = 14
- Top = 2340
- Width = 1035
- End
- Begin VB.Label Label1
- Caption = "Task Name:"
- Height = 255
- Left = 120
- TabIndex = 13
- Top = 1140
- Width = 1035
- End
- Begin VB.Label Label6
- Alignment = 2 'Center
- Caption = "vtiAddTask, vtiAddTaskAskUser"
- Height = 255
- Left = 60
- TabIndex = 1
- Top = 420
- Width = 4935
- WordWrap = -1 'True
- End
- Begin VB.Label Label5
- Caption = "This form uses the following FrontPage To Do List methods:"
- Height = 255
- Left = 60
- TabIndex = 0
- Top = 60
- Width = 4935
- End
- Begin VB.Line Line1
- X1 = 60
- X2 = 4980
- Y1 = 840
- Y2 = 840
- End
- Attribute VB_Name = "frmAddTask"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub btnAddTask_Click()
- Dim todolist As Object
- Dim webber As Object
- Dim webURL As String
- Dim ret As Boolean
- Dim url As String
- Dim priority As Integer
- MousePointer = 11
- Set webber = CreateObject("FrontPage.Explorer")
- webURL = webber.vtiGetWebURL
- Set webber = Nothing
- If Len(webURL) = 0 Then
- MsgBox "No web is currently open in the Explorer."
- Exit Sub
- End If
- If optHigh Then priority = 1
- If optMedium Then priority = 2
- If optLow Then priority = 3
- Set todolist = CreateObject("FrontPage.ToDoList")
- ret = todolist.vtiAddTask(txtTask, priority, txtCreator, txtURL, txtCookie, txtComment)
- If Not ret Then
- MsgBox "Failed to add task for To Do List."
- End If
- Set todolist = Nothing
- frmGetURL.Tag = ""
- MousePointer = 0
- End Sub
- Private Sub btnBrowse_Click()
- MousePointer = 11
- frmGetURL.Tag = ""
- frmGetURL.Show 1
- If frmGetURL.Tag <> "" Then
- txtURL = frmGetURL.Tag
- End If
- frmGetURL.Tag = ""
- MousePointer = 0
- End Sub
- Private Sub btnClear_Click()
- txtURL = ""
- End Sub
- Private Sub btnTaskPrompt_Click()
- Dim todolist As Object
- Dim webber As Object
- Dim webURL As String
- Dim ret As Boolean
- Dim url As String
- Dim priority As Integer
- MousePointer = 11
- Set webber = CreateObject("FrontPage.Explorer")
- webURL = webber.vtiGetWebURL
- Set webber = Nothing
- If Len(webURL) = 0 Then
- MsgBox "No web is currently open in the Explorer."
- Exit Sub
- End If
- If optHigh Then priority = 1
- If optMedium Then priority = 2
- If optLow Then priority = 3
- Set todolist = CreateObject("FrontPage.ToDoList")
- ret = todolist.vtiAddTaskAskUser(txtTask, priority, txtCreator, txtURL, txtCookie, txtComment)
- If Not ret Then
- MsgBox "Failed to add task for To Do List."
- End If
- Set todolist = Nothing
- frmGetURL.Tag = ""
- MousePointer = 0
- End Sub
- Private Sub Form_Load()
- btnAddTask.Enabled = False
- btnTaskPrompt.Enabled = False
- End Sub
- Private Sub txtURL_Change()
- btnAddTask.Enabled = Len(txtURL.Text) > 0
- btnTaskPrompt.Enabled = Len(txtURL.Text) > 0
- End Sub
-