Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Command1.Left = X - Command1.Width / 2Command1.Top = Y - Command1.Height / 2End Sub在此之前要使用窗口load代码:private sub form_load()dim a,b'这里a变量是角色血量显示,b是怪物血量,如果要更多怪物就继续添加a=1000b=1000end sub新建timer1,触发间隔设为10编写timer1的事件代码为:private sub timer1_timer()if a=0 thenmsgbox"您已死亡!"elsecommand1.caption="角色,血量:"&aif b=0 thencommand2.caption="装备"elsecommand2.caption="怪物,血量:"&bend if更多私信吧