- 1、本文档共20页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
联网式-中国象棋VB源代码 萨云轩 工作室.doc
Option Explicit
Public bIsNet As Boolean
Const FF_EMP = -1
Const FF_SIDE1 = 0
Const FF_SIDE2 = 1
Dim local_side As Integer
Dim pos_side As Integer
Dim Chess_On As Integer
Const FF_US_INITALL = 0
Const FF_US_INITNET = 1
Const FF_US_INITLOCAL = 2
Const FF_US_NET_CON = 3
Const FF_US_USE_CON = 4
Dim b_Server As Boolean
Dim b_isCon As Boolean
Public m_Set As String
Dim m_BeSet As String
USER STATE
Enum FF_UA_STATE
FF_UA_INIT
FF_UA_WAITING
FF_UA_USE
FF_UA_INVALID
End Enum
Dim m_State As FF_UA_STATE
Private Sub TransSide(ByRef side As Integer)
If side = FF_SIDE1 Then
side = FF_SIDE2
Else
side = FF_SIDE1
End If
End Sub
Private Sub TransState(method As Integer)
main.WindowState = vbNormal
Select Case method
Case FF_US_INITALL
InitalBoard
m_State = FF_UA_INVALID
c_MunNew.Visible = False
c_MunLoad.Enabled = True
c_eState.Text =
c_eMsg.Text =
c_CmdSay.Enabled = False
c_MunShow.Checked = bIsNet
pos_side = FF_SIDE1
Chess_On = FF_EMP
c_spChessOn.Visible = False
c_sUse.Close
b_isCon = False
Case FF_US_INITNET
frm_net.Visible = True
main.Width = 8835
pic_noclick.Visible = True
pic_click.Visible = False
c_sColor.FillColor = H8000000F
c_CmdCon.Enabled = True
Case FF_US_INITLOCAL
frm_net.Visible = False
main.Width = 5880
pic_noclick.Visible = False
pic_click.Visible = True
c_sColor.FillColor = vbRed
local_side = FF_SIDE1
Case FF_US_NET_CON
c_CmdSay.Enabled = True
b_isCon = True
c_CmdCon.Enabled = False
c_eState.Text = 网络连接成功
Case FF_US_USE_CON
m_State = FF_UA_USE
c_MunLoad.Enabled = False
c_MunNew.Visible = False
c_eState.Text = 开始
End Select
End Sub
Private Sub InitalBoard()
Dim i As Integer
Dim x_step, d_step As Integer
x_step = 0
d_step = -1
For i = 0 To 8
c_chess(i).Top = 0
c_chess(i).Left = 2595 + x_step * d_step
c_chess(i + 16).Top = 5400
c_chess(i + 16).Left = c_chess(i).Left
If (i / 2 = Int(i / 2)) Then x_step = x_step + 6
您可能关注的文档
最近下载
- 南京旅游策划案例分析报告.pptx
- 新人教pep三年级上册Unit2 Different families Letters and sounds 课件.pptx
- 2023《汉语言文学开题报告:陶渊明田园诗的艺术意蕴》2800字.docx VIP
- 23J909 工程做法(建筑图集).docx VIP
- 2023版反假考试复习题库-中(多选题部分).pdf VIP
- 初中数学人教版和北师大版目录.docx VIP
- 工作、消费、新穷人(英)齐格蒙特·鲍曼.pdf
- 运动竞赛学教案_精品.doc
- 钻探地质编录方法及要求要点详解.ppt
- SHT3225-2024 石油化工安全仪表系统安全完整性等级设计规范(报批稿).pdf
文档评论(0)