home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / attall / alltheti.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-05-08  |  12.0 KB  |  380 lines

  1. VERSION 2.00
  2. Begin Form AllTheTime 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   0  'None
  6.    Caption         =   "AllTheTime"
  7.    ClientHeight    =   0
  8.    ClientLeft      =   75
  9.    ClientTop       =   375
  10.    ClientWidth     =   810
  11.    ControlBox      =   0   'False
  12.    FillColor       =   &H00C0C0C0&
  13.    FillStyle       =   0  'Solid
  14.    FontBold        =   0   'False
  15.    FontItalic      =   0   'False
  16.    FontName        =   "MS Sans Serif"
  17.    FontSize        =   8.25
  18.    FontStrikethru  =   0   'False
  19.    FontUnderline   =   0   'False
  20.    Height          =   405
  21.    Icon            =   ALLTHETI.FRX:0000
  22.    Left            =   15
  23.    LinkTopic       =   "Form2"
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   0
  27.    ScaleWidth      =   810
  28.    Top             =   30
  29.    Width           =   930
  30.    Begin TextBox Text1 
  31.       Height          =   288
  32.       Left            =   2016
  33.       LinkTimeout     =   -1
  34.       TabIndex        =   5
  35.       Top             =   624
  36.       Visible         =   0   'False
  37.       Width           =   372
  38.    End
  39.    Begin PictureClip MoonSun 
  40.       Cols            =   5
  41.       Location        =   "1215,1215,6900,5160"
  42.       Picture         =   ALLTHETI.FRX:0302
  43.       Rows            =   5
  44.    End
  45.    Begin SSFrame Frame3D1 
  46.       Font3D          =   0  'None
  47.       ForeColor       =   &H00000000&
  48.       Height          =   195
  49.       Left            =   15
  50.       TabIndex        =   4
  51.       Top             =   8160
  52.       Width           =   135
  53.       Begin SSOption Option3D1 
  54.          Alignment       =   1  'Right Justify
  55.          Caption         =   "&3 - Bottom right"
  56.          Font3D          =   0  'None
  57.          ForeColor       =   &H00000000&
  58.          Height          =   255
  59.          Index           =   2
  60.          Left            =   1920
  61.          TabIndex        =   2
  62.          Top             =   960
  63.          Value           =   -1  'True
  64.          Width           =   1575
  65.       End
  66.       Begin SSOption Option3D1 
  67.          Caption         =   "&5 - Elsewhere"
  68.          Font3D          =   0  'None
  69.          ForeColor       =   &H00000000&
  70.          Height          =   255
  71.          Index           =   4
  72.          Left            =   1530
  73.          TabIndex        =   6
  74.          TabStop         =   0   'False
  75.          Top             =   615
  76.          Width           =   1575
  77.       End
  78.       Begin SSOption Option3D1 
  79.          Caption         =   "&1 - Upper left"
  80.          Font3D          =   0  'None
  81.          ForeColor       =   &H00000000&
  82.          Height          =   255
  83.          Index           =   0
  84.          Left            =   105
  85.          TabIndex        =   0
  86.          TabStop         =   0   'False
  87.          Top             =   255
  88.          Width           =   1455
  89.       End
  90.       Begin SSOption Option3D1 
  91.          Alignment       =   1  'Right Justify
  92.          Caption         =   "&2 - Upper right"
  93.          Font3D          =   0  'None
  94.          ForeColor       =   &H00000000&
  95.          Height          =   255
  96.          Index           =   1
  97.          Left            =   1920
  98.          TabIndex        =   1
  99.          TabStop         =   0   'False
  100.          Top             =   270
  101.          Width           =   1575
  102.       End
  103.       Begin SSOption Option3D1 
  104.          Caption         =   "&4 - Bottom left"
  105.          Font3D          =   0  'None
  106.          ForeColor       =   &H00000000&
  107.          Height          =   255
  108.          Index           =   3
  109.          Left            =   120
  110.          TabIndex        =   3
  111.          TabStop         =   0   'False
  112.          Top             =   960
  113.          Width           =   1575
  114.       End
  115.    End
  116.    Begin Image PrtStatus 
  117.       Height          =   240
  118.       Left            =   510
  119.       Top             =   10005
  120.       Width           =   300
  121.    End
  122.    Begin Image PrtInactive 
  123.       Height          =   240
  124.       Left            =   510
  125.       Picture         =   ALLTHETI.FRX:1E20
  126.       Top             =   10080
  127.       Width           =   285
  128.    End
  129.    Begin Image PrtActive 
  130.       Height          =   240
  131.       Left            =   510
  132.       Picture         =   ALLTHETI.FRX:1FEA
  133.       Top             =   10080
  134.       Width           =   300
  135.    End
  136.    Begin Image Picture1 
  137.       Height          =   225
  138.       Left            =   30
  139.       Picture         =   ALLTHETI.FRX:21B4
  140.       Top             =   30
  141.       Width           =   240
  142.    End
  143.    Begin Image MoonPic 
  144.       Height          =   192
  145.       Left            =   300
  146.       Top             =   30
  147.       Width           =   192
  148.    End
  149.    Begin Image SeasonPic 
  150.       Height          =   192
  151.       Left            =   4080
  152.       Top             =   30
  153.       Width           =   192
  154.    End
  155. 'DefInt A-Z
  156. Const GroupFauxCompilerDirective = False
  157. Sub Form_Activate ()
  158.     'MsgBox ("Activate...")
  159.       If AllTheTime.Left >= Screen.Width - 15 Then
  160.          AllTheTime.Left = AllTheTime.Tag
  161.       End If
  162. End Sub
  163. Sub Form_Click ()
  164. SoundABorted = True
  165. CFlag% = True
  166. End Sub
  167. Sub Form_DblClick ()
  168. DblCFlag% = True
  169. End Sub
  170. Sub Form_GotFocus ()
  171.       If AllTheTime.Left >= Screen.Width - 15 Then
  172.          AllTheTime.Left = AllTheTime.Tag
  173.       End If
  174. 'Settings.SetFocus
  175. End Sub
  176. Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
  177.     Select Case KeyCode
  178.         Case Alt_R      'Rotate
  179.             For I% = 0 To 4
  180.             If Settings.Option3D1(I%).Value Then S% = I%
  181.             Next I%
  182.             Settings.Option3D1((S% + 1) Mod 5).Value = True
  183.             Settings.Option3D1(S%).Value = False
  184.             KeyCode = 0
  185.             Shift = 0
  186.             Call PositionATT
  187.         Case Alt_T      'Turn off
  188. '            KeyCode = 0
  189. '            Shift = 0
  190. '            AllTheTime.Visible = Not AllTheTime.Visible
  191.    End Select
  192. End Sub
  193. Sub Form_KeyPress (KeyAscii As Integer)
  194.     If KeyAscii = Asc("X") Then
  195.        DeleteMenus
  196.        End 'Program
  197.     End If
  198. End Sub
  199. Sub Form_Load ()
  200. If hSubMenus <> 0 Then
  201.    MsgBox "Loading twice..."
  202.    End
  203. End If
  204. hMainMenu = CreatePopUpMenu()
  205. hTaskMenu = CreateTaskMenu()
  206. T% = AppendMenu(hMainMenu, MF_POPUP, hTaskMenu, "&Switch to")
  207. T% = AppendMenu(hMainMenu, MF_STRING, IDM_SETTINGS, "Se&ttings...")
  208. T% = AppendMenu(hMainMenu, MF_SEPARATOR, IDM_ITEMS, "-")
  209. T% = AppendMenu(hMainMenu, MF_STRING, IDM_ABOUT, "&About...")
  210. T% = AppendMenu(hMainMenu, MF_SEPARATOR, IDM_ITEMS, "-")
  211. T% = AppendMenu(hMainMenu, MF_STRING, IDM_EXIT, "E&xit")
  212. If GroupFauxCompilerDirective Then
  213.    Text1.LinkMode = 0
  214.    Text1.LinkTopic = "Progman|Progman"
  215.    Text1.LinkItem = "Groups"
  216.    Text1.LinkMode = 2
  217.    Text1.LinkRequest
  218.    hGroupMenu = CreatePopUpMenu()
  219.    T% = AppendMenu(hMainMenu, MF_SEPARATOR, IDM_ITEMS, "-")
  220.    Groups$ = Text1.Text
  221.    While Groups$ <> ""
  222.       cPos = InStr(Groups$, Chr(13))
  223.       OneGroup$ = Left$(Groups$, cPos - 1)
  224.       Groups$ = Mid$(Groups$, cPos + 2, 30000)
  225.       hSubMenus = hSubMenus + 1
  226.       ReDim Preserve hSubMenu(hSubMenus)
  227.       hSubMenu(hSubMenus) = CreatePopUpMenu()   'popup
  228.       Text1.LinkItem = OneGroup$
  229.       Text1.LinkMode = 2
  230.       Text1.LinkRequest
  231.       Progs$ = Text1.Text
  232.       FirstOne = True
  233.       While Progs$ <> ""
  234.          cPos = InStr(Progs$, Chr(13))
  235.          OneProg$ = Left$(Progs$, cPos - 1)
  236.          Progs$ = Mid$(Progs$, cPos + 2, 30000)
  237.          PName$ = Mid$(OneProg$, 2, 30000)
  238.          PName$ = Mid$(PName$, 1, InStr(PName$, Chr(34)) - 1)
  239.          If FirstOne Then
  240.             FirstOne = False
  241.          Else
  242.             T% = AppendMenu(hSubMenu(hSubMenus), MF_STRING, IDM_ITEMS + hSubMenus, PName$)
  243.          End If
  244.       Wend
  245.       T% = AppendMenu(hGroupMenu, MF_POPUP, hSubMenu(hSubMenus), OneGroup$)
  246.    Wend
  247. T% = AppendMenu(hMainMenu, MF_POPUP, hGroupMenu, "Groups...")
  248. End If
  249. PrtActive.Picture = MoonSun.GraphicCell(20)
  250. PrtInActive.Picture = MoonSun.GraphicCell(21)
  251. PrtStatus.Picture = MoonSun.GraphicCell(21)
  252. 'Screen.MousePointer = 0
  253. 'AllTheTime.Visible = True
  254. End Sub
  255. Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  256. MStartX = X
  257. MStartY = Y
  258. StartLeft = Left
  259. StartTop = Top
  260. AllowFormToMove = True
  261. Moved = True
  262. If Shift <> 1 Then
  263.    'AutoRedraw = False   '1/15
  264.    'Beep
  265. End If
  266. End Sub
  267. Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  268. If AllowFormToMove = True Then
  269.         AllTheTime.Left = AllTheTime.Left + (X - MStartX)
  270.         AllTheTime.Top = AllTheTime.Top + (Y - MStartY)
  271. End If
  272. End Sub
  273. Sub Form_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  274. AllowFormToMove = False
  275. 'AutoRedraw = True '1/15
  276. If Left = StartLeft And Top = StartTop Then
  277.    Moved = False
  278.    PosLeft = AllTheTime.Left
  279.    PosTop = AllTheTime.Top
  280.    Settings.Option3D1(4).Value = True
  281.    For I% = 0 To 3
  282.       Settings.Option3D1(I%).Value = False
  283.    Next I%
  284. End If
  285. End Sub
  286. Sub Form_Paint ()
  287. End Sub
  288. Sub Form_Resize ()
  289. 'SavedVis = Visible
  290. 'Visible = False
  291. If Resizing Then Exit Sub
  292. Resizing = True
  293. If WindowState = 1 Then
  294.    Exit Sub
  295. End If
  296. Call SetTime
  297. Call SetSize
  298. Call PositionATT
  299. 'Visible = SavedVis
  300. Resizing = False
  301. End Sub
  302. Sub MoonPic_DblClick ()
  303. SoundABorted = True
  304. DblCFlag% = True
  305. End Sub
  306. Sub MoonPic_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  307. Call Form_MouseDown(Button, Shift, X, Y)
  308. End Sub
  309. Sub MoonPic_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  310. Call Form_MouseMove(Button, Shift, X, Y)
  311. End Sub
  312. Sub MoonPic_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  313. Call Form_MouseUp(Button, Shift, X, Y)
  314. End Sub
  315. Sub Option3D1_Click (Index As Integer, Value As Integer)
  316. Settings.Option3D1(Index).Value = Value
  317. Call PositionATT
  318. End Sub
  319. Sub Picture1_DblClick ()
  320. Call PictureMenuMouseDown(0, 0, 0, 0)
  321. SoundABorted = True
  322. DblCFlag% = True
  323. End Sub
  324. Sub Picture1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  325. Call PictureMenuMouseDown(Button, Shift, X, Y)
  326. End Sub
  327. Sub PrtActive_Click ()
  328. SoundABorted = True
  329. End Sub
  330. Sub PrtActive_DblClick ()
  331. 'On Local Error Resume Next
  332. T% = Shell("PRINTMAN", 1)
  333. 'AppActivate "Print Manager"
  334. 'hActive% = GetActiveWindow()                 ' pickup it's hWnd handle
  335. 'Call SwitchToThisWindow(hActive%, True)
  336. 'On Local Error GoTo 0
  337. End Sub
  338. Sub PrtActive_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  339. Call Form_MouseDown(Button, Shift, X, Y)
  340. End Sub
  341. Sub PrtActive_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  342. Call Form_MouseMove(Button, Shift, X, Y)
  343. End Sub
  344. Sub PrtActive_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  345. Call Form_MouseUp(Button, Shift, X, Y)
  346. End Sub
  347. Sub PrtInactive_Click ()
  348. SoundABorted = True
  349. End Sub
  350. Sub PrtInactive_DblClick ()
  351. T% = Shell("PRINTMAN", 1)
  352. End Sub
  353. Sub PrtInactive_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  354. Call Form_MouseDown(Button, Shift, X, Y)
  355. PrtInActive.Picture = MoonSun.GraphicCell(20)
  356. End Sub
  357. Sub PrtInactive_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  358. Call Form_MouseMove(Button, Shift, X, Y)
  359. End Sub
  360. Sub PrtInactive_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  361. Call Form_MouseUp(Button, Shift, X, Y)
  362. PrtInActive.Picture = MoonSun.GraphicCell(21)
  363. End Sub
  364. Sub SeasonPic_Click ()
  365. SoundABorted = True
  366. End Sub
  367. Sub SeasonPic_DblClick ()
  368. SoundABorted = True
  369. DblCFlag% = True
  370. End Sub
  371. Sub SeasonPic_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  372. Call Form_MouseDown(Button, Shift, X, Y)
  373. End Sub
  374. Sub SeasonPic_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  375. Call Form_MouseMove(Button, Shift, X, Y)
  376. End Sub
  377. Sub SeasonPic_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  378. Call Form_MouseUp(Button, Shift, X, Y)
  379. End Sub
  380.