VB利用地址偏移访问内存,整个处理过程 封装在事件函数中,用户单击后,执行以下代码: Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) Private Sub Form_Load() Dim i As Long Dim j As Long i = 1234 j =
VB 绘制规则的圆形线条图案,根据用户输入的数据,生成嵌套的圆形图案: Const pi = 3.1415926 常量声明 Private Sub Text1_KeyPress(KeyAscii As Integer) Dim r, x, y, a, b As Single If KeyAscii = 13 Then 回车绘图 Cls n = Val(Text1) 取用户输入值 r = Form1.ScaleHeight / 4 设置圆半径
Dim A As Long, B As Long, C As Long
For i = 0 To Text1(2).Text - 1 '多少组 ZuGao
'Picture1.Line (Pi1X, ZuGao * i + Pi1Y)-(Pi2X, ZuGao * i + Pi1Y), vbRed
'添加组线
Dim Mm As Long: Mm = IIf(i = 0, ShuoJin, 0)
A = Pi1X + Mm
B = ZuGao * i +