⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shr_stateevent_vb_mainform.frm

📁 三汇CTI示例程序源码
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form MainForm 
   Caption         =   "SHR_DEMO"
   ClientHeight    =   5190
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   10365
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5190
   ScaleWidth      =   10365
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command3 
      Caption         =   "&StopListen"
      Height          =   375
      Left            =   5640
      TabIndex        =   5
      Top             =   3960
      Width           =   975
   End
   Begin VB.ComboBox Combo1 
      Height          =   315
      ItemData        =   "SHR_StateEvent_VB_MainForm.frx":0000
      Left            =   2160
      List            =   "SHR_StateEvent_VB_MainForm.frx":0002
      TabIndex        =   3
      Text            =   "0"
      Top             =   3960
      Width           =   1335
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   120
      Top             =   3960
   End
   Begin VB.CommandButton Command2 
      Caption         =   "&Listen"
      Height          =   375
      Left            =   4200
      TabIndex        =   2
      Top             =   3960
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Exit"
      Height          =   375
      Left            =   7080
      TabIndex        =   1
      Top             =   3960
      Width           =   1095
   End
   Begin MSFlexGridLib.MSFlexGrid StateGrid 
      Height          =   3495
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   10095
      _ExtentX        =   17806
      _ExtentY        =   6165
      _Version        =   393216
      Appearance      =   0
   End
   Begin VB.Label Label1 
      Caption         =   "Channel"
      Height          =   255
      Left            =   1080
      TabIndex        =   4
      Top             =   3960
      Width           =   855
   End
End
Attribute VB_Name = "MainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
'   On Error Resume Next
    StateGrid.Redraw = False
    Call SsmCloseCti
    Unload Me
    End
End Sub

Private Sub Command2_Click()
    Dim Cur_Line As Integer
    
    Cur_Line = Int(Combo1.Text)
    If ListenChannel <> Cur_Line Then
        ATrkCh(Cur_Line).Islisten = 5
        Call PlayListen(0, Cur_Line)
        If ListenChannel < nTotalCh Then
            ATrkCh(ListenChannel).Islisten = 4
            Call StopListen(0)
        End If
        ListenChannel = Cur_Line
    End If
End Sub

Private Sub Command3_Click()
    ATrkCh(ListenChannel).Islisten = 4
    Call StopListen(0)
    ListenChannel = nTotalCh
End Sub

Private Sub Form_Initialize()
    Timer1.Enabled = True
    prevWndProc = GetWindowLong(MainForm.hWnd, GWL_WNDPROC)
    SetWindowLong MainForm.hWnd, GWL_WNDPROC, AddressOf NewWndProc
    EVENT_SET_INF.dwWorkMode = EVENT_MESSAGE    'windows message
    EVENT_SET_INF.lpHandlerParam = MainForm.hWnd
    SsmSetEvent -1, -1, True, EVENT_SET_INF
    SsmStartTimer 800, 0
End Sub

Private Sub Form_Load()
    If InitCtiSystem() = False Then
        Unload Me
    Else
        Call InitATrunkCh
        Call InitATrunkListCtrl
        Call UpDateATrunkChListCtrl
    End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Call SsmCloseCti
End Sub

Private Sub Timer1_Timer()
    Call UpDateATrunkChListCtrl
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -