home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 4_2005-2006.ISO / data / Zips / Steganogra1945511132005.psc / frmMain.frm < prev   
Text File  |  2005-11-03  |  27KB  |  881 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  4. Begin VB.Form frmMain 
  5.    AutoRedraw      =   -1  'True
  6.    Caption         =   "StegaNote"
  7.    ClientHeight    =   6180
  8.    ClientLeft      =   1935
  9.    ClientTop       =   1470
  10.    ClientWidth     =   8130
  11.    FillColor       =   &H8000000A&
  12.    HelpContextID   =   1
  13.    Icon            =   "frmMain.frx":0000
  14.    LinkTopic       =   "Form1"
  15.    ScaleHeight     =   6180
  16.    ScaleWidth      =   8130
  17.    Begin VB.PictureBox picStatus 
  18.       Height          =   300
  19.       Left            =   0
  20.       ScaleHeight     =   240
  21.       ScaleWidth      =   7635
  22.       TabIndex        =   13
  23.       TabStop         =   0   'False
  24.       Top             =   4440
  25.       Width           =   7695
  26.       Begin VB.Label lblRND 
  27.          Alignment       =   1  'Right Justify
  28.          BackStyle       =   0  'Transparent
  29.          Height          =   255
  30.          Left            =   6480
  31.          TabIndex        =   15
  32.          Top             =   20
  33.          Width           =   1095
  34.       End
  35.       Begin VB.Label lblBytes 
  36.          BackStyle       =   0  'Transparent
  37.          Caption         =   "0 Bytes Text"
  38.          Height          =   255
  39.          Left            =   120
  40.          TabIndex        =   14
  41.          Top             =   20
  42.          Width           =   1695
  43.       End
  44.    End
  45.    Begin VB.PictureBox picFileContainer 
  46.       Height          =   855
  47.       Left            =   0
  48.       OLEDropMode     =   1  'Manual
  49.       ScaleHeight     =   795
  50.       ScaleWidth      =   7635
  51.       TabIndex        =   8
  52.       TabStop         =   0   'False
  53.       Top             =   3480
  54.       Width           =   7695
  55.       Begin VB.Label lblFileInfo 
  56.          BackStyle       =   0  'Transparent
  57.          Height          =   255
  58.          Left            =   960
  59.          OLEDropMode     =   1  'Manual
  60.          TabIndex        =   10
  61.          Top             =   360
  62.          Width           =   5175
  63.       End
  64.       Begin VB.Label lblFile 
  65.          BackStyle       =   0  'Transparent
  66.          Caption         =   "Drag and drop file to this field..."
  67.          Height          =   195
  68.          Left            =   960
  69.          OLEDropMode     =   1  'Manual
  70.          TabIndex        =   9
  71.          Top             =   120
  72.          Width           =   5295
  73.       End
  74.       Begin VB.Image imgIcon 
  75.          Appearance      =   0  'Flat
  76.          Height          =   585
  77.          Left            =   240
  78.          MouseIcon       =   "frmMain.frx":030A
  79.          OLEDropMode     =   1  'Manual
  80.          ToolTipText     =   " Click Icon to Open or Start this file "
  81.          Top             =   120
  82.          Width           =   480
  83.       End
  84.    End
  85.    Begin MSComDlg.CommonDialog ComDlg 
  86.       Left            =   6360
  87.       Top             =   1440
  88.       _ExtentX        =   847
  89.       _ExtentY        =   847
  90.       _Version        =   393216
  91.       CancelError     =   -1  'True
  92.    End
  93.    Begin VB.PictureBox picStegano 
  94.       Appearance      =   0  'Flat
  95.       AutoRedraw      =   -1  'True
  96.       BackColor       =   &H80000005&
  97.       BorderStyle     =   0  'None
  98.       ForeColor       =   &H80000008&
  99.       Height          =   855
  100.       Left            =   7080
  101.       ScaleHeight     =   57
  102.       ScaleMode       =   3  'Pixel
  103.       ScaleWidth      =   57
  104.       TabIndex        =   3
  105.       TabStop         =   0   'False
  106.       Top             =   5040
  107.       Visible         =   0   'False
  108.       Width           =   855
  109.    End
  110.    Begin VB.PictureBox picInfo 
  111.       Height          =   1200
  112.       Left            =   1560
  113.       ScaleHeight     =   1140
  114.       ScaleWidth      =   5835
  115.       TabIndex        =   4
  116.       TabStop         =   0   'False
  117.       Top             =   4800
  118.       Width           =   5895
  119.       Begin VB.PictureBox picProgBar 
  120.          Appearance      =   0  'Flat
  121.          AutoRedraw      =   -1  'True
  122.          ForeColor       =   &H00C00000&
  123.          Height          =   195
  124.          Left            =   120
  125.          ScaleHeight     =   165
  126.          ScaleWidth      =   1785
  127.          TabIndex        =   6
  128.          Top             =   840
  129.          Visible         =   0   'False
  130.          Width           =   1815
  131.       End
  132.       Begin VB.Label lblProgress 
  133.          BackStyle       =   0  'Transparent
  134.          Height          =   195
  135.          Left            =   120
  136.          TabIndex        =   11
  137.          Top             =   600
  138.          Width           =   2175
  139.       End
  140.       Begin VB.Label lblImageInfo 
  141.          BackStyle       =   0  'Transparent
  142.          Height          =   255
  143.          Left            =   120
  144.          TabIndex        =   7
  145.          Top             =   360
  146.          Width           =   5655
  147.       End
  148.       Begin VB.Label lblImageFile 
  149.          BackStyle       =   0  'Transparent
  150.          Caption         =   "Drag and drop carrier image into the black field..."
  151.          Height          =   200
  152.          Left            =   120
  153.          TabIndex        =   5
  154.          Top             =   120
  155.          Width           =   5655
  156.       End
  157.    End
  158.    Begin VB.PictureBox picPreview 
  159.       BackColor       =   &H00000000&
  160.       Height          =   1200
  161.       Left            =   0
  162.       OLEDropMode     =   1  'Manual
  163.       ScaleHeight     =   1140
  164.       ScaleWidth      =   1440
  165.       TabIndex        =   2
  166.       TabStop         =   0   'False
  167.       Top             =   4800
  168.       Width           =   1500
  169.       Begin VB.Image imgPreview 
  170.          Height          =   1065
  171.          Left            =   120
  172.          OLEDropMode     =   1  'Manual
  173.          Top             =   0
  174.          Width           =   1215
  175.       End
  176.    End
  177.    Begin MSComctlLib.ImageList imgList 
  178.       Left            =   6360
  179.       Top             =   720
  180.       _ExtentX        =   1005
  181.       _ExtentY        =   1005
  182.       BackColor       =   -2147483643
  183.       ImageWidth      =   16
  184.       ImageHeight     =   15
  185.       MaskColor       =   12632256
  186.       _Version        =   393216
  187.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  188.          NumListImages   =   8
  189.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  190.             Picture         =   "frmMain.frx":0614
  191.             Key             =   "clear"
  192.          EndProperty
  193.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  194.             Picture         =   "frmMain.frx":0B58
  195.             Key             =   "copy"
  196.          EndProperty
  197.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  198.             Picture         =   "frmMain.frx":109C
  199.             Key             =   "cut"
  200.          EndProperty
  201.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  202.             Picture         =   "frmMain.frx":15E0
  203.             Key             =   "paste"
  204.          EndProperty
  205.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  206.             Picture         =   "frmMain.frx":1B24
  207.             Key             =   "print"
  208.          EndProperty
  209.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  210.             Picture         =   "frmMain.frx":2068
  211.             Key             =   "read"
  212.          EndProperty
  213.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  214.             Picture         =   "frmMain.frx":25AC
  215.             Key             =   "write"
  216.          EndProperty
  217.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  218.             Picture         =   "frmMain.frx":2AF0
  219.             Key             =   "undo"
  220.          EndProperty
  221.       EndProperty
  222.    End
  223.    Begin MSComctlLib.Toolbar Toolbar1 
  224.       Align           =   1  'Align Top
  225.       Height          =   345
  226.       Left            =   0
  227.       TabIndex        =   0
  228.       Top             =   0
  229.       Width           =   8130
  230.       _ExtentX        =   14340
  231.       _ExtentY        =   609
  232.       ButtonWidth     =   609
  233.       ButtonHeight    =   556
  234.       AllowCustomize  =   0   'False
  235.       Appearance      =   1
  236.       Style           =   1
  237.       ImageList       =   "imgList"
  238.       _Version        =   393216
  239.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  240.          NumButtons      =   11
  241.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  242.             Key             =   "new"
  243.             Description     =   "clear image and text "
  244.             Object.ToolTipText     =   " New Image And Text "
  245.             ImageKey        =   "clear"
  246.          EndProperty
  247.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  248.             Enabled         =   0   'False
  249.             Key             =   "read"
  250.             Description     =   "read data"
  251.             Object.ToolTipText     =   " Read Data From Image"
  252.             ImageKey        =   "read"
  253.          EndProperty
  254.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  255.             Enabled         =   0   'False
  256.             Key             =   "write"
  257.             Description     =   "write data"
  258.             Object.ToolTipText     =   " Write Data To Image "
  259.             ImageKey        =   "write"
  260.          EndProperty
  261.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  262.             Style           =   3
  263.          EndProperty
  264.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  265.             Key             =   "print"
  266.             Description     =   "Print"
  267.             Object.ToolTipText     =   " Print "
  268.             ImageKey        =   "print"
  269.          EndProperty
  270.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  271.             Style           =   3
  272.             Object.Width           =   1e-4
  273.          EndProperty
  274.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  275.             Key             =   "cut"
  276.             Description     =   "Cut"
  277.             Object.ToolTipText     =   " Cut "
  278.             ImageKey        =   "cut"
  279.          EndProperty
  280.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  281.             Key             =   "copy"
  282.             Description     =   "Copy"
  283.             Object.ToolTipText     =   " Copy "
  284.             ImageKey        =   "copy"
  285.          EndProperty
  286.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  287.             Key             =   "paste"
  288.             Description     =   "Paste"
  289.             Object.ToolTipText     =   " Paste "
  290.             ImageKey        =   "paste"
  291.          EndProperty
  292.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  293.             Key             =   "undo"
  294.             Description     =   "Undo"
  295.             Object.ToolTipText     =   " Undo "
  296.             ImageKey        =   "undo"
  297.          EndProperty
  298.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  299.             Style           =   4
  300.             Object.Width           =   1e-4
  301.          EndProperty
  302.       EndProperty
  303.       BorderStyle     =   1
  304.    End
  305.    Begin VB.TextBox txtMain 
  306.       BackColor       =   &H00FFFFFF&
  307.       BeginProperty Font 
  308.          Name            =   "Courier New"
  309.          Size            =   9
  310.          Charset         =   0
  311.          Weight          =   400
  312.          Underline       =   0   'False
  313.          Italic          =   0   'False
  314.          Strikethrough   =   0   'False
  315.       EndProperty
  316.       ForeColor       =   &H00404040&
  317.       Height          =   3015
  318.       HideSelection   =   0   'False
  319.       Left            =   0
  320.       MaxLength       =   32000
  321.       MultiLine       =   -1  'True
  322.       OLEDragMode     =   1  'Automatic
  323.       OLEDropMode     =   2  'Automatic
  324.       ScrollBars      =   3  'Both
  325.       TabIndex        =   1
  326.       TabStop         =   0   'False
  327.       Top             =   360
  328.       Width           =   8175
  329.    End
  330.    Begin VB.Label Label1 
  331.       Alignment       =   1  'Right Justify
  332.       BackStyle       =   0  'Transparent
  333.       BorderStyle     =   1  'Fixed Single
  334.       Caption         =   "Label1"
  335.       Height          =   195
  336.       Left            =   0
  337.       TabIndex        =   12
  338.       Top             =   0
  339.       Width           =   3375
  340.    End
  341.    Begin VB.Menu mnuImage 
  342.       Caption         =   "&Image"
  343.       WindowList      =   -1  'True
  344.       Begin VB.Menu mnuSelectImage 
  345.          Caption         =   "&Select..."
  346.       End
  347.       Begin VB.Menu mnuRead 
  348.          Caption         =   "&Read..."
  349.       End
  350.       Begin VB.Menu mnuWrite 
  351.          Caption         =   "&Write..."
  352.       End
  353.       Begin VB.Menu ln4 
  354.          Caption         =   "-"
  355.       End
  356.       Begin VB.Menu mnuErase 
  357.          Caption         =   "&Erase..."
  358.       End
  359.       Begin VB.Menu lijn1 
  360.          Caption         =   "-"
  361.       End
  362.       Begin VB.Menu mnuPageSetup 
  363.          Caption         =   "Print Set&up..."
  364.       End
  365.       Begin VB.Menu mnuPrint 
  366.          Caption         =   "&Print"
  367.          Shortcut        =   ^P
  368.       End
  369.       Begin VB.Menu ln3 
  370.          Caption         =   "-"
  371.       End
  372.       Begin VB.Menu mnuExit 
  373.          Caption         =   "E&xit"
  374.       End
  375.    End
  376.    Begin VB.Menu mnuEdit 
  377.       Caption         =   "&Edit"
  378.       Begin VB.Menu mnuUndo 
  379.          Caption         =   "&Undo"
  380.       End
  381.       Begin VB.Menu lijn4 
  382.          Caption         =   "-"
  383.       End
  384.       Begin VB.Menu mnuCut 
  385.          Caption         =   "Cu&t"
  386.       End
  387.       Begin VB.Menu mnuCopy 
  388.          Caption         =   "&Copy"
  389.       End
  390.       Begin VB.Menu mnuPaste 
  391.          Caption         =   "&Paste"
  392.       End
  393.       Begin VB.Menu mnuDelete 
  394.          Caption         =   "&Delete"
  395.       End
  396.       Begin VB.Menu lijn9 
  397.          Caption         =   "-"
  398.       End
  399.       Begin VB.Menu mnuSelectAll 
  400.          Caption         =   "Select &All"
  401.       End
  402.       Begin VB.Menu mnuCopyAll 
  403.          Caption         =   "All to Clip&board"
  404.       End
  405.       Begin VB.Menu mnuClear 
  406.          Caption         =   "Clea&r"
  407.          Begin VB.Menu mnuClearAll 
  408.             Caption         =   "&All"
  409.          End
  410.          Begin VB.Menu mnuClearText 
  411.             Caption         =   "&Text"
  412.          End
  413.          Begin VB.Menu mnuClearFile 
  414.             Caption         =   "&File"
  415.          End
  416.          Begin VB.Menu mnuClearImage 
  417.             Caption         =   "&Carrier Image"
  418.          End
  419.       End
  420.       Begin VB.Menu ln6 
  421.          Caption         =   "-"
  422.       End
  423.       Begin VB.Menu mnuInsertFile 
  424.          Caption         =   "&Insert File.."
  425.       End
  426.    End
  427.    Begin VB.Menu mnuHelpa 
  428.       Caption         =   "&Help"
  429.       Begin VB.Menu mnuHelp 
  430.          Caption         =   "&Help Topics"
  431.       End
  432.       Begin VB.Menu lijn12 
  433.          Caption         =   "-"
  434.       End
  435.       Begin VB.Menu mnuAbout 
  436.          Caption         =   "&About"
  437.       End
  438.    End
  439. End
  440. Attribute VB_Name = "frmMain"
  441. Attribute VB_GlobalNameSpace = False
  442. Attribute VB_Creatable = False
  443. Attribute VB_PredeclaredId = True
  444. Attribute VB_Exposed = False
  445.  
  446.  
  447. '------------------------ MENUS --------------------------------
  448.  
  449. Private Sub mnuClearAll_Click()
  450. If gblnTextHasChanged = True Then
  451.     retVal = MsgBox("The changes to the text are not saved." & vbCrLfLf & "Do you want to clear image and text anyway?", vbQuestion + vbYesNo)
  452.     If retVal = vbNo Then Exit Sub
  453.     End If
  454. gstrImageName = ""
  455. gstrFileName = ""
  456. gstrActiveKey = ""
  457. gblnTextHasChanged = False
  458. With Me
  459.     .txtMain.Text = ""
  460.     .imgPreview.Picture = Nothing
  461.     .lblImageFile.Caption = "Drag and drop carrier image into the black field..."
  462.     .lblImageInfo.Caption = ""
  463.     .imgIcon.Picture = Nothing
  464. End With
  465. Call GetFile
  466. Call CheckMenus
  467. End Sub
  468.  
  469. Private Sub mnuClearFile_Click()
  470. gstrFileName = ""
  471. Call GetFile
  472. End Sub
  473.  
  474. Private Sub mnuClearImage_Click()
  475. gstrImageName = ""
  476. Call GetImage
  477. End Sub
  478.  
  479. Private Sub mnuClearText_Click()
  480. If gblnTextHasChanged = True Then
  481.     retVal = MsgBox("The changes to the text are not saved." & vbCrLfLf & "Do you want to clear the text anyway?", vbQuestion + vbYesNo)
  482.     If retVal = vbNo Then Exit Sub
  483.     End If
  484. Me.txtMain.Text = ""
  485. End Sub
  486.  
  487. Private Sub mnuErase_Click()
  488. If gstrImageName = "" Then Exit Sub
  489. retVal = MsgBox("Are you sure you want to erase all data in """ & CutFilePath(gstrImageName) & """ ?", vbYesNo + vbExclamation)
  490. If retVal = vbNo Then Exit Sub
  491. Me.picProgBar.Visible = True
  492. Call ControlsBlock
  493. Call EraseImage
  494. Me.picProgBar.Visible = False
  495. Call ControlsFree
  496. End Sub
  497.  
  498. Private Sub mnuInsertFile_Click()
  499. Dim fName As String
  500. On Error Resume Next
  501. With frmMain.ComDlg
  502. .DialogTitle = "Insert File..."
  503. .Flags = CMDLG_FILEMUSTEXIST Or CMDLG_NOCHECK
  504. .FileName = ""
  505. .InitDir = gstrCurDir
  506. .Filter = "All Files (*.*)|*.*"
  507. .ShowOpen
  508. If Err = 32755 Then Exit Sub
  509. gstrFileName = .FileName
  510. End With
  511. Call GetFile
  512. End Sub
  513.  
  514. Private Sub mnuRead_Click()
  515. If gstrImageName = "" Then Exit Sub
  516. frmRead.Show (vbModal)
  517. If gstrActiveKey = "" Or gblnCancelKey = True Then Exit Sub
  518. Me.picProgBar.Visible = True
  519. Me.lblProgress.Caption = "Reading data..."
  520. Call ControlsBlock
  521. Call LoadDataPicture
  522. Me.picProgBar.Visible = False
  523. Me.lblProgress.Caption = ""
  524. Call ControlsFree
  525. End Sub
  526.  
  527. Private Sub mnuSelectImage_Click()
  528. Dim fName As String
  529. On Error Resume Next
  530. With frmMain.ComDlg
  531. .DialogTitle = "Select Carrier Image..."
  532. .Flags = CMDLG_FILEMUSTEXIST Or CMDLG_NOCHECK
  533. .FileName = ""
  534. .InitDir = gstrCurDir
  535. .Filter = "Image Files (*.bmp;*.jpg;*.gif)|*.bmp;*.jpg;*.gif"
  536. .ShowOpen
  537. If Err = 32755 Then Exit Sub
  538. gstrImageName = .FileName
  539. End With
  540. Call GetImage
  541. End Sub
  542.  
  543. Private Sub mnuWrite_Click()
  544. If gstrImageName = "" Then Exit Sub
  545. frmWrite.Show (vbModal)
  546. If gstrActiveKey = "" Or gblnCancelKey = True Then Exit Sub
  547. Me.picProgBar.Visible = True
  548. Me.lblProgress.Caption = "Writing data..."
  549. Call ControlsBlock
  550. Call SaveDataPicture
  551. Me.lblProgress.Caption = ""
  552. Me.picProgBar.Visible = False
  553. Call ControlsFree
  554. End Sub
  555.  
  556. Private Sub mnuAbout_Click()
  557. frmAbout.Show (vbModal)
  558. End Sub
  559.  
  560. Private Sub mnuExit_Click()
  561. Unload Me
  562. End Sub
  563.  
  564. Private Sub mnuHelp_Click()
  565. Call ShowHelpFile("")
  566. End Sub
  567.  
  568. Private Sub mnuPageSetup_Click()
  569. frmPrintSetup.Show (vbModal)
  570. End Sub
  571.  
  572. Private Sub mnuPrint_Click()
  573. If gblnPrinterPresent = False Then Exit Sub
  574. frmPrintProgress.Show (vbModal)
  575. End Sub
  576.  
  577. Private Sub mnuCut_Click()
  578. SendKeys "^{x}"
  579. frmMain.Refresh
  580. Exit Sub
  581. Clipboard.SetText Me.txtMain.SelText
  582. Me.txtMain.SelText = ""
  583. frmMain.Refresh
  584. Call CheckMenus
  585. End Sub
  586.  
  587. Private Sub mnuCopy_Click()
  588. 'SendKeys "^{c}"
  589. Clipboard.SetText Me.txtMain.SelText
  590. frmMain.Refresh
  591. Call CheckMenus
  592. End Sub
  593.  
  594. Private Sub mnuPaste_Click()
  595. SendKeys "^{v}"
  596. frmMain.Refresh
  597. Call CheckMenus
  598. End Sub
  599.  
  600. Private Sub mnuDelete_Click()
  601. SendKeys "{del}"
  602. frmMain.Refresh
  603. Call CheckMenus
  604. End Sub
  605.  
  606. Private Sub mnuUndo_Click()
  607. SendKeys "^{z}"
  608. frmMain.Refresh
  609. Call CheckMenus
  610. End Sub
  611.  
  612. Private Sub mnuSelectAll_Click()
  613. frmMain.txtMain.SelStart = 0
  614. frmMain.txtMain.SelLength = Len(frmMain.txtMain.Text)
  615. Call CheckMenus
  616. End Sub
  617.  
  618. Private Sub mnuCopyAll_Click()
  619. Clipboard.Clear
  620. Clipboard.SetText frmMain.txtMain
  621. Call CheckMenus
  622. End Sub
  623.  
  624.  
  625. Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
  626. 'test buttons toolbar
  627. Select Case Button.Key
  628. Case "new"
  629.     mnuClearAll_Click
  630. Case "read"
  631.     mnuRead_Click
  632. Case "write"
  633.     mnuWrite_Click
  634. Case "print"
  635.     mnuPrint_Click
  636. Case "cut"
  637.     mnuCut_Click
  638. Case "copy"
  639.     mnuCopy_Click
  640. Case "paste"
  641.     mnuPaste_Click
  642. Case "undo"
  643.     SendKeys "^{z}"
  644.     frmMain.Refresh
  645. End Select
  646. Call CheckMenus
  647. End Sub
  648.  
  649. '------------------------------------------------------------------
  650.  
  651. Private Sub imgIcon_Click()
  652. 'run, open or start file
  653. If gstrFileName <> "" Then StartFile (gstrFileName)
  654. End Sub
  655.  
  656. Private Sub picInfo_GotFocus()
  657. If Me.txtMain.Enabled = True And Me.txtMain.Visible = True Then Me.txtMain.SetFocus
  658. End Sub
  659.  
  660. Private Sub picFileContainer_GotFocus()
  661. If Me.txtMain.Enabled = True And Me.txtMain.Visible = True Then Me.txtMain.SetFocus
  662. End Sub
  663.  
  664. Private Sub picPreview_GotFocus()
  665. If Me.txtMain.Enabled = True And Me.txtMain.Visible = True Then Me.txtMain.SetFocus
  666. End Sub
  667.  
  668. Private Sub picStatus_GotFocus()
  669. If Me.txtMain.Enabled = True And Me.txtMain.Visible = True Then Me.txtMain.SetFocus
  670. End Sub
  671.  
  672. Private Sub txtMain_Change()
  673. gblnTextHasChanged = True
  674. Me.lblBytes.Caption = Format(Len(Me.txtMain), "###,##0") & " Bytes Text"
  675. End Sub
  676.  
  677. Private Sub txtMain_KeyDown(KeyCode As Integer, Shift As Integer)
  678. Call CheckMenus
  679. End Sub
  680.  
  681. Private Sub txtMain_KeyUp(KeyCode As Integer, Shift As Integer)
  682. Call CheckMenus
  683. End Sub
  684.  
  685. Private Sub txtMain_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
  686. Call CheckMenus
  687. End Sub
  688.  
  689. Private Sub txtMain_KeyPress(KeyAscii As Integer)
  690. Dim a As String
  691. 'controle input textbox
  692. Call CheckMenus
  693. If KeyAscii = 1 Then ' ctrl+A = select all
  694.     frmMain.txtMain.SelStart = 0
  695.     frmMain.txtMain.SelLength = Len(frmMain.txtMain)
  696.     KeyAscii = 0
  697. End If
  698. If Len(frmMain.txtMain.Text) > 31999 Then
  699.     Select Case KeyAscii
  700.     Case 3, 8, 24
  701.         'allow deleting and stuff
  702.     Case Else
  703.         KeyAscii = 0
  704.         'Maximum lenghte text reached
  705.         MsgBox "Maximum lenght of text is reached.", vbExclamation
  706.         Exit Sub
  707.     End Select
  708.     End If
  709. End Sub
  710.  
  711. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  712. 'cancel write or read process
  713. If KeyCode = 27 Then gblnCancelProcces = True
  714. End Sub
  715.  
  716. Private Sub Form_Resize()
  717. Call ChangeWindowSize
  718. End Sub
  719.  
  720. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  721. 'if running, cancel exit
  722. If gblnIsRunning = True Then Cancel = True: Exit Sub
  723. 'warn if text is changed
  724. If gblnTextHasChanged = True Then
  725.     retVal = MsgBox("The changes to the text are not saved." & vbCrLfLf & "Do you want to close the program anyway?", vbQuestion + vbYesNo)
  726.     If retVal = vbNo Then Cancel = True: Exit Sub
  727.     End If
  728. Call SaveWindowPos
  729. Unload frmAbout
  730. Unload frmRead
  731. Unload frmWrite
  732. Unload frmPrintProgress
  733. Unload frmPrintSetup
  734. Clipboard.Clear
  735. End
  736. End Sub
  737.  
  738. '------------------------ Get rnd seed values ----------------------------
  739.  
  740. Private Sub txtMain_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  741. Call RandomFeed(x, y)
  742. End Sub
  743.  
  744. Private Sub Toolbar1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  745. Call RandomFeed(x, y)
  746. End Sub
  747.  
  748. Private Sub imgPreview_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  749. Call RandomFeed(x, y)
  750. End Sub
  751.  
  752. Private Sub picFileContainer_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  753. Call RandomFeed(x, y)
  754. End Sub
  755.  
  756. Private Sub picInfo_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  757. Call RandomFeed(x, y)
  758. End Sub
  759.  
  760. '------------------------ Drag and Drop----------------------------
  761.  
  762. Private Sub imgIcon_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
  763. Dim tmpFile As String
  764. If Not Data.GetFormat(vbCFFiles) Then Exit Sub
  765. gstrFileName = Data.Files(1)
  766. Call GetFile
  767. End Sub
  768.  
  769. Private Sub imgIcon_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)
  770. Dim tmp As String
  771. If Data.GetFormat(vbCFFiles) Then
  772.     Effect = vbDropEffectCopy
  773.     Else
  774.     Effect = vbDropEffectNone
  775.     End If
  776. End Sub
  777.  
  778. Private Sub picFileContainer_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
  779. Dim tmpFile As String
  780. If Not Data.GetFormat(vbCFFiles) Then Exit Sub
  781. gstrFileName = Data.Files(1)
  782. Call GetFile
  783. End Sub
  784.  
  785. Private Sub picFileContainer_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)
  786. Dim tmp As String
  787. If Data.GetFormat(vbCFFiles) Then
  788.     Effect = vbDropEffectCopy
  789.     Else
  790.     Effect = vbDropEffectNone
  791.     End If
  792. End Sub
  793.  
  794. Private Sub lblFile_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
  795. Dim tmpFile As String
  796. If Not Data.GetFormat(vbCFFiles) Then Exit Sub
  797. gstrFileName = Data.Files(1)
  798. Call GetFile
  799. End Sub
  800.  
  801. Private Sub lblFile_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)
  802. Dim tmp As String
  803. If Data.GetFormat(vbCFFiles) Then
  804.     Effect = vbDropEffectCopy
  805.     Else
  806.     Effect = vbDropEffectNone
  807.     End If
  808. End Sub
  809.  
  810. Private Sub lblFileInfo_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
  811. Dim tmpFile As String
  812. If Not Data.GetFormat(vbCFFiles) Then Exit Sub
  813. gstrFileName = Data.Files(1)
  814. Call GetFile
  815. End Sub
  816.  
  817. Private Sub lblFileInfo_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)
  818. Dim tmp As String
  819. If Data.GetFormat(vbCFFiles) Then
  820.     Effect = vbDropEffectCopy
  821.     Else
  822.     Effect = vbDropEffectNone
  823.     End If
  824. End Sub
  825.  
  826. Private Sub imgPreview_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
  827. Dim tmpFile As String
  828. If Not Data.GetFormat(vbCFFiles) Then Exit Sub
  829. gstrImageName = Data.Files(1)
  830. Call GetImage
  831. End Sub
  832.  
  833. Private Sub imgPreview_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)
  834. Dim tmp As String
  835. If Data.GetFormat(vbCFFiles) Then tmp = Right(Data.Files(1), 4)
  836. If tmp = ".bmp" Or tmp = ".jpg" Or tmp = ".gif" Then
  837.     Effect = vbDropEffectCopy
  838.     Else
  839.     Effect = vbDropEffectNone
  840.     End If
  841. End Sub
  842.  
  843. Private Sub picPreview_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
  844. Dim tmpFile As String
  845. If Not Data.GetFormat(vbCFFiles) Then Exit Sub
  846. gstrImageName = Data.Files(1)
  847. Call GetImage
  848. End Sub
  849.  
  850. Private Sub picPreview_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)
  851. Dim tmp As String
  852. If Data.GetFormat(vbCFFiles) Then tmp = Right(Data.Files(1), 4)
  853. If tmp = ".bmp" Or tmp = ".jpg" Or tmp = ".gif" Then
  854.     Effect = vbDropEffectCopy
  855.     Else
  856.     Effect = vbDropEffectNone
  857.     End If
  858. End Sub
  859.  
  860. '------------------- Set Carrier Image Preview --------------------
  861.  
  862. Private Sub GetImage()
  863. Dim picFactor
  864. Dim x
  865. Dim y
  866. On Error GoTo errHandle
  867.  
  868. Screen.MousePointer = 11
  869.  
  870. With frmMain
  871. 'set image
  872. .picStegano.AutoSize = True
  873. .picStegano..bmp;*.jpg'
  874. End Sub
  875.  
  876. '-------- vbutoSize = True
  877. .6Mat----=6)|*Pf Data.GetFormat(vbC0e, State As Integer)
  878. Dim tmp Asx}u0=ragOver( Butty As Single, State As Integer)
  879. Dim tmp As String
  880. If Datj,8  String
  881. Ifas Effec