📄 frmide.frm
字号:
VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 1 'Fest Einfach
Caption = "Visual B++ Development Environment"
ClientHeight = 1935
ClientLeft = 2220
ClientTop = 330
ClientWidth = 8895
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmIDE.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 1935
ScaleWidth = 8895
Begin VB.CommandButton cmdDummy
Caption = "Command1"
Height = 195
Left = 360
TabIndex = 2
Top = 2040
Width = 495
End
Begin VB.DirListBox dirFolder
Height = 540
Left = 1200
TabIndex = 9
Top = 1800
Visible = 0 'False
Width = 1335
End
Begin VB.CommandButton cmdForm
Caption = "New Form"
Height = 375
Left = 120
TabIndex = 6
Top = 1440
Width = 1215
End
Begin VB.TextBox txtForm
Height = 375
Left = 1440
TabIndex = 5
Text = "frmMain.res"
Top = 1440
Width = 7335
End
Begin VB.TextBox txtSource
Height = 375
Left = 1440
TabIndex = 4
Text = "mainApp.bis"
Top = 960
Width = 7335
End
Begin VB.CommandButton cmdNewSourceFile
Caption = "New Source"
Height = 375
Left = 120
TabIndex = 3
Top = 960
Width = 1215
End
Begin VB.Frame fmeProject
Caption = "Project / Workspace"
Height = 735
Left = 120
TabIndex = 0
Top = 120
Width = 8655
Begin VB.Timer tmrStart
Interval = 100
Left = 3960
Top = 600
End
Begin VB.CommandButton cmdCreateFld
Height = 375
Left = 8160
Picture = "frmIDE.frx":058A
Style = 1 'Grafisch
TabIndex = 8
ToolTipText = "Create Folder"
Top = 240
Width = 375
End
Begin VB.TextBox txtProject
Height = 375
Left = 120
TabIndex = 1
Text = "C:\Development"
Top = 240
Width = 7695
End
Begin VB.CommandButton cmdOpen
Height = 375
Left = 7800
Picture = "frmIDE.frx":0B14
Style = 1 'Grafisch
TabIndex = 7
ToolTipText = "Open Explorer"
Top = 240
Width = 375
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim NoChangeMode As Boolean
Dim Handchange As Boolean
Private Sub cmdCreateFld_Click()
MkDir txtProject.Text
txtProject_Change
End Sub
Private Sub cmdForm_Click()
Dim P As New frmForm
P.Tag = txtForm.Text
P.Show
End Sub
Private Sub cmdNewSourceFile_Click()
Dim P As New frmEditor
P.Tag = txtSource.Text
P.Show
P.Caption = P.Tag & " - Source Code"
End Sub
Private Sub cmdOpen_Click()
frmExplorer.Show
frmExplorer.fleProject.Path = txtProject.Text
End Sub
Private Sub Form_Load()
NoChangeMode = True
txtProject.Text = GetSetting(App.Title, "Project", "Path", "C:\Development")
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Function getTail(InputTx As String) As String
getTail = Mid(InputTx, InStrRev(InputTx, "\") + 1)
End Function
Private Sub tmrStart_Timer()
NoChangeMode = False
tmrStart.Enabled = False
End Sub
Private Sub txtProject_Change()
SaveSetting App.Title, "Project", "Path", txtProject.Text
txtProject.ForeColor = 0
On Error GoTo 1
If Left(CStr(txtProject.Text), CInt(InStrRev(CStr(txtProject.Text), CStr("\")) - 1)) Like "?:" Then
dirFolder.Path = "\"
Else
dirFolder.Path = Left(txtProject.Text, InStrRev(txtProject.Text, "\") - 1)
End If
If Right(txtProject.Text, 1) = "\" Then txtProject.ForeColor = RGB(128, 0, 0)
Rest = Mid(txtProject.Text, InStrRev(txtProject.Text, "\") + 1)
If Len(Rest) < 2 Then Exit Sub
If NoChangeMode = True Then Exit Sub
If Handchange = False Then Exit Sub
On Error Resume Next
OldPos = txtProject.SelStart
For f = 0 To dirFolder.ListCount - 1
If LCase(Left(getTail(dirFolder.List(f)), Len(Rest))) = LCase(Rest) Then
RZEntry = Mid(getTail(dirFolder.List(f)), Len(Rest) + 1)
End If
Next f
Handchange = False
txtProject.Visible = False
txtProject.SelText = RZEntry
txtProject.SelStart = OldPos
txtProject.SelLength = Len(RZEntry)
txtProject.Visible = True: txtProject.SetFocus
Exit Sub
1: txtProject.ForeColor = vbRed
End Sub
Private Sub txtProject_KeyPress(KeyAscii As Integer)
Handchange = True
If KeyAscii = 8 Then NoChangeMode = True Else NoChangeMode = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -