home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / qa0396 / chgicon.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-10-26  |  9.1 KB  |  297 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "The World Changes"
  4.    ClientHeight    =   2490
  5.    ClientLeft      =   2205
  6.    ClientTop       =   2055
  7.    ClientWidth     =   5835
  8.    Height          =   2895
  9.    Icon            =   "chgicon.frx":0000
  10.    Left            =   2145
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   2490
  14.    ScaleWidth      =   5835
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   1710
  17.    Width           =   5955
  18.    Begin VB.PictureBox Picture1 
  19.       Height          =   600
  20.       Index           =   15
  21.       Left            =   5085
  22.       Picture         =   "chgicon.frx":0442
  23.       ScaleHeight     =   540
  24.       ScaleWidth      =   540
  25.       TabIndex        =   15
  26.       Top             =   1710
  27.       Visible         =   0   'False
  28.       Width           =   600
  29.    End
  30.    Begin VB.PictureBox Picture1 
  31.       Height          =   600
  32.       Index           =   14
  33.       Left            =   4485
  34.       Picture         =   "chgicon.frx":074C
  35.       ScaleHeight     =   540
  36.       ScaleWidth      =   540
  37.       TabIndex        =   14
  38.       Top             =   1695
  39.       Visible         =   0   'False
  40.       Width           =   600
  41.    End
  42.    Begin VB.PictureBox Picture1 
  43.       Height          =   600
  44.       Index           =   13
  45.       Left            =   3885
  46.       Picture         =   "chgicon.frx":0A56
  47.       ScaleHeight     =   540
  48.       ScaleWidth      =   540
  49.       TabIndex        =   13
  50.       Top             =   1695
  51.       Visible         =   0   'False
  52.       Width           =   600
  53.    End
  54.    Begin VB.PictureBox Picture1 
  55.       Height          =   600
  56.       Index           =   12
  57.       Left            =   3285
  58.       Picture         =   "chgicon.frx":0D60
  59.       ScaleHeight     =   540
  60.       ScaleWidth      =   540
  61.       TabIndex        =   12
  62.       Top             =   1695
  63.       Visible         =   0   'False
  64.       Width           =   600
  65.    End
  66.    Begin VB.PictureBox Picture1 
  67.       Height          =   600
  68.       Index           =   11
  69.       Left            =   2685
  70.       Picture         =   "chgicon.frx":106A
  71.       ScaleHeight     =   540
  72.       ScaleWidth      =   540
  73.       TabIndex        =   11
  74.       Top             =   1695
  75.       Visible         =   0   'False
  76.       Width           =   600
  77.    End
  78.    Begin VB.PictureBox Picture1 
  79.       Height          =   600
  80.       Index           =   10
  81.       Left            =   2085
  82.       Picture         =   "chgicon.frx":1374
  83.       ScaleHeight     =   540
  84.       ScaleWidth      =   540
  85.       TabIndex        =   10
  86.       Top             =   1695
  87.       Visible         =   0   'False
  88.       Width           =   600
  89.    End
  90.    Begin VB.PictureBox Picture1 
  91.       Height          =   600
  92.       Index           =   9
  93.       Left            =   1485
  94.       Picture         =   "chgicon.frx":167E
  95.       ScaleHeight     =   540
  96.       ScaleWidth      =   540
  97.       TabIndex        =   9
  98.       Top             =   1695
  99.       Visible         =   0   'False
  100.       Width           =   600
  101.    End
  102.    Begin VB.PictureBox Picture1 
  103.       Height          =   600
  104.       Index           =   8
  105.       Left            =   885
  106.       Picture         =   "chgicon.frx":1988
  107.       ScaleHeight     =   540
  108.       ScaleWidth      =   540
  109.       TabIndex        =   8
  110.       Top             =   1695
  111.       Visible         =   0   'False
  112.       Width           =   600
  113.    End
  114.    Begin VB.PictureBox Picture1 
  115.       Height          =   600
  116.       Index           =   7
  117.       Left            =   5085
  118.       Picture         =   "chgicon.frx":1C92
  119.       ScaleHeight     =   540
  120.       ScaleWidth      =   540
  121.       TabIndex        =   7
  122.       Top             =   1095
  123.       Visible         =   0   'False
  124.       Width           =   600
  125.    End
  126.    Begin VB.PictureBox Picture1 
  127.       Height          =   600
  128.       Index           =   6
  129.       Left            =   4485
  130.       Picture         =   "chgicon.frx":1F9C
  131.       ScaleHeight     =   540
  132.       ScaleWidth      =   540
  133.       TabIndex        =   6
  134.       Top             =   1095
  135.       Visible         =   0   'False
  136.       Width           =   600
  137.    End
  138.    Begin VB.PictureBox Picture1 
  139.       Height          =   600
  140.       Index           =   5
  141.       Left            =   3885
  142.       Picture         =   "chgicon.frx":22A6
  143.       ScaleHeight     =   540
  144.       ScaleWidth      =   540
  145.       TabIndex        =   5
  146.       Top             =   1095
  147.       Visible         =   0   'False
  148.       Width           =   600
  149.    End
  150.    Begin VB.PictureBox Picture1 
  151.       Height          =   600
  152.       Index           =   4
  153.       Left            =   3285
  154.       Picture         =   "chgicon.frx":25B0
  155.       ScaleHeight     =   540
  156.       ScaleWidth      =   540
  157.       TabIndex        =   4
  158.       Top             =   1095
  159.       Visible         =   0   'False
  160.       Width           =   600
  161.    End
  162.    Begin VB.PictureBox Picture1 
  163.       Height          =   600
  164.       Index           =   3
  165.       Left            =   2685
  166.       Picture         =   "chgicon.frx":28BA
  167.       ScaleHeight     =   540
  168.       ScaleWidth      =   540
  169.       TabIndex        =   3
  170.       Top             =   1095
  171.       Visible         =   0   'False
  172.       Width           =   600
  173.    End
  174.    Begin VB.PictureBox Picture1 
  175.       Height          =   600
  176.       Index           =   2
  177.       Left            =   2085
  178.       Picture         =   "chgicon.frx":2BC4
  179.       ScaleHeight     =   540
  180.       ScaleWidth      =   540
  181.       TabIndex        =   2
  182.       Top             =   1095
  183.       Visible         =   0   'False
  184.       Width           =   600
  185.    End
  186.    Begin VB.PictureBox Picture1 
  187.       Height          =   600
  188.       Index           =   1
  189.       Left            =   1485
  190.       Picture         =   "chgicon.frx":2ECE
  191.       ScaleHeight     =   540
  192.       ScaleWidth      =   540
  193.       TabIndex        =   1
  194.       Top             =   1095
  195.       Visible         =   0   'False
  196.       Width           =   600
  197.    End
  198.    Begin VB.PictureBox Picture1 
  199.       Height          =   600
  200.       Index           =   0
  201.       Left            =   900
  202.       Picture         =   "chgicon.frx":31D8
  203.       ScaleHeight     =   540
  204.       ScaleWidth      =   540
  205.       TabIndex        =   0
  206.       Top             =   1095
  207.       Visible         =   0   'False
  208.       Width           =   600
  209.    End
  210.    Begin VB.Timer Timer1 
  211.       Interval        =   500
  212.       Left            =   990
  213.       Top             =   495
  214.    End
  215.    Begin VB.PictureBox Picture2 
  216.       Height          =   735
  217.       Left            =   1980
  218.       ScaleHeight     =   675
  219.       ScaleWidth      =   795
  220.       TabIndex        =   16
  221.       Top             =   135
  222.       Width           =   855
  223.    End
  224. Attribute VB_Name = "Form1"
  225. Attribute VB_Creatable = False
  226. Attribute VB_Exposed = False
  227. Option Explicit
  228. Dim nPos As Integer
  229. Private Sub Form_Load()
  230.     Dim nd      As NOTIFYICONDATA
  231.     Dim nRet    As Integer
  232.     '-- Fill the nd structure.
  233.     '-- Size of the structure
  234.     nd.cbSize = Len(nd)
  235.     '-- The form's hWnd
  236.     nd.hWnd = Form1.hWnd
  237.     '-- Specify Null for the ID
  238.     nd.uID = vbNull
  239.     '-- No callback procedure
  240.     nd.uCallbackMessage = vbNull
  241.     '-- Specify the Icon
  242.     nd.hIcon = Form1.Icon
  243.     '-- Set the flags to tell Shell that we are specifying
  244.     '   the CallbackMessage, Icon, and Tip
  245.     nd.uFlags = NIF_MESSAGE Or NIF_ICON Or NIF_TIP
  246.     '-- Add the Icon
  247.     nRet = Shell_NotifyIconA(NIM_ADD, nd)
  248.     '-- Adjust the size of the form
  249.     Width = 3100
  250.     Height = 1500
  251. End Sub
  252. Private Sub Form_Unload(Cancel As Integer)
  253.     Dim nd  As NOTIFYICONDATA
  254.     Dim nRet    As Integer
  255.     '-- Size of the structure
  256.     nd.cbSize = Len(nd)
  257.     '-- The form's hWnd
  258.     nd.hWnd = Form1.hWnd
  259.     '-- Specify Null for the ID
  260.     nd.uID = vbNull
  261.     '-- No callback procedure
  262.     nd.uCallbackMessage = vbNull
  263.     '-- Set the flags to tell Shell that we are specifying
  264.     '   the CallbackMessage, Icon, and Tip
  265.     nd.uFlags = NIF_MESSAGE Or NIF_ICON Or NIF_TIP
  266.     '-- Delete the Icon
  267.     nRet = Shell_NotifyIconA(NIM_DELETE, nd)
  268. End Sub
  269. Private Sub Timer1_Timer()
  270.     Dim nd  As NOTIFYICONDATA
  271.     Dim nRet As Integer
  272.     '-- Cycle the picture and icon
  273.     Form1.Icon = Picture1(nPos).picture
  274.     Picture2.picture = Picture1(nPos).picture
  275.     nPos = nPos + 1
  276.     If nPos = 16 Then
  277.         nPos = 0
  278.     End If
  279.     '-- Size of the structure
  280.     nd.cbSize = Len(nd)
  281.     '-- The form's hWnd
  282.     nd.hWnd = Form1.hWnd
  283.     '-- Specify Null for the ID
  284.     nd.uID = vbNull
  285.     '-- No callback procedure
  286.     nd.uCallbackMessage = vbNull
  287.     '-- Specify the Icon
  288.     nd.hIcon = Form1.Icon
  289.     '-- Specify the Tip
  290.     nd.szTip = "Buzz around the World, dude." & Chr$(0)
  291.     '-- Set the flags to tell Shell that we are specifying
  292.     '   the CallbackMessage, Icon, and Tip
  293.     nd.uFlags = NIF_MESSAGE Or NIF_ICON Or NIF_TIP
  294.     '-- Update the Icon
  295.     nRet = Shell_NotifyIconA(NIM_MODIFY, nd)
  296. End Sub
  297.