home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Java Apple24334892001.psc / JACE / frmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-08-01  |  13.1 KB  |  375 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.    Caption         =   "Untitled - JACE"
  6.    ClientHeight    =   9510
  7.    ClientLeft      =   2400
  8.    ClientTop       =   885
  9.    ClientWidth     =   10695
  10.    Icon            =   "frmMain.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   9510
  13.    ScaleWidth      =   10695
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin MSComDlg.CommonDialog saveJava 
  16.       Left            =   8760
  17.       Top             =   3120
  18.       _ExtentX        =   847
  19.       _ExtentY        =   847
  20.       _Version        =   393216
  21.    End
  22.    Begin MSComDlg.CommonDialog openJava 
  23.       Left            =   9360
  24.       Top             =   3120
  25.       _ExtentX        =   847
  26.       _ExtentY        =   847
  27.       _Version        =   393216
  28.    End
  29.    Begin MSComctlLib.ImageList ImageList1 
  30.       Left            =   8760
  31.       Top             =   1800
  32.       _ExtentX        =   1005
  33.       _ExtentY        =   1005
  34.       BackColor       =   -2147483643
  35.       ImageWidth      =   16
  36.       ImageHeight     =   16
  37.       MaskColor       =   12632256
  38.       _Version        =   393216
  39.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  40.          NumListImages   =   10
  41.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  42.             Picture         =   "frmMain.frx":0ABA
  43.             Key             =   "new"
  44.          EndProperty
  45.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  46.             Picture         =   "frmMain.frx":0C82
  47.             Key             =   "open"
  48.          EndProperty
  49.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  50.             Picture         =   "frmMain.frx":0D82
  51.             Key             =   "save"
  52.          EndProperty
  53.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  54.             Picture         =   "frmMain.frx":0E6E
  55.             Key             =   "print"
  56.          EndProperty
  57.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  58.             Picture         =   "frmMain.frx":0FB2
  59.             Key             =   "cut"
  60.          EndProperty
  61.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  62.             Picture         =   "frmMain.frx":125A
  63.             Key             =   "copy"
  64.          EndProperty
  65.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  66.             Picture         =   "frmMain.frx":1396
  67.             Key             =   "paste"
  68.          EndProperty
  69.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  70.             Picture         =   "frmMain.frx":14DE
  71.             Key             =   "viewbrowser"
  72.          EndProperty
  73.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  74.             Picture         =   "frmMain.frx":16BA
  75.             Key             =   "find"
  76.          EndProperty
  77.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  78.             Picture         =   "frmMain.frx":1896
  79.             Key             =   "findagain"
  80.          EndProperty
  81.       EndProperty
  82.    End
  83.    Begin MSComctlLib.Toolbar Toolbar1 
  84.       Align           =   1  'Align Top
  85.       Height          =   420
  86.       Left            =   0
  87.       TabIndex        =   1
  88.       Top             =   0
  89.       Width           =   10695
  90.       _ExtentX        =   18865
  91.       _ExtentY        =   741
  92.       ButtonWidth     =   609
  93.       ButtonHeight    =   582
  94.       Appearance      =   1
  95.       ImageList       =   "ImageList1"
  96.       _Version        =   393216
  97.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  98.          NumButtons      =   10
  99.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  100.             Key             =   "ne"
  101.             Object.ToolTipText     =   "New"
  102.             ImageKey        =   "new"
  103.          EndProperty
  104.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  105.             Key             =   "op"
  106.             Object.ToolTipText     =   "Open"
  107.             ImageKey        =   "open"
  108.          EndProperty
  109.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  110.             Key             =   "sa"
  111.             Object.ToolTipText     =   "Save"
  112.             ImageKey        =   "save"
  113.          EndProperty
  114.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  115.             Key             =   "pr"
  116.             Object.ToolTipText     =   "Print"
  117.             ImageKey        =   "print"
  118.          EndProperty
  119.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  120.             Key             =   "cu"
  121.             Object.ToolTipText     =   "Cut"
  122.             ImageKey        =   "cut"
  123.          EndProperty
  124.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  125.             Key             =   "co"
  126.             Object.ToolTipText     =   "Copy"
  127.             ImageKey        =   "copy"
  128.          EndProperty
  129.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  130.             Key             =   "pa"
  131.             Object.ToolTipText     =   "Paste"
  132.             ImageKey        =   "paste"
  133.          EndProperty
  134.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  135.             Key             =   "we"
  136.             Object.ToolTipText     =   "View In Browser"
  137.             ImageKey        =   "viewbrowser"
  138.          EndProperty
  139.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  140.             Key             =   "fi"
  141.             Object.ToolTipText     =   "Find"
  142.             ImageKey        =   "find"
  143.          EndProperty
  144.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  145.             Key             =   "fa"
  146.             Object.ToolTipText     =   "Find Again"
  147.             ImageKey        =   "findagain"
  148.          EndProperty
  149.       EndProperty
  150.    End
  151.    Begin MSComctlLib.StatusBar StatusBar1 
  152.       Align           =   2  'Align Bottom
  153.       Height          =   255
  154.       Left            =   0
  155.       TabIndex        =   0
  156.       Top             =   9255
  157.       Width           =   10695
  158.       _ExtentX        =   18865
  159.       _ExtentY        =   450
  160.       _Version        =   393216
  161.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  162.          NumPanels       =   1
  163.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  164.          EndProperty
  165.       EndProperty
  166.    End
  167.    Begin VB.Menu filemenu 
  168.       Caption         =   "&File"
  169.       Begin VB.Menu new 
  170.          Caption         =   "&New"
  171.          Shortcut        =   ^N
  172.       End
  173.       Begin VB.Menu open 
  174.          Caption         =   "&Open..."
  175.          Shortcut        =   ^O
  176.       End
  177.       Begin VB.Menu close 
  178.          Caption         =   "&Close"
  179.       End
  180.       Begin VB.Menu gap1 
  181.          Caption         =   "-"
  182.       End
  183.       Begin VB.Menu save 
  184.          Caption         =   "&Save"
  185.          Shortcut        =   ^S
  186.       End
  187.       Begin VB.Menu saveas 
  188.          Caption         =   "Save &As..."
  189.          Shortcut        =   {F12}
  190.       End
  191.       Begin VB.Menu gap2 
  192.          Caption         =   "-"
  193.       End
  194.       Begin VB.Menu print 
  195.          Caption         =   "&Print..."
  196.          Shortcut        =   ^P
  197.       End
  198.       Begin VB.Menu gap3 
  199.          Caption         =   "-"
  200.       End
  201.       Begin VB.Menu exit 
  202.          Caption         =   "E&xit"
  203.       End
  204.    End
  205.    Begin VB.Menu editmenu 
  206.       Caption         =   "&Edit"
  207.       Begin VB.Menu cut 
  208.          Caption         =   "Cu&t"
  209.          Shortcut        =   ^X
  210.       End
  211.       Begin VB.Menu copy 
  212.          Caption         =   "&Copy"
  213.          Shortcut        =   ^C
  214.       End
  215.       Begin VB.Menu paste 
  216.          Caption         =   "&Paste"
  217.          Shortcut        =   ^V
  218.       End
  219.       Begin VB.Menu gap4 
  220.          Caption         =   "-"
  221.       End
  222.       Begin VB.Menu selectall 
  223.          Caption         =   "Select &All"
  224.          Shortcut        =   ^A
  225.       End
  226.       Begin VB.Menu gap5 
  227.          Caption         =   "-"
  228.       End
  229.       Begin VB.Menu changecase 
  230.          Caption         =   "Chan&ge Case..."
  231.       End
  232.    End
  233.    Begin VB.Menu searchmenu 
  234.       Caption         =   "&Search"
  235.       Begin VB.Menu find 
  236.          Caption         =   "&Find..."
  237.          Shortcut        =   {F5}
  238.       End
  239.       Begin VB.Menu findnext 
  240.          Caption         =   "Find &Next"
  241.          Shortcut        =   ^F
  242.       End
  243.    End
  244.    Begin VB.Menu viewmenu 
  245.       Caption         =   "&View"
  246.       Begin VB.Menu browser 
  247.          Caption         =   "&Browser"
  248.          Shortcut        =   +^{F7}
  249.       End
  250.       Begin VB.Menu disasm 
  251.          Caption         =   "&Disassembly Window"
  252.          Shortcut        =   +^{F8}
  253.       End
  254.    End
  255.    Begin VB.Menu toolsmenu 
  256.       Caption         =   "&Tools"
  257.       Begin VB.Menu explorer 
  258.          Caption         =   "&Explorer"
  259.          Shortcut        =   +^{F3}
  260.       End
  261.       Begin VB.Menu gap7 
  262.          Caption         =   "-"
  263.       End
  264.       Begin VB.Menu compile 
  265.          Caption         =   "Compile &Java"
  266.          Shortcut        =   ^{F1}
  267.       End
  268.       Begin VB.Menu runjava 
  269.          Caption         =   "Run Java &Application"
  270.          Shortcut        =   ^{F2}
  271.       End
  272.       Begin VB.Menu runapplet 
  273.          Caption         =   "Run Java App&let"
  274.          Shortcut        =   ^{F3}
  275.       End
  276.       Begin VB.Menu gap6 
  277.          Caption         =   "-"
  278.       End
  279.       Begin VB.Menu javadoc 
  280.          Caption         =   "Java &Documentation"
  281.          Shortcut        =   ^{F4}
  282.       End
  283.       Begin VB.Menu dos 
  284.          Caption         =   "D&OS Shell"
  285.          Shortcut        =   ^{F5}
  286.       End
  287.    End
  288.    Begin VB.Menu helpmenu 
  289.       Caption         =   "&Help"
  290.       Begin VB.Menu about 
  291.          Caption         =   "&About JACE..."
  292.       End
  293.    End
  294. Attribute VB_Name = "frmMain"
  295. Attribute VB_GlobalNameSpace = False
  296. Attribute VB_Creatable = False
  297. Attribute VB_PredeclaredId = True
  298. Attribute VB_Exposed = False
  299. Private Sub Form_Resize()
  300.     'scales the dimensions of the components of the text editor
  301.     'when the form size changes
  302. End Sub
  303. Private Sub open_Click()
  304.     'declare variables
  305.     Dim fullpath As String
  306.     'create and initialise an open file dialog box
  307.     openJava.DialogTitle = "Open" 'title
  308.     openJava.Flags = cdlOFNFileMustExist Or cdlOFNPathMustExist 'checks
  309.     openJava.FileName = "" 'default name that appears in the filename
  310.     'all possible file extensions
  311.     openJava.Filter = "Java Source File (*.java)|*.java|All Files (*.*)|*.*"
  312.     openJava.CancelError = True 'catch errors generated
  313.     openJava.InitDir = "C:\WINDOWS\JAVA" 'open up in the root dir initially
  314.     'this is executed when an error happens
  315.     On Error Resume Next
  316.     openJava.ShowOpen
  317.     'this is executed when no errors are executed
  318.     If Err = 0 Then
  319.         fullpath = openJava.FileName 'grab the full path of the filename
  320.         
  321.         Open fullpath For Input As #1
  322.             While Not EOF(1)
  323.                 Line Input #1, textline
  324.                 'set the homepage in the Internet Options form
  325.                 txtsrc.Text = txtsrc.Text & textline & vbCrLf
  326.             Wend
  327.         Close #1
  328.                
  329.         frmMain.Caption = fullpath & " - JACE"
  330.     End If
  331.     'if cancel is pressed execute this
  332.     If Err = cdlCancel Then Exit Sub
  333. End Sub
  334. Private Sub save_Click()
  335.     If (InStr(0, frmMain.Caption, "Untitled")) > 0 Then
  336.             
  337.         'declare variables
  338.         Dim fullpath As String
  339.         'create and initialise an open file dialog box
  340.         saveJava.DialogTitle = "Save" 'title
  341.         saveJava.Flags = cdlOFNFileMustExist Or cdlOFNPathMustExist 'checks
  342.         saveJava.FileName = "" 'default name that appears in the filename
  343.         'all possible file extensions
  344.         saveJava.Filter = "Java Source File (*.java)|*.java|All Files (*.*)|*.*"
  345.         saveJava.CancelError = True 'catch errors generated
  346.         saveJava.InitDir = "C:\WINDOWS\JAVA" 'open up in the root dir initially
  347.         'this is executed when an error happens
  348.         On Error Resume Next
  349.         saveJava.ShowOpen
  350.         'this is executed when no errors are executed
  351.         If Err = 0 Then
  352.         
  353.             fullpath = saveJava.FileName 'grab the full path of the filename
  354.         
  355.             Open fullpath For Input As #1
  356.                 While Not EOF(1)
  357.                     Line Input #1, textline
  358.                     'set the homepage in the Internet Options form
  359.                     txtsrc.Text = txtsrc.Text & textline & vbCrLf
  360.                 Wend
  361.             Close #1
  362.                
  363.             frmMain.Caption = fullpath & " - JACE"
  364.         End If
  365.         'if cancel is pressed execute this
  366.         If Err = cdlCancel Then Exit Sub
  367.     Else
  368.         
  369. End Sub
  370. Private Sub txtsrc_Change()
  371.     If InStr(1, frmMain.Caption, "*") = 0 Then
  372.         frmMain.Caption = frmMain.Caption & "*"
  373.     End If
  374. End Sub
  375.