home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / thrmde / thrmdemo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-01-02  |  2.8 KB  |  67 lines

  1. VERSION 2.00
  2. Begin MDIForm ThermDemo 
  3.    Caption         =   "Thermometer Demo"
  4.    ClientHeight    =   5760
  5.    ClientLeft      =   2010
  6.    ClientTop       =   2730
  7.    ClientWidth     =   8985
  8.    Height          =   6450
  9.    Left            =   1950
  10.    LinkTopic       =   "MDIForm1"
  11.    Top             =   2100
  12.    Width           =   9105
  13.    Begin Menu mFile 
  14.       Caption         =   "&File"
  15.       Begin Menu mThermDemo 
  16.          Caption         =   "Demo Thermometer"
  17.       End
  18.       Begin Menu mExit 
  19.          Caption         =   "E&xit"
  20.          Shortcut        =   ^X
  21.       End
  22.    End
  23. Option Explicit
  24. '*******************************************************
  25. '* Integrated Data Systems, Inc.                       *
  26. '* 23875 Ventura Blvd. #102                            *
  27. '* Calabasas, Ca  91302                                *
  28. '* Voice: (818)223-3344                                *
  29. '* BBS:   (818)223-3341                                *
  30. '* CIS:   73700,1622                                   *
  31. '*******************************************************
  32. '*                                                     *
  33. '*      File Name: ThrmDemo.BAS                        *
  34. '*                                                     *
  35. '*        Created: 12/23/94     By: Robert Vandehey    *
  36. '*                                                     *
  37. '*******************************************************
  38. 'This program demonstrates a wait box which displays a
  39. 'thermometer. One of the main features of this wait box
  40. 'is that it acts modal without actually declaring it as
  41. 'modal.
  42. 'In Visual Basic, once a modal form is called, all execution
  43. 'in the calling program is stopped until the form is unloaded.
  44. 'This doesn't work for wait screens since you usually want to
  45. 'display a wait screen and continue on processing.
  46. 'Visual Basic allows you to display a modeless window and continue
  47. 'processing but if the user selects another window with the
  48. 'mouse, it will change the focus of the window. Many times hiding
  49. 'the wait window.
  50. 'I looked at many other programs that tried to solve this problem
  51. 'but none of them did it effectively. This program does - at least
  52. 'in my humble opinion.
  53. 'It solves this problem by looping through all the Visual Basic
  54. 'forms in the Forms Control array and calling the Windows API
  55. 'SetWindowLong function to set the DISABLE style for each window.
  56. 'Once the wait window is no longer needed, the DISABLE style is
  57. 'removed.
  58. 'Currently this program only supports one instance of the wait form.
  59. 'It could easily support more, but I can't think of a reason why anyone
  60. 'would need more than one wait form at a time.
  61. Sub mExit_Click ()
  62.     Unload ThermDemo
  63. End Sub
  64. Sub mThermDemo_Click ()
  65.     Load form1
  66. End Sub
  67.