- UID
- 7437
- 精华
- 积分
- 1189
- 威望
- 点
- 宅币
- 个
- 贡献
- 次
- 宅之契约
- 份
- 最后登录
- 1970-1-1
- 在线时间
- 小时
|
楼主 |
发表于 2024-11-22 03:25:29
|
显示全部楼层
本帖最后由 tlwh163 于 2024-12-4 19:33 编辑
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3030
ClientLeft = 120
ClientTop = 450
ClientWidth = 4560
LinkTopic = "Form1"
ScaleHeight = 3030
ScaleWidth = 4560
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command5
Caption = "Command5"
Height = 345
Left = 1830
TabIndex = 5
Top = 1515
Width = 1170
End
Begin VB.CommandButton Command4
Caption = "Command4"
Height = 375
Left = 1875
TabIndex = 4
Top = 900
Width = 1110
End
Begin VB.CommandButton Command3
Caption = "Command3"
Height = 375
Left = 405
TabIndex = 3
Top = 1905
Width = 975
End
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 345
Left = 315
TabIndex = 2
Top = 1335
Width = 1125
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 375
Left = 375
TabIndex = 1
Top = 780
Width = 1125
End
Begin VB.TextBox Text1
Height = 345
Left = 1140
TabIndex = 0
Text = "Text1"
Top = 225
Width = 1440
End
Begin VB.Label Label1
Caption = "Label1"
Height = 270
Left = 660
TabIndex = 6
Top = 2595
Width = 1005
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Command1.Enabled = False
Dim x As New QWord
Print
x.ValueOf = Text1.Text
Print "UINT64 (DEC)", x.toString, "VT_" & x.VType
Print "UINT64 (HEX)", x.toHex
Me.Refresh
Command1.Enabled = True: Command1.SetFocus
End Sub
Private Sub Command2_Click()
Command2.Enabled = False
Dim x As New QWord
Print
x.ValueOf = Text1.Text: Print "x = ", x.ValueOf, "VT_" & x.VType
x.ValueOf = Text1.Text: Print "x + 10 ", x.ValueOf + 10
x.ValueOf = Text1.Text: Print "x - 10 ", x.ValueOf - 10
x.ValueOf = Text1.Text: Print "x * 1.23 ", x.ValueOf * 1.23
x.ValueOf = x.ValueOf * 1.23: Print "x = x * 1.23", x.ValueOf
x.ValueOf = Text1.Text: Print "x / 13 ", x.ValueOf / 13
x.ValueOf = x.ValueOf / 13: Print "x = x / 13 ", x.ValueOf
Me.Refresh
Command2.Enabled = True: Command2.SetFocus
End Sub
Private Sub Command3_Click()
Command3.Enabled = False
Dim x As New QWord
Print
x.ValueOf = Text1.Text: Print "x = ", x.ValueOf, "VT_" & x.VType
x.ValueOf = Text1.Text: Print "x Mod 10 ", x.ValueOf Mod 10
x.ValueOf = x.ValueOf Mod 10: Print "x = x Mod 10", x.ValueOf
x.ValueOf = Text1.Text: Print "x And 10 ", x.ValueOf And 10
x.ValueOf = x.ValueOf And 10: Print "x = x And 10", x.ValueOf
x.ValueOf = Text1.Text: Print "x Or 10 ", x.ValueOf Or 10
x.ValueOf = x.ValueOf Or 10: Print "x = x Or 10 ", x.ValueOf
x.ValueOf = Text1.Text: Print "x Xor 10 ", x.ValueOf Xor 10
x.ValueOf = x.ValueOf Xor 10: Print "x = x Xor 10", x.ValueOf
x.ValueOf = Text1.Text: Print "Not x ", Not x.ValueOf
x.ValueOf = Not x.ValueOf: Print "x = Not x ", x.ValueOf
Me.Refresh
Command3.Enabled = True: Command3.SetFocus
End Sub
Private Sub Form_DblClick()
Me.Cls
End Sub
Private Sub Form_Load()
Me.Width = Me.Width - Me.ScaleWidth + 640 * Screen.TwipsPerPixelX
Me.Height = Me.Height - Me.ScaleHeight + 480 * Screen.TwipsPerPixelY
Me.Caption = "unsigned int / int64 test"
Dim x As Integer, y As Integer, w As Integer, h As Integer
h = 300: w = 1800: x = Me.ScaleWidth - w - 180: y = 180
Text1.Move x, y, w, h: Text1.Text = "BCDEF0198765432": y = y + h + 180: h = 450
Command1.Move x, y, w, h: Command1.Caption = "Convert DEC/HEX": y = y + h + 180
Command2.Move x, y, w, h: Command2.Caption = "Add/Sub/Mul/Div": y = y + h + 180
Command3.Move x, y, w, h: Command3.Caption = "Mod/And/Or/Xor/Not": y = y + h + 180
Command4.Move x, y, w, h: Command4.Caption = "ToDo...": y = y + h + 180
Command5.Move x, y, w, h: Command5.Caption = "ToDo...": y = y + h + 180
Label1.Move 360, Me.ScaleHeight - 480, 3000, 300
Label1.Caption = "Double_Click to Cls Print...": Label1.ForeColor = vbRed
Me.AutoRedraw = True
End Sub
|
|