home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Programmer'…arterly (Limited Edition) / Visual_Basic_Programmers_Journal_VB-CD_Quarterly_Limited_Edition_1995.iso / code / ch18code / cansend.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-14  |  3.0 KB  |  92 lines

  1. VERSION 4.00
  2. Begin VB.Form Form2 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "MSComm Terminal"
  5.    ClientHeight    =   1296
  6.    ClientLeft      =   1776
  7.    ClientTop       =   2892
  8.    ClientWidth     =   5220
  9.    ControlBox      =   0   'False
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   400
  14.       size            =   7.8
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    Height          =   1656
  20.    Left            =   1728
  21.    LinkTopic       =   "Form2"
  22.    MaxButton       =   0   'False
  23.    MinButton       =   0   'False
  24.    ScaleHeight     =   1296
  25.    ScaleWidth      =   5220
  26.    Top             =   2580
  27.    Width           =   5316
  28.    Begin VB.CommandButton Command1 
  29.       Cancel          =   -1  'True
  30.       Caption         =   "Cancel"
  31.       BeginProperty Font 
  32.          name            =   "MS Sans Serif"
  33.          charset         =   0
  34.          weight          =   400
  35.          size            =   7.8
  36.          underline       =   0   'False
  37.          italic          =   0   'False
  38.          strikethrough   =   0   'False
  39.       EndProperty
  40.       Height          =   372
  41.       Left            =   2160
  42.       TabIndex        =   1
  43.       Top             =   840
  44.       Width           =   972
  45.    End
  46.    Begin VB.Label Label1 
  47.       BeginProperty Font 
  48.          name            =   "MS Sans Serif"
  49.          charset         =   0
  50.          weight          =   400
  51.          size            =   7.8
  52.          underline       =   0   'False
  53.          italic          =   0   'False
  54.          strikethrough   =   0   'False
  55.       EndProperty
  56.       Height          =   492
  57.       Left            =   120
  58.       TabIndex        =   0
  59.       Top             =   120
  60.       Width           =   4932
  61.    End
  62. Attribute VB_Name = "Form2"
  63. Attribute VB_Creatable = False
  64. Attribute VB_Exposed = False
  65. '*************************************************
  66. ' CANSEND.FRM is a dialog box that allows the user
  67. ' to cancel a "Transmit Text File" operation.  This
  68. ' is a modeless form that acts modal while allowing
  69. ' other processes to continue.
  70. '*************************************************
  71. DefInt A-Z
  72. Option Explicit
  73. #If Win32 Then
  74.     Private Declare Sub SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
  75. #Else
  76.     Private Declare Sub SetWindowPos Lib "USER" (ByVal hWnd%, ByVal hWndInsertAfter%, ByVal X%, ByVal Y%, ByVal cx%, ByVal cy%, ByVal wFlags%)
  77. #End If
  78. Const SWP_NOMOVE = &H2
  79. Const SWP_NOSIZE = &H1
  80. Private Sub Command1_Click()
  81.    CancelSend = True
  82. End Sub
  83. Private Sub Form_Activate()
  84.    ' Make this form a floating window that is always on top.
  85.    SetWindowPos hWnd, -1, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
  86. End Sub
  87. Private Sub Form_Deactivate()
  88.    If Not CancelSend Then
  89.       Form2.Show
  90.    End If
  91. End Sub
  92.