资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:40k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form frm_cell
- BorderStyle = 3 'Fixed Dialog
- Caption = "单元格属性"
- ClientHeight = 4005
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5040
- HelpContextID = 1012001
- Icon = "单元格属性.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4005
- ScaleWidth = 5040
- ShowInTaskbar = 0 'False
- StartUpPosition = 1 '所有者中心
- Begin MSComctlLib.ImageList ImageList1
- Left = 300
- Top = 3480
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 48
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 27
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":1042
- Key = ""
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":1396
- Key = ""
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":16EA
- Key = ""
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":1A3E
- Key = ""
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":1D92
- Key = ""
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":20E6
- Key = ""
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":243A
- Key = ""
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":278E
- Key = ""
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":2AE2
- Key = ""
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":2E36
- Key = ""
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":318A
- Key = ""
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":34DE
- Key = ""
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":3832
- Key = ""
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":3B86
- Key = ""
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":3EDA
- Key = ""
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":422E
- Key = ""
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":4582
- Key = ""
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":48D6
- Key = ""
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":4C2A
- Key = ""
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":4F7E
- Key = ""
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":52D2
- Key = ""
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":5626
- Key = ""
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":597A
- Key = ""
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":5CCE
- Key = ""
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":6022
- Key = ""
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":6376
- Key = ""
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单元格属性.frx":66CA
- Key = ""
- EndProperty
- EndProperty
- End
- Begin TabDlg.SSTab SSTab1
- Height = 3495
- Left = 60
- TabIndex = 3
- Top = 60
- Width = 4935
- _ExtentX = 8705
- _ExtentY = 6165
- _Version = 393216
- Style = 1
- Tabs = 4
- TabsPerRow = 4
- TabHeight = 520
- TabCaption(0) = "对齐"
- TabPicture(0) = "单元格属性.frx":6A1E
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Frame4"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Frame8"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "Frame3"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).ControlCount= 3
- TabCaption(1) = "字体颜色"
- TabPicture(1) = "单元格属性.frx":6A3A
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Label4"
- Tab(1).Control(0).Enabled= 0 'False
- Tab(1).Control(1)= "Label5"
- Tab(1).Control(1).Enabled= 0 'False
- Tab(1).Control(2)= "Label6"
- Tab(1).Control(2).Enabled= 0 'False
- Tab(1).Control(3)= "Label7"
- Tab(1).Control(3).Enabled= 0 'False
- Tab(1).Control(4)= "ImageCombo1"
- Tab(1).Control(4).Enabled= 0 'False
- Tab(1).Control(5)= "Combo2"
- Tab(1).Control(5).Enabled= 0 'False
- Tab(1).Control(6)= "Combo3"
- Tab(1).Control(6).Enabled= 0 'False
- Tab(1).Control(7)= "Combo4"
- Tab(1).Control(7).Enabled= 0 'False
- Tab(1).ControlCount= 8
- TabCaption(2) = "数值格式"
- TabPicture(2) = "单元格属性.frx":6A56
- Tab(2).ControlEnabled= 0 'False
- Tab(2).Control(0)= "Label8"
- Tab(2).Control(0).Enabled= 0 'False
- Tab(2).Control(1)= "Label9"
- Tab(2).Control(1).Enabled= 0 'False
- Tab(2).Control(2)= "Label10"
- Tab(2).Control(2).Enabled= 0 'False
- Tab(2).Control(3)= "Check4"
- Tab(2).Control(3).Enabled= 0 'False
- Tab(2).Control(4)= "Check5"
- Tab(2).Control(4).Enabled= 0 'False
- Tab(2).Control(5)= "Check6"
- Tab(2).Control(5).Enabled= 0 'False
- Tab(2).Control(6)= "Combo5"
- Tab(2).Control(6).Enabled= 0 'False
- Tab(2).Control(7)= "Combo6"
- Tab(2).Control(7).Enabled= 0 'False
- Tab(2).Control(8)= "Text1"
- Tab(2).Control(8).Enabled= 0 'False
- Tab(2).ControlCount= 9
- TabCaption(3) = "其它"
- TabPicture(3) = "单元格属性.frx":6A72
- Tab(3).ControlEnabled= 0 'False
- Tab(3).Control(0)= "Frame7"
- Tab(3).Control(0).Enabled= 0 'False
- Tab(3).ControlCount= 1
- Begin VB.Frame Frame7
- Caption = "报表模板"
- Height = 2700
- Left = -74880
- TabIndex = 40
- Top = 540
- Width = 4695
- Begin VB.OptionButton Option15
- Caption = "转换中文大写(二)"
- Height = 375
- Left = 3300
- TabIndex = 46
- Top = 1920
- Width = 1260
- End
- Begin VB.OptionButton Option14
- Caption = "转换中文大写(一)"
- Height = 405
- Left = 1785
- TabIndex = 45
- Top = 1920
- Width = 1260
- End
- Begin VB.OptionButton Option13
- Caption = "转换中文大写金额"
- Height = 405
- Left = 345
- TabIndex = 44
- Top = 1920
- Width = 1110
- End
- Begin VB.CheckBox Check2
- Caption = "设置打印时是否隐藏本单元内容"
- Height = 375
- Left = 360
- TabIndex = 43
- Top = 1290
- Width = 3975
- End
- Begin VB.CheckBox Check1
- Caption = "设置单元只读属性"
- Height = 375
- Left = 360
- TabIndex = 42
- Top = 825
- Width = 3975
- End
- Begin VB.CheckBox Check7
- Caption = "本单元在报表中不显示公式,只显示计算结果"
- Height = 375
- Left = 360
- TabIndex = 41
- Top = 360
- Width = 3975
- End
- End
- Begin VB.TextBox Text1
- Height = 300
- Left = -73710
- TabIndex = 36
- Top = 1980
- Width = 3165
- End
- Begin VB.ComboBox Combo6
- BeginProperty Font
- Name = "Tahoma"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- ItemData = "单元格属性.frx":6A8E
- Left = -73710
- List = "单元格属性.frx":6A9C
- Style = 2 'Dropdown List
- TabIndex = 35
- Top = 1530
- Width = 3165
- End
- Begin VB.ComboBox Combo5
- BeginProperty Font
- Name = "Tahoma"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- ItemData = "单元格属性.frx":6AC0
- Left = -73710
- List = "单元格属性.frx":6ACD
- Style = 2 'Dropdown List
- TabIndex = 34
- Top = 1080
- Width = 3165
- End
- Begin VB.CheckBox Check6
- Caption = "不显示0值"
- Height = 195
- Left = -71610
- TabIndex = 33
- Top = 630
- Width = 1155
- End
- Begin VB.CheckBox Check5
- Caption = "科学计数"
- Height = 255
- Left = -73155
- TabIndex = 32
- Top = 600
- Width = 1335
- End
- Begin VB.CheckBox Check4
- Caption = "百分号"
- Height = 255
- Left = -74580
- TabIndex = 31
- Top = 600
- Width = 1215
- End
- Begin VB.ComboBox Combo4
- BeginProperty Font
- Name = "Tahoma"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- ItemData = "单元格属性.frx":6AF7
- Left = -74040
- List = "单元格属性.frx":6B2B
- Style = 2 'Dropdown List
- TabIndex = 25
- Top = 1080
- Width = 1215
- End
- Begin VB.ComboBox Combo3
- BeginProperty Font
- Name = "Tahoma"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- ItemData = "单元格属性.frx":6B6D
- Left = -71880
- List = "单元格属性.frx":6B89
- Style = 2 'Dropdown List
- TabIndex = 24
- Top = 1080
- Width = 1335
- End
- Begin VB.ComboBox Combo2
- BeginProperty Font
- Name = "Tahoma"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- Left = -74040
- Style = 2 'Dropdown List
- TabIndex = 23
- Top = 600
- Width = 3495
- End
- Begin VB.Frame Frame3
- Caption = "正文显示"
- Height = 1575
- Left = 150
- TabIndex = 19
- Top = 1740
- Width = 2175
- Begin VB.OptionButton Option7
- Caption = "单行显示"
- Height = 255
- Left = 300
- TabIndex = 22
- Top = 300
- Value = -1 'True
- Width = 1575
- End
- Begin VB.OptionButton Option8
- Caption = "自动折行显示"
- Height = 255
- Left = 300
- TabIndex = 21
- Top = 630
- Width = 1575
- End
- Begin VB.OptionButton Option9
- Caption = "显示覆盖信息..."
- Height = 255
- Left = 300
- TabIndex = 20
- Top = 960
- Width = 1695
- End
- End
- Begin VB.Frame Frame8
- Caption = "对齐"
- Height = 1035
- Left = 150
- TabIndex = 8
- Top = 510
- Width = 4635
- Begin VB.Frame Frame2
- BorderStyle = 0 'None
- Height = 255
- Left = 1320
- TabIndex = 13
- Top = 240
- Width = 2775
- Begin VB.OptionButton Option3
- Caption = "居右"
- Height = 255
- Left = 2130
- TabIndex = 16
- Top = 30
- Width = 975
- End
- Begin VB.OptionButton Option2
- Caption = "居中"
- Height = 255
- Left = 1140
- TabIndex = 15
- Top = 30
- Width = 975
- End
- Begin VB.OptionButton Option1
- Caption = "居左"
- Height = 255
- Left = 90
- TabIndex = 14
- Top = 30
- Value = -1 'True
- Width = 975
- End
- End
- Begin VB.Frame Frame1
- BorderStyle = 0 'None
- Height = 255
- Left = 1320
- TabIndex = 9
- Top = 600
- Width = 2775
- Begin VB.OptionButton Option6
- Caption = "居下"
- Height = 255
- Left = 2130
- TabIndex = 12
- Top = 60
- Value = -1 'True
- Width = 975
- End
- Begin VB.OptionButton Option5
- Caption = "居中"
- Height = 255
- Left = 1140
- TabIndex = 11
- Top = 60
- Width = 855
- End
- Begin VB.OptionButton Option4
- Caption = "居上"
- Height = 210
- Left = 90
- TabIndex = 10
- Top = 60
- Width = 735
- End
- End
- Begin VB.Label Label1
- Caption = "水平居中:"
- Height = 255
- Left = 300
- TabIndex = 18
- Top = 270
- Width = 1095
- End
- Begin VB.Label Label2
- Caption = "垂直居中:"
- Height = 255
- Left = 300
- TabIndex = 17
- Top = 630
- Width = 975
- End
- End
- Begin VB.Frame Frame4
- Caption = "文本方向"
- Height = 1575
- Left = 2520
- TabIndex = 4
- Top = 1740
- Width = 2235
- Begin VB.OptionButton Option10
- Caption = "水平"
- Height = 255
- Left = 300
- TabIndex = 7
- Top = 300
- Width = 1575
- End
- Begin VB.OptionButton Option11
- Caption = "垂直向下"
- Height = 255
- Left = 300
- TabIndex = 6
- Top = 630
- Width = 1335
- End
- Begin VB.OptionButton Option12
- Caption = "垂直向上"
- Height = 255
- Left = 300
- TabIndex = 5
- Top = 960
- Width = 1455
- End
- End
- Begin MSComctlLib.ImageCombo ImageCombo1
- Height = 345
- Left = -74040
- TabIndex = 26
- Top = 1560
- Width = 1215
- _ExtentX = 2143
- _ExtentY = 609
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Tahoma"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Locked = -1 'True
- Text = "ImageCombo1"
- ImageList = "ImageList1"
- End
- Begin VB.Label Label10
- Caption = "小数位数:"
- Height = 225
- Left = -74640
- TabIndex = 39
- Top = 2040
- Width = 1095
- End
- Begin VB.Label Label9
- Caption = "货币符号:"
- Height = 225
- Left = -74640
- TabIndex = 38
- Top = 1590
- Width = 1095
- End
- Begin VB.Label Label8
- Caption = "千分位:"
- Height = 255
- Left = -74640
- TabIndex = 37
- Top = 1140
- Width = 1095
- End
- Begin VB.Label Label7
- Caption = "颜色:"
- Height = 375
- Left = -74640
- TabIndex = 30
- Top = 1620
- Width = 615
- End
- Begin VB.Label Label6
- Caption = "字号:"
- Height = 375
- Left = -74640
- TabIndex = 29
- Top = 1170
- Width = 615
- End
- Begin VB.Label Label5
- Caption = "字型:"
- Height = 375
- Left = -72480
- TabIndex = 28
- Top = 1170
- Width = 615
- End
- Begin VB.Label Label4
- Caption = "字体:"
- Height = 375
- Left = -74640
- TabIndex = 27
- Top = 720
- Width = 615
- End
- End
- Begin VB.CommandButton Command2
- Cancel = -1 'True
- Caption = "取消(&C)"
- Height = 300
- Left = 3870
- TabIndex = 1
- Top = 3630
- Width = 1120
- End
- Begin VB.CommandButton command1
- Caption = "确认(&O)"
- Default = -1 'True
- Height = 300
- Left = 2640
- TabIndex = 0
- Top = 3630
- Width = 1120
- End
- Begin VB.TextBox Text2
- Height = 270
- Left = 1800
- TabIndex = 2
- Text = "Text2"
- Top = 360
- Width = 255
- End
- End
- Attribute VB_Name = "frm_cell"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '***********************************************
- '* 模 块 名 称 :单元格属性
- '* 功 能 描 述 :
- '* 程序员姓名 :奚俊峰
- '* 最后修改人 :奚俊峰
- '* 最后修改时间:2002/01/21
- '***********************************************
- Option Explicit
- Private Sub mf_init_color(ByVal limgcmb_1 As ImageCombo) '颜色
- limgcmb_1.ComboItems.Add 1, "p1", "", 1
- limgcmb_1.ComboItems.Add 2, "p2", "", 2
- limgcmb_1.ComboItems.Add 3, "p3", "", 3
- limgcmb_1.ComboItems.Add 4, "p4", "", 4
- limgcmb_1.ComboItems.Add 5, "p5", "", 5
- limgcmb_1.ComboItems.Add 6, "p6", "", 6
- limgcmb_1.ComboItems.Add 7, "p7", "", 7
- limgcmb_1.ComboItems.Add 8, "p8", "", 8
- limgcmb_1.ComboItems.Add 9, "p9", "", 9
- limgcmb_1.ComboItems.Add 10, "p10", "", 10
- limgcmb_1.ComboItems.Add 11, "p11", "", 11
- limgcmb_1.ComboItems.Add 12, "p12", "", 12
- limgcmb_1.ComboItems.Add 13, "p13", "", 13
- limgcmb_1.ComboItems.Add 14, "p14", "", 14
- limgcmb_1.ComboItems.Add 15, "p15", "", 15
- limgcmb_1.ComboItems.Add 16, "p16", "", 16
- limgcmb_1.ComboItems.Add 17, "p17", "", 17
- limgcmb_1.ComboItems.Add 18, "p18", "", 18
- limgcmb_1.ComboItems.Add 19, "p19", "", 19
- limgcmb_1.ComboItems.Add 20, "p20", "", 20
- limgcmb_1.ComboItems.Add 21, "p21", "", 21
- limgcmb_1.ComboItems.Add 22, "p22", "", 22
- limgcmb_1.ComboItems.Add 23, "p23", "", 23
- limgcmb_1.ComboItems.Add 24, "p24", "", 24
- limgcmb_1.ComboItems.Add 25, "p25", "", 25
- limgcmb_1.ComboItems.Add 26, "p26", "", 26
- limgcmb_1.ComboItems.Add 27, "p27", "", 27
- End Sub
- Private Sub mf_init_combo2()
- Dim i As Long
- For i = 0 To Screen.FontCount
- If Len(Trim(Screen.Fonts(i))) > 0 Then
- Combo2.AddItem Screen.Fonts(i)
- End If
- Next i
- End Sub
- Private Sub Command1_Click()
- Dim i As Long, j As Long, ll_alignment As Long, ll_forecolor_old
- Dim ll_textstyle As Long, ll_fontsize As Long, ll_fontstyle As Long
- Dim ls_fontname As String, ll_forecolor As Long, ll_backcolor
- Dim ll_qfw As Long, ll_bfs As Long, ll_xsws As Long, ll_hbfh As Long
- Dim ll_unit As Long, ll_fs As Long, ll_kxjs As Long, ls_note As String
- Dim ls_read As Boolean, ls_hide As Boolean
- Dim ls_zhdx1 As Boolean, ls_zhdx2 As Boolean, ls_zhdx3 As Boolean
- Dim ll_orientation As Long, ll_zero As Long
- Dim ll_col_begin, ll_row_begin, ll_col_end, ll_row_end
- ll_alignment = 0
- With MDI_frame.ActiveForm
- '设置单元格对齐
- If Option1.Value = True Then
- ll_alignment = ll_alignment + 1
- End If
- If Option2.Value = True Then
- ll_alignment = ll_alignment + 4
- End If
- If Option3.Value = True Then
- ll_alignment = ll_alignment + 2
- End If
- If Option4.Value = True Then
- ll_alignment = ll_alignment + 8
- End If
- If Option5.Value = True Then
- ll_alignment = ll_alignment + 32
- End If
- If Option6.Value = True Then
- ll_alignment = ll_alignment + 16
- End If
- '设置折行
- If Option7.Value = True Then
- ll_textstyle = 0
- End If
- If Option8.Value = True Then
- ll_textstyle = 1
- End If
- If Option9.Value = True Then
- ll_textstyle = 2
- End If
- If Option10.Value = True Then
- ll_orientation = 0
- End If
- If Option11.Value = True Then
- ll_orientation = -90
- End If
- If Option12.Value = True Then
- ll_orientation = 90
- End If
- '设置字体
- ls_fontname = Combo2.Text
- ll_fontstyle = Combo3.ListIndex
- ll_fontsize = CInt(Combo4.Text)
- '设置字的颜色
- Select Case ImageCombo1.SelectedItem.Index
- Case 1
- ll_forecolor = RGB(0, 0, 0)
- Case 2
- ll_forecolor = RGB(128, 128, 128)
- Case 3
- ll_forecolor = RGB(128, 0, 0)
- Case 4
- ll_forecolor = RGB(128, 128, 0)
- Case 5
- ll_forecolor = RGB(0, 128, 0)
- Case 6
- ll_forecolor = RGB(0, 128, 128)
- Case 7
- ll_forecolor = RGB(0, 0, 128)
- Case 8
- ll_forecolor = RGB(128, 0, 128)
- Case 9
- ll_forecolor = RGB(128, 128, 64)
- Case 10
- ll_forecolor = RGB(0, 64, 64)
- Case 11
- ll_forecolor = RGB(0, 128, 255)
- Case 12
- ll_forecolor = RGB(0, 64, 128)
- Case 13
- ll_forecolor = RGB(64, 0, 255)
- Case 14
- ll_forecolor = RGB(128, 64, 0)
- Case 15
- ll_forecolor = RGB(255, 255, 255)
- Case 16
- ll_forecolor = RGB(255, 0, 0)
- Case 17
- ll_forecolor = RGB(255, 255, 0)
- Case 18
- ll_forecolor = RGB(0, 255, 0)
- Case 19
- ll_forecolor = RGB(0, 255, 255)
- Case 20
- ll_forecolor = RGB(0, 0, 255)
- Case 21
- ll_forecolor = RGB(255, 0, 255)
- Case 22
- ll_forecolor = RGB(255, 255, 128)
- Case 23
- ll_forecolor = RGB(0, 255, 128)
- Case 24
- ll_forecolor = RGB(128, 255, 255)
- Case 25
- ll_forecolor = RGB(128, 128, 255)
- Case 26
- ll_forecolor = RGB(255, 0, 128)
- Case 27
- ll_forecolor = RGB(255, 128, 64)
- End Select
- If SSTab1.TabVisible(2) = True Then
- '设置%
- If Check4.Value = Checked Then
- ll_bfs = 1
- Else
- ll_bfs = 0
- End If
- '设置科学计数
- If Check5.Value = Checked Then
- ll_kxjs = 1
- Else
- ll_kxjs = 0
- End If
- ll_qfw = Combo5.ListIndex
- ll_hbfh = Combo6.ItemData(Combo6.ListIndex)
- ll_xsws = CInt(Text1.Text)
- If Check6.Value = Checked Then
- ll_zero = 0
- Else
- ll_zero = 1
- End If
- End If
- If Check7.Value = Checked Then
- ls_note = "1"
- Else
- ls_note = ""
- End If
- If Check1.Value = Checked Then
- ls_read = True
- Else
- ls_read = False
- End If
- If Check2.Value = Checked Then
- ls_hide = True
- Else
- ls_hide = False
- End If
- If Option13.Value = True Then
- ls_zhdx1 = True
- Else
- ls_zhdx1 = False
- End If
- If Option14.Value = True Then
- ls_zhdx2 = True
- Else
- ls_zhdx2 = False
- End If
- If Option15.Value = True Then
- ls_zhdx3 = True
- Else
- ls_zhdx3 = False
- End If
- .Cell1.DoGetSelectRange ll_col_begin, ll_row_begin, ll_col_end, ll_row_end
- For i = ll_col_begin To ll_col_end
- For j = ll_row_begin To ll_row_end
- .Cell1.DoSetCellAlignment i, j, ll_alignment
- .Cell1.DoSetCellTextStyle i, j, ll_textstyle
- .Cell1.DoSetCellTextOrientation i, j, ll_orientation
- .Cell1.DoSetCellFont i, j, ll_fontsize, ll_fontstyle, ls_fontname
- .Cell1.DoGetCellColor i, j, ll_forecolor_old, ll_backcolor
- .Cell1.DoSetCellColor i, j, ll_forecolor, ll_backcolor
- If SSTab1.TabVisible(2) = True Then
- .Cell1.DoSetCellNumberStyle i, j, ll_qfw, ll_bfs, ll_xsws, ll_hbfh, 1, -1, ll_kxjs
- .Cell1.DoSetCellShowZero i, j, ll_zero
- End If
- .Cell1.DoSetCellNote i, j, ls_note
- .Cell1.DoSetCellReadOnly i, j, ls_read
- .Cell1.DoSetCellPrintable i, j, ls_hide
- If ls_zhdx1 = True Then
- .Cell1.DoSetCellNote i, j, "转换1"
- .Cell1.DoSetCellInputOnlyValue i, j, True, 9999999999#, False, 0
- Else
- If ls_zhdx2 = True Then
- .Cell1.DoSetCellNote i, j, "转换2"
- .Cell1.DoSetCellInputOnlyValue i, j, True, 9999999999#, False, 0
- Else
- If ls_zhdx3 = True Then
- .Cell1.DoSetCellNote i, j, "转换3"
- .Cell1.DoSetCellInputOnlyValue i, j, True, 9999999999#, False, 0
- Else
- If ls_note <> "1" Then
- .Cell1.DoSetCellNote i, j, ""
- End If
- End If
- End If
- End If
- Next j
- Next i
- .Cell1.DoRedrawAll
- End With
- Unload Me
- End Sub
- Private Sub command2_Click()
- Unload Me
- End Sub
- Private Sub Command3_Click()
- End Sub
- Private Sub Form_Load()
- Me.HelpContextID = "1012001"
- Dim ll_col As Long, ll_row As Long, ll_alignment As Long
- Dim ll_textstyle As Long, ll_fontsize, ll_fontstyle
- Dim ls_fontname, ll_forecolor, ll_backcolor
- Dim ll_qfw, ll_bfs, ll_xsws, ll_hbfh
- Dim ll_unit, ll_fs, ll_kxjs, ls_note As String
- Dim ll_orientation As Long
- Dim ls_xsws
- Dim i As Long
- mf_init_color ImageCombo1
- mf_init_combo2
- With MDI_frame.ActiveForm
- ll_col = .ml_col
- ll_row = .ml_row
- ll_alignment = .Cell1.DoGetCellAlignment(ll_col, ll_row)
- '设置对齐
- Select Case ll_alignment
- Case 9
- Option1.Value = True
- Option4.Value = True
- Case 33
- Option1.Value = True
- Option5.Value = True
- Case 17
- Option1.Value = True
- Option6.Value = True
- Case 12
- Option2.Value = True
- Option4.Value = True
- Case 36
- Option2.Value = True
- Option5.Value = True
- Case 20
- Option2.Value = True
- Option6.Value = True
- Case 10
- Option3.Value = True
- Option4.Value = True
- Case 34
- Option3.Value = True
- Option5.Value = True
- Case 18
- Option3.Value = True
- Option6.Value = True
- Case 0
- If .Cell1.DoGetCellDataType(ll_col, ll_row) = 2 Then
- Option3.Value = True
- Option6.Value = True
- Else
- Option1.Value = True
- Option6.Value = True
- End If
- End Select
- '设置自动折行
- ll_textstyle = .Cell1.DoGetCellTextStyle(ll_col, ll_row)
- Select Case ll_textstyle
- Case 0
- Option7.Value = True
- Case 1
- Option8.Value = True
- Case 2
- Option9.Value = True
- End Select
- ll_orientation = .Cell1.DoGetCellTextOrientation(ll_col, ll_row)
- Select Case ll_orientation
- Case 0
- Option10.Value = True
- Case -90
- Option11.Value = True
- Case 90
- Option2.Value = True
- End Select
- '设置字体
- .Cell1.DoGetCellFont ll_col, ll_row, ll_fontsize, ll_fontstyle, ls_fontname
- Combo4.Text = CStr(ll_fontsize)
- Combo3.Text = Combo3.List(ll_fontstyle)
- .Cell1.DoGetCellColor ll_col, ll_row, ll_forecolor, ll_backcolor
- Select Case ll_forecolor
- Case RGB(0, 0, 0), -1
- ImageCombo1.ComboItems(1).Selected = True
- Case RGB(128, 128, 128)
- ImageCombo1.ComboItems(2).Selected = True
- Case RGB(128, 0, 0)
- ImageCombo1.ComboItems(3).Selected = True
- Case RGB(128, 128, 0)
- ImageCombo1.ComboItems(4).Selected = True
- Case RGB(0, 128, 0)
- ImageCombo1.ComboItems(5).Selected = True
- Case RGB(0, 128, 128)
- ImageCombo1.ComboItems(6).Selected = True
- Case RGB(0, 0, 128)
- ImageCombo1.ComboItems(7).Selected = True
- Case RGB(128, 0, 128)
- ImageCombo1.ComboItems(8).Selected = True
- Case RGB(128, 128, 64)
- ImageCombo1.ComboItems(9).Selected = True
- Case RGB(0, 64, 64)
- ImageCombo1.ComboItems(10).Selected = True
- Case RGB(0, 128, 255)
- ImageCombo1.ComboItems(11).Selected = True
- Case RGB(0, 64, 128)
- ImageCombo1.ComboItems(12).Selected = True
- Case RGB(64, 0, 255)
- ImageCombo1.ComboItems(13).Selected = True
- Case RGB(128, 64, 0)
- ImageCombo1.ComboItems(14).Selected = True
- Case RGB(255, 255, 255)
- ImageCombo1.ComboItems(15).Selected = True
- Case RGB(255, 0, 0)
- ImageCombo1.ComboItems(16).Selected = True
- Case RGB(255, 255, 0)
- ImageCombo1.ComboItems(17).Selected = True
- Case RGB(0, 255, 0)
- ImageCombo1.ComboItems(18).Selected = True
- Case RGB(0, 255, 255)
- ImageCombo1.ComboItems(19).Selected = True
- Case RGB(0, 0, 255)
- ImageCombo1.ComboItems(20).Selected = True
- Case RGB(255, 0, 255)
- ImageCombo1.ComboItems(21).Selected = True
- Case RGB(255, 255, 128)
- ImageCombo1.ComboItems(22).Selected = True
- Case RGB(0, 255, 128)
- ImageCombo1.ComboItems(23).Selected = True
- Case RGB(128, 255, 255)
- ImageCombo1.ComboItems(24).Selected = True
- Case RGB(128, 128, 255)
- ImageCombo1.ComboItems(25).Selected = True
- Case RGB(255, 0, 128)
- ImageCombo1.ComboItems(26).Selected = True
- Case RGB(255, 128, 64)
- ImageCombo1.ComboItems(27).Selected = True
- End Select
- .Cell1.DoGetCellNumberStyle ll_col, ll_row, ll_qfw, ll_bfs, ll_xsws, ll_hbfh, ll_unit, ll_fs, ll_kxjs
- If ll_xsws = -1 Then
- .Cell1.DoGetCellData ll_col, ll_row, ls_xsws
- If InStr(1, ls_xsws, ".", vbTextCompare) > 0 Then
- ll_xsws = Len(ls_xsws) - InStr(1, ls_xsws, ".", vbTextCompare)
- Else
- ll_xsws = 0
- End If
- End If
- SSTab1.TabVisible(2) = True
- If ll_bfs = 0 Then
- Check4.Value = Unchecked
- Else
- Check4.Value = Checked
- End If
- If ll_kxjs = 1 Then
- Check5.Value = Checked
- Else
- Check5.Value = Unchecked
- End If
- Combo5.Text = Combo5.List(ll_qfw)
- For i = 0 To Combo6.ListCount() - 1
- If Combo6.ItemData(i) = ll_hbfh Then
- Combo6.Text = Combo6.List(i)
- End If
- Next i
- Text1.Text = CStr(ll_xsws)
- If .Cell1.DoGetCellShowZero(ll_col, ll_row) = 1 Then
- Check6.Value = Checked
- Else
- Check6.Value = Unchecked
- End If
- ls_note = .Cell1.DoGetCellNote(ll_col, ll_row)
- If Left(ls_note, 1) = "1" Then
- Check7.Value = Checked
- Else
- Check7.Value = Unchecked
- End If
- End With
- End Sub
- Private Sub ImageCombo1_Click()
- Text2.SetFocus
- End Sub
- Private Sub ImageCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
- KeyCode = 0
- End Sub
- Private Sub Text1_Change()
- If Len(Trim(Text1.Text)) = 0 Then
- Text1.Text = "0"
- End If
- End Sub
- Private Sub Text1_KeyPress(KeyAscii As Integer)
- If Not (KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Or KeyAscii = vbKeyBack) Then
- KeyAscii = 0
- End If
- End Sub