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

📄 rtdxfrm.frm

📁 dsp6713开发板的许多例程.对入门特别有用
💻 FRM
📖 第 1 页 / 共 4 页
字号:
   Begin VB.Label Label2 
      BackColor       =   &H00800000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "CHANNEL NAME"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   0
      TabIndex        =   14
      Top             =   2520
      Width           =   1815
   End
   Begin VB.Label Label4 
      BackColor       =   &H00800000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "MAX MEMBERS"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   0
      TabIndex        =   13
      ToolTipText     =   "(COLUMNS)"
      Top             =   3480
      Width           =   1815
   End
   Begin VB.Label Label3 
      BackColor       =   &H00800000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "MAX MESSAGES"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   0
      TabIndex        =   12
      ToolTipText     =   "(ROWS)"
      Top             =   3000
      Width           =   1815
   End
   Begin VB.Image TI_logo 
      BorderStyle     =   1  'Fixed Single
      Enabled         =   0   'False
      Height          =   1815
      Left            =   0
      Picture         =   "rtdxfrm.frx":0340
      Stretch         =   -1  'True
      Top             =   0
      Width           =   1815
   End
   Begin VB.Menu mnu_Operations 
      Caption         =   "&Operations"
      Begin VB.Menu mnu_Start 
         Caption         =   "St&art"
         Shortcut        =   ^R
      End
      Begin VB.Menu mnu_Stop 
         Caption         =   "&Stop"
         Shortcut        =   ^S
      End
      Begin VB.Menu mnu_Quit 
         Caption         =   "&Quit"
         Shortcut        =   ^Q
      End
   End
End
Attribute VB_Name = "RTDX_frm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'*********************************************
' This Display shows how a Visual Basic      *
' program can be used to analyze data with   *
' Texas Instruments' Real Time Data Exchange *
' RTDX(TM) Technology.                       *
'                                            *
' Need Msflxgrid.ocx for VB5.0               *
'  or  Grid32.ocx for VB4.0                  *
'                                            *
' The Code located in between these comments *
' '########## RTDX(TM) ##########' are       *
' important for RTDX(TM).                    *
'                                            *
' Copyright 1997-1998 Texas Instruments      *
'*********************************************

#Const DIRECT_INTERFACE_CONNECTION = 0

Const RTDXHELPFILE = "\GPDISPLAY.HLP"

' Form and control orignal size and positions
Const FORM_START_WIDTH = 3840
Const FORM_START_HEIGHT = 5580
Const TI_LOGO_START_WIDTH = 1815
Const TI_LOGO_START_HEIGHT = 1815
Const TI_LOGO_START_LEFT = 0
Const TI_LOGO_START_TOP = 0
Const CMD_TOGGLE_START_WIDTH = 1815
Const CMD_TOGGLE_START_HEIGHT = 375
Const CMD_TOGGLE_START_LEFT = 1920
Const CMD_TOGGLE_START_TOP = 0
Const CMD_ADD_CHANNEL_START_WIDTH = 1815
Const CMD_ADD_CHANNEL_START_HEIGHT = 375
Const CMD_ADD_CHANNEL_START_LEFT = 1920
Const CMD_ADD_CHANNEL_START_TOP = 360
Const CMD_MODIFY_CHANNEL_START_WIDTH = 1815
Const CMD_MODIFY_CHANNEL_START_HEIGHT = 375
Const CMD_MODIFY_CHANNEL_START_LEFT = 1920
Const CMD_MODIFY_CHANNEL_START_TOP = 720
Const CMD_DELETE_CHANNEL_START_WIDTH = 1815
Const CMD_DELETE_CHANNEL_START_HEIGHT = 375
Const CMD_DELETE_CHANNEL_START_LEFT = 1920
Const CMD_DELETE_CHANNEL_START_TOP = 1080
Const CMD_RESET_START_WIDTH = 1815
Const CMD_RESET_START_HEIGHT = 375
Const CMD_RESET_START_LEFT = 1920
Const CMD_RESET_START_TOP = 1440
Const CMD_VIEW_CHANNEL_START_WIDTH = 1815
Const CMD_VIEW_CHANNEL_START_HEIGHT = 450
Const CMD_VIEW_CHANNEL_START_LEFT = 1920
Const CMD_VIEW_CHANNEL_START_TOP = 1920
Const CHANNEL_NAME_START_WIDTH = 1815
Const CHANNEL_NAME_START_HEIGHT = 375
Const CHANNEL_NAME_START_LEFT = 1920
Const CHANNEL_NAME_START_TOP = 2520
Const MAX_MESSAGES_START_WIDTH = 1815
Const MAX_MESSAGES_START_HEIGHT = 375
Const MAX_MESSAGES_START_LEFT = 1920
Const MAX_MESSAGES_START_TOP = 3000
Const MAX_MEMBERS_START_WIDTH = 1815
Const MAX_MEMBERS_START_HEIGHT = 375
Const MAX_MEMBERS_START_LEFT = 1920
Const MAX_MEMBERS_START_TOP = 3480
Const IO_TYPE_START_WIDTH = 375
Const IO_TYPE_START_HEIGHT = 450
Const IO_TYPE_START_LEFT = 1080
Const IO_TYPE_START_TOP = 3960
Const INT_TYPE_START_WIDTH = 615
Const INT_TYPE_START_HEIGHT = 450
Const INT_TYPE_START_LEFT = 3120
Const INT_TYPE_START_TOP = 3960
Const NUM_CHANNELS_START_WIDTH = 975
Const NUM_CHANNELS_START_HEIGHT = 375
Const NUM_CHANNELS_START_LEFT = 2760
Const NUM_CHANNELS_START_TOP = 4560
Const LABEL1_START_WIDTH = 1815
Const LABEL1_START_HEIGHT = 375
Const LABEL1_START_LEFT = 0
Const LABEL1_START_TOP = 1920
Const LABEL2_START_WIDTH = 1815
Const LABEL2_START_HEIGHT = 375
Const LABEL2_START_LEFT = 0
Const LABEL2_START_TOP = 2520
Const LABEL3_START_WIDTH = 1815
Const LABEL3_START_HEIGHT = 375
Const LABEL3_START_LEFT = 0
Const LABEL3_START_TOP = 3000
Const LABEL4_START_WIDTH = 1815
Const LABEL4_START_HEIGHT = 375
Const LABEL4_START_LEFT = 0
Const LABEL4_START_TOP = 3480
Const LABEL5_START_WIDTH = 975
Const LABEL5_START_HEIGHT = 375
Const LABEL5_START_LEFT = 0
Const LABEL5_START_TOP = 3960
Const LABEL6_START_WIDTH = 1455
Const LABEL6_START_HEIGHT = 375
Const LABEL6_START_LEFT = 1560
Const LABEL6_START_TOP = 3960
Const LABEL7_START_WIDTH = 2655
Const LABEL7_START_HEIGHT = 375
Const LABEL7_START_LEFT = 0
Const LABEL7_START_TOP = 4560


' Array of Structures to hold channel Attributes
Dim RTDX_channel() As RTDX_Channel_Attributes

' Array of Structures to hold Column break points
Dim Column_Point() As Column_Break_Points

' Array of objects for multiple instatiation
'########## RTDX(TM) ##########'
Dim rtdx() As Object
'########## RTDX(TM) ##########'

' Array of Method attributes
Dim MethodValues() As RTDX_Method_Attributes

Dim chan_incr As Integer         ' Channel incrementer
Dim on_off_toggle As Boolean     ' On/Off toggle flag
Dim channel_number As Integer    ' Global channel number variable

Public Sub Init_Prog()

    ' Shut off toggle switch
    on_off_toggle = False

    NUM_CHANNELS.Text = 0
    CHANNEL_NAME.Text = ""
    IO_TYPE.Text = "R"
    MAX_MEMBERS.Text = ""
    MAX_MESSAGES.Text = ""
    INT_TYPE.Text = "32-Bit"
    chan_incr = 0
    
    ' Disable controls that require an existing channel
    cmd_Delete_Channel.Enabled = False
    cmd_Reset.Enabled = False
    cmd_Modify_Channel.Enabled = False
    cmd_Toggle.Enabled = False
    mnu_Start.Enabled = False
    
    ' Disable Number of channel text box
    NUM_CHANNELS.Enabled = False

End Sub

Public Sub Init_Grid()
'initialize grid
Dim total_columns As Long
Dim total_rows As Long
Dim channel_counter As Integer
Dim colinc As Long
Dim rowinc As Long

    ' Set the number of Rows and Columns
    
    ' Find the biggest max message of all the channels
    For channel_counter = 0 To (Val(NUM_CHANNELS.Text) - 1)
        If total_rows < RTDX_channel(channel_counter).messages Then
            total_rows = RTDX_channel(channel_counter).messages
        End If
    Next channel_counter
    
    RTDX_gridfrm.RTDX_grid.Rows = total_rows + 1
    
    ' Find the total amount of columns needed for all the channels
    For channel_counter = 0 To (Val(NUM_CHANNELS.Text) - 1)
        ' If the current channel is not the last channel then
        ' add max members to total columns, plus an additional
        ' column.  Otherwise, just add max members.  This will
        ' make sure that we have just enough columns.
        total_columns = total_columns + _
            RTDX_channel(channel_counter).members
        If channel_counter < (Val(NUM_CHANNELS.Text) - 1) Then
            total_columns = total_columns + 1
        End If
    Next channel_counter
    RTDX_gridfrm.RTDX_grid.Cols = total_columns + 1
    
    ' Set up the range of cell values (Needed for VB4.0)
    'RTDX_gridfrm.RTDX_grid.SelStartCol = 1
    'RTDX_gridfrm.RTDX_grid.SelStartRow = 1
    'RTDX_gridfrm.RTDX_grid.SelEndCol = total_columns
    'RTDX_gridfrm.RTDX_grid.SelEndRow = Val(MAX_MESSAGES.Text)
    
    ' Clear Grid
    RTDX_gridfrm.RTDX_grid.Clear
    
    ' Label rows
    RTDX_gridfrm.RTDX_grid.Col = 0
    For rowinc = 1 To total_rows
        RTDX_gridfrm.RTDX_grid.Row = rowinc
        RTDX_gridfrm.RTDX_grid = rowinc
    Next rowinc

    ' Make an array to hold column locations per channel object
    ReDim Column_Point(Val(NUM_CHANNELS.Text)) As Column_Break_Points
    
    ' Label columns & set column locations per channel
    RTDX_gridfrm.RTDX_grid.Row = 0
    For channel_counter = 0 To (Val(NUM_CHANNELS.Text) - 1)
        If channel_counter = 0 Then
            Column_Point(0).Start_Point = 1
            Column_Point(0).End_Point = (RTDX_channel(0).members)
        Else ' Leave blank column between channels
            Column_Point(channel_counter).Start_Point = _
                Column_Point(channel_counter - 1).End_Point + 2
            Column_Point(channel_counter).End_Point = _
                Column_Point(channel_counter).Start_Point + _
                Val(RTDX_channel(channel_counter).members) - 1
        End If
        ' Label column with channel name and member number
        RTDX_gridfrm.RTDX_grid.Col = _
            Column_Point(channel_counter).Start_Point
        RTDX_gridfrm.RTDX_grid = _
            RTDX_channel(channel_counter).name
        For colinc = 2 To RTDX_channel(channel_counter).members
            RTDX_gridfrm.RTDX_grid.Col = _
                colinc + Column_Point(channel_counter).Start_Point - 1
            RTDX_gridfrm.RTDX_grid = colinc
        Next colinc
    Next channel_counter
    
    ' Set width of every column
    For colinc = 1 To total_columns
        RTDX_gridfrm.RTDX_grid.ColWidth(colinc) = 1000
    Next colinc
    
End Sub

Public Sub Init_Row_Col_Start_Points()
' Initialize column start points for all channels
Dim RC_channel_counter As Integer

⌨️ 快捷键说明

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