home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 January / dppcpro0199a.iso / January / Fp98 / SDK / Utility / Apitests / Taskdone.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-09-18  |  5.0 KB  |  173 lines

  1. VERSION 5.00
  2. Begin VB.Form frmCompleteTask 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Complete Task"
  5.    ClientHeight    =   3300
  6.    ClientLeft      =   2670
  7.    ClientTop       =   2460
  8.    ClientWidth     =   5025
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   3300
  14.    ScaleWidth      =   5025
  15.    ShowInTaskbar   =   0   'False
  16.    Begin VB.CommandButton btnCompleted 
  17.       Caption         =   "Completed Task"
  18.       Height          =   375
  19.       Left            =   1260
  20.       TabIndex        =   9
  21.       Top             =   2040
  22.       Width           =   1455
  23.    End
  24.    Begin VB.CommandButton btnWorkedOn 
  25.       Caption         =   "Worked On Task"
  26.       Height          =   375
  27.       Left            =   2880
  28.       TabIndex        =   8
  29.       Top             =   2040
  30.       Width           =   1755
  31.    End
  32.    Begin VB.TextBox txtURL 
  33.       Height          =   315
  34.       Left            =   1260
  35.       Locked          =   -1  'True
  36.       TabIndex        =   5
  37.       Top             =   1080
  38.       Width           =   1995
  39.    End
  40.    Begin VB.TextBox txtCookie 
  41.       Height          =   315
  42.       Left            =   1260
  43.       TabIndex        =   4
  44.       Top             =   1500
  45.       Width           =   3615
  46.    End
  47.    Begin VB.CommandButton btnBrowse 
  48.       Caption         =   "Browse..."
  49.       Height          =   315
  50.       Left            =   3300
  51.       TabIndex        =   3
  52.       Top             =   1080
  53.       Width           =   915
  54.    End
  55.    Begin VB.CommandButton btnClear 
  56.       Caption         =   "Clear"
  57.       Height          =   315
  58.       Left            =   4260
  59.       TabIndex        =   2
  60.       Top             =   1080
  61.       Width           =   615
  62.    End
  63.    Begin VB.Label Label8 
  64.       Caption         =   $"taskdone.frx":0000
  65.       Height          =   615
  66.       Left            =   120
  67.       TabIndex        =   10
  68.       Top             =   2580
  69.       Width           =   4815
  70.       WordWrap        =   -1  'True
  71.    End
  72.    Begin VB.Label Label3 
  73.       Caption         =   "URL:"
  74.       Height          =   255
  75.       Left            =   120
  76.       TabIndex        =   7
  77.       Top             =   1140
  78.       Width           =   1035
  79.    End
  80.    Begin VB.Label Label4 
  81.       Caption         =   "Cookie:"
  82.       Height          =   255
  83.       Left            =   120
  84.       TabIndex        =   6
  85.       Top             =   1560
  86.       Width           =   1035
  87.    End
  88.    Begin VB.Line Line1 
  89.       X1              =   60
  90.       X2              =   4980
  91.       Y1              =   840
  92.       Y2              =   840
  93.    End
  94.    Begin VB.Label Label5 
  95.       Caption         =   "This form uses the following FrontPage To Do List methods:"
  96.       Height          =   255
  97.       Left            =   60
  98.       TabIndex        =   1
  99.       Top             =   60
  100.       Width           =   4935
  101.    End
  102.    Begin VB.Label Label6 
  103.       Alignment       =   2  'Center
  104.       Caption         =   "vtiCompletedTaskByUrl, vtiWorkedOnTaskByUrl"
  105.       Height          =   255
  106.       Left            =   60
  107.       TabIndex        =   0
  108.       Top             =   420
  109.       Width           =   4935
  110.       WordWrap        =   -1  'True
  111.    End
  112. Attribute VB_Name = "frmCompleteTask"
  113. Attribute VB_GlobalNameSpace = False
  114. Attribute VB_Creatable = False
  115. Attribute VB_PredeclaredId = True
  116. Attribute VB_Exposed = False
  117. Option Explicit
  118. Private Sub btnBrowse_Click()
  119.     MousePointer = 11
  120.     frmGetURL.Tag = ""
  121.     frmGetURL.Show 1
  122.     If frmGetURL.Tag <> "" Then
  123.         txtURL = frmGetURL.Tag
  124.     End If
  125.     frmGetURL.Tag = ""
  126.     MousePointer = 0
  127. End Sub
  128. Private Sub btnClear_Click()
  129.     txtURL = ""
  130. End Sub
  131. Private Sub btnCompleted_Click()
  132.     Dim todolist As Object
  133.     Dim webber As Object
  134.     Dim webURL As String
  135.     Dim ret As Boolean
  136.     Dim url As String
  137.     Dim priority As Integer
  138.     MousePointer = 11
  139.     Set todolist = CreateObject("FrontPage.ToDoList")
  140.     ret = todolist.vtiCompletedTaskByUrl(txtURL, txtCookie)
  141.     If Not ret Then
  142.         MsgBox "Failed to mark task for given URL as completed."
  143.     End If
  144.     Set todolist = Nothing
  145.         
  146.     MousePointer = 0
  147. End Sub
  148. Private Sub btnWorkedOn_Click()
  149.     Dim todolist As Object
  150.     Dim webber As Object
  151.     Dim webURL As String
  152.     Dim ret As Boolean
  153.     Dim url As String
  154.     Dim priority As Integer
  155.     MousePointer = 11
  156.     Set todolist = CreateObject("FrontPage.ToDoList")
  157.     ret = todolist.vtiWorkedOnTaskByUrl(txtURL, txtCookie)
  158.     If Not ret Then
  159.         MsgBox "Failed to mark task for given URL as worked on."
  160.     End If
  161.     Set todolist = Nothing
  162.         
  163.     MousePointer = 0
  164. End Sub
  165. Private Sub Form_Load()
  166.     btnCompleted.Enabled = False
  167.     btnWorkedOn.Enabled = False
  168. End Sub
  169. Private Sub txtURL_Change()
  170.     btnCompleted.Enabled = Len(txtURL) > 0
  171.     btnWorkedOn.Enabled = Len(txtURL) > 0
  172. End Sub
  173.