home *** CD-ROM | disk | FTP | other *** search
/ On Hand / On_Hand_From_Softbank_1994_Release_2_Disc_2_1994.iso / 00202 / s / disk3 / inkfrm.fr_ / inkfrm.bin
Text File  |  1993-04-28  |  7KB  |  223 lines

  1. VERSION 2.00
  2. Begin Form InkFrm 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Storage and Retrival of INK"
  6.    ControlBox      =   0   'False
  7.    Height          =   6045
  8.    Left            =   240
  9.    LinkMode        =   1  'Source
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   5640
  12.    ScaleWidth      =   9015
  13.    Top             =   270
  14.    Width           =   9135
  15.    Begin InkOnBitmap IOB1 
  16.       AutoSize        =   2  'Adjust Window Size to Picture
  17.       BackColor       =   &H00FFFFFF&
  18.       Height          =   1575
  19.       InkColor        =   &H00000000&
  20.       Left            =   300
  21.       TabIndex        =   12
  22.       Top             =   1200
  23.       Version         =   268435458
  24.       Width           =   6615
  25.    End
  26.    Begin PictureBox Picture1 
  27.       BackColor       =   &H00C0C0C0&
  28.       Height          =   855
  29.       Index           =   0
  30.       Left            =   120
  31.       ScaleHeight     =   825
  32.       ScaleWidth      =   8745
  33.       TabIndex        =   6
  34.       TabStop         =   0   'False
  35.       Top             =   120
  36.       Width           =   8775
  37.       Begin Label Label1 
  38.          Alignment       =   2  'Center
  39.          BackColor       =   &H00C0C0C0&
  40.          Caption         =   "Ink can saved and restored from memory or a file.  The InkDataString property of an InkOnBitmap control is used to manipulate the ink."
  41.          FontBold        =   -1  'True
  42.          FontItalic      =   0   'False
  43.          FontName        =   "MS Sans Serif"
  44.          FontSize        =   12
  45.          FontStrikethru  =   0   'False
  46.          FontUnderline   =   0   'False
  47.          ForeColor       =   &H00000000&
  48.          Height          =   615
  49.          Index           =   0
  50.          Left            =   120
  51.          TabIndex        =   7
  52.          Top             =   120
  53.          Width           =   8535
  54.       End
  55.    End
  56.    Begin CommandButton EraseInk 
  57.       Caption         =   "Erase INK"
  58.       Height          =   1575
  59.       Left            =   7080
  60.       TabIndex        =   0
  61.       Top             =   1200
  62.       Width           =   1575
  63.    End
  64.    Begin PictureBox Picture4 
  65.       BackColor       =   &H00C0C0C0&
  66.       Height          =   855
  67.       Left            =   300
  68.       ScaleHeight     =   825
  69.       ScaleWidth      =   8325
  70.       TabIndex        =   8
  71.       TabStop         =   0   'False
  72.       Top             =   2880
  73.       Width           =   8355
  74.       Begin CommandButton SaveMem 
  75.          Caption         =   "Save Ink in Memory"
  76.          Height          =   555
  77.          Left            =   3060
  78.          TabIndex        =   1
  79.          Top             =   120
  80.          Width           =   2355
  81.       End
  82.       Begin CommandButton RestoreMem 
  83.          Caption         =   "Restore Ink from Memory"
  84.          Height          =   555
  85.          Left            =   5640
  86.          TabIndex        =   2
  87.          Top             =   120
  88.          Width           =   2355
  89.       End
  90.       Begin Label Label1 
  91.          BackColor       =   &H00C0C0C0&
  92.          Caption         =   "Scribble on the InkOnBitmap above and then try saving and restoring the INK."
  93.          ForeColor       =   &H00000000&
  94.          Height          =   615
  95.          Index           =   1
  96.          Left            =   240
  97.          TabIndex        =   10
  98.          Top             =   120
  99.          Width           =   2535
  100.       End
  101.    End
  102.    Begin PictureBox Picture5 
  103.       BackColor       =   &H00C0C0C0&
  104.       Height          =   1095
  105.       Left            =   300
  106.       ScaleHeight     =   1065
  107.       ScaleWidth      =   8325
  108.       TabIndex        =   9
  109.       TabStop         =   0   'False
  110.       Top             =   3840
  111.       Width           =   8355
  112.       Begin CommandButton SaveDisk 
  113.          Caption         =   "Save Ink to Disk"
  114.          Height          =   555
  115.          Left            =   3060
  116.          TabIndex        =   3
  117.          Top             =   240
  118.          Width           =   2355
  119.       End
  120.       Begin CommandButton RestoreDisk 
  121.          Caption         =   "Restore Ink from Disk"
  122.          Height          =   555
  123.          Left            =   5640
  124.          TabIndex        =   4
  125.          Top             =   240
  126.          Width           =   2355
  127.       End
  128.       Begin Label Label1 
  129.          BackColor       =   &H00C0C0C0&
  130.          Caption         =   "The ink will be saved to file INK.OUT in the default directory.  It is automatically saved in compressed format."
  131.          ForeColor       =   &H00000000&
  132.          Height          =   855
  133.          Index           =   2
  134.          Left            =   240
  135.          TabIndex        =   11
  136.          Top             =   120
  137.          Width           =   2535
  138.       End
  139.    End
  140.    Begin CommandButton Command5 
  141.       Caption         =   "Return to Main Menu"
  142.       FontBold        =   -1  'True
  143.       FontItalic      =   0   'False
  144.       FontName        =   "MS Sans Serif"
  145.       FontSize        =   9.75
  146.       FontStrikethru  =   0   'False
  147.       FontUnderline   =   0   'False
  148.       Height          =   435
  149.       Left            =   120
  150.       TabIndex        =   5
  151.       Top             =   5100
  152.       Width           =   8715
  153.    End
  154. End
  155.  
  156.  
  157. Dim szGlobalInkData$
  158.  
  159. Sub Command5_Click ()
  160.     MainFrm.Show
  161.     InkFrm.Hide
  162. End Sub
  163.  
  164. Sub EraseInk_Click ()
  165.     IOB1.EraseInk = True
  166. End Sub
  167.  
  168. Sub RestoreDisk_Click ()
  169.     Dim lSize As Long       'Size of Ink as a long
  170.     Dim szBuffer$           'Buffer to hold ink when we get it from disk
  171.  
  172.     ' --- Open the File and Get the data
  173.  
  174.     On Error GoTo FileErr1
  175.     Open "ink.out" For Binary Access Read As #1
  176.     Get #1, , lSize
  177.     szBuffer$ = String$(lSize, 0)
  178.     Get #1, , szBuffer$
  179.     Close #1
  180.  
  181.     IOB1.InkDataString = szBuffer$  ' Now assign ink to Control
  182.     Exit Sub
  183.  
  184. FileErr1:
  185.     MsgBox "FileErr: " + Error$
  186.     Exit Sub
  187. End Sub
  188.  
  189. Sub RestoreMem_Click ()
  190.     On Error Resume Next
  191.     IOB1.InkDataString = szGlobalInkData$
  192. End Sub
  193.  
  194. Sub SaveDisk_Click ()
  195.     Dim lSize As Long     'Size of the Ink
  196.     Dim szBuffer$         'Buffer to hold the ink temporarily before writing to disk
  197.  
  198.     szBuffer$ = IOB1.InkDataString
  199.     lSize = Len(szBuffer$)
  200.  
  201.     Rem --- The Buffer can now be saved to a file
  202.  
  203.     On Error Resume Next
  204.     Kill "ink.out"                  'Erase the old file
  205.     On Error GoTo FileErr
  206.     Open "ink.out" For Binary Access Write As #1
  207.     Put #1, , lSize                 'Save Size Information
  208.     Put #1, , szBuffer$             'Save Ink
  209.     Close #1
  210.  
  211.     MsgBox "Saved" + Str$(lSize) + " bytes of data to 'ink.out' file", 64
  212.     Exit Sub
  213.  
  214. FileErr:
  215.     MsgBox "FileErr: " + Error$
  216.     Exit Sub
  217. End Sub
  218.  
  219. Sub SaveMem_Click ()
  220.     szGlobalInkData$ = IOB1.InkDataString
  221. End Sub
  222.  
  223.