CommWindow.frm
上传用户:ling1220
上传日期:2007-01-10
资源大小:313k
文件大小:4k
- VERSION 5.00
- Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX"
- Begin VB.Form CommWindow
- Caption = "Incoming Communication Window"
- ClientHeight = 1350
- ClientLeft = 165
- ClientTop = 450
- ClientWidth = 5625
- ClipControls = 0 'False
- Icon = "CommWindow.frx":0000
- LinkTopic = "Form2"
- ScaleHeight = 1350
- ScaleWidth = 5625
- StartUpPosition = 3 'Windows Default
- Begin RichTextLib.RichTextBox CommText
- Height = 3090
- Left = 75
- TabIndex = 0
- Top = 0
- Width = 4590
- _ExtentX = 8096
- _ExtentY = 5450
- _Version = 327680
- BackColor = 0
- Enabled = -1 'True
- HideSelection = 0 'False
- ScrollBars = 2
- TextRTF = $"CommWindow.frx":030A
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Menu Main
- Caption = "Main"
- Visible = 0 'False
- Begin VB.Menu hidemain
- Caption = "Hide Main"
- End
- Begin VB.Menu aotop
- Caption = "Always on Top"
- End
- End
- End
- Attribute VB_Name = "CommWindow"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub aotop_Click()
- Dim i As Integer
-
- If aotop.Checked = True Then
- i = SetWindowPos(Me.hWnd, HWND_NOTOPMOST, _
- Me.Left Screen.TwipsPerPixelX, Me.Top Screen.TwipsPerPixelY, _
- Me.Width Screen.TwipsPerPixelX, Me.Height Screen.TwipsPerPixelY, 0)
- aotop.Checked = False
- Else
- i = SetWindowPos(Me.hWnd, HWND_TOPMOST, _
- Me.Left Screen.TwipsPerPixelX, Me.Top Screen.TwipsPerPixelY, _
- Me.Width Screen.TwipsPerPixelX, Me.Height Screen.TwipsPerPixelY, 0)
- aotop.Checked = True
- End If
- End Sub
- Private Sub CommText_Change()
- If Len(CommText.Text) > 10000 Then
- CommText.SelStart = 0
- CommText.SelLength = 2000
- CommText.SelText = ""
-
- CommText.SelStart = 31000
- CommText.SelLength = 0
-
- End If
- 'CommText.TextRTF = CommText.TextRTF
- CommText.SelStart = Len(CommText.Text)
- CommText.SelColor = RGB(255, 255, 255)
- CommText.SelLength = 0
- End Sub
- Private Sub CommText_Click()
- PopupMenu Main
- End Sub
- Private Sub Form_Load()
- Dim i As Integer
- i = SetWindowPos(Me.hWnd, HWND_NOTOPMOST, _
- Me.Left Screen.TwipsPerPixelX, Me.Top Screen.TwipsPerPixelY, _
- Me.Width Screen.TwipsPerPixelX, Me.Height Screen.TwipsPerPixelY, 0)
- 'HWND_NOTOPMOST
- CommText.BackColor = Form1.DefaultComBackcolor
- CommText.SelStart = Len(CommText.Text)
- CommText.SelColor = Form1.DefaultComColor
- CommText.SelLength = 0
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- If Form1.Commwindowshow.Value = 1 Then
- Form1.Commwindowshow.Value = 0
- Else
- Form1.Commwindowshow = 1
- End If
- Form1.Show
- End Sub
- Private Sub Form_Resize()
- CommText.Width = CommWindow.Width - 270
- CommText.Height = CommWindow.Height - (CommText.Top) - 350
- CommText.RightMargin = CommText.Width - 350
- End Sub
- Private Sub hidemain_Click()
- If hidemain.Checked = True Then
- Form1.Show
- hidemain.Checked = False
- Else
- Form1.Hide
- hidemain.Checked = True
- End If
- End Sub