易截截图软件、单文件、免安装、纯绿色、仅160KB

用VB画4个点的NURBS曲线参考代码

Dim p(10000, 1) As Double
Dim num As Integer
Dim ptx As Single
Dim pty As Single
Dim w0, w1, w2, w3 As Single
Private Sub Command1_Click()
Dim t As Single
 Dim i As Integer
 Dim f0, f1, f2, f3 As Single
 Picture1.DrawWidth = 3
      For t = 0 To 1 Step 1 / 1000
      w0 = Val(Form1.Text1.Text)
      w1 = Val(Form1.Text2.Text)
      w2 = Val(Form1.Text3.Text)
      w3 = Val(Form1.Text4.Text)
       f0 = 1 / 6 * (-t ^ 3 + 3 * t ^ 2 - 3 * t + 1)
       f1 = 1 / 6 * (3 * t ^ 3 - 6 * t ^ 2 + 4)
       f2 = 1 / 6 * (-3 * t ^ 3 + 3 * t ^ 2 + 3 * t + 1)
       f3 = 1 / 6 * (t ^ 3)
         ptx = (f0 * p(0, 0) * w0 + f1 * p(1, 0) * w1 + f2 * p(2, 0) * w2 + f3 * p(3, 0) * w3) / (f0 * w0 + f1 * w1 + f2 * w2 + f3 * w3)
         pty = (f0 * p(0, 1) * w0 + f1 * p(1, 1) * w1 + f2 * p(2, 1) * w2 + f3 * p(3, 1) * w3) / (f0 * w0 + f1 * w1 + f2 * w2 + f3 * w3)
         Picture1.PSet (ptx, pty), vbRed
       
       Next
       Picture1.DrawWidth = 1
       For i = 0 To num - 2
       Picture1.Line (p(i, 0), p(i, 1))-(p((i + 1), 0), p((i + 1), 1)), vbGreen
       Next
End Sub
Private Sub Command2_Click()
Dim i As Integer
 For i = 0 To num - 2
    Picture1.Line (p(i, 0), p(i, 1))-(p((i + 1), 0), p((i + 1), 1)), vbWhite
    Next
    For i = 0 To num
  
    Picture1.Circle (p(i, 0), p(i, 1)), 40, vbWhite
   


相关文档:

目前发现的最强悍的VB隐藏进程方法

VB隐藏进程问题的讨论由来已久,效果有好有坏,反正是各有各的招,偶然机会看到planet-source一段隐藏进程的文章,作者说采用了kernel mode driver!方法,
单从技术方法而言,这是目前见到隐藏进程中最强悍的了(个人见解,井底之蛙了),不过这种东西用在正义的人手上是一个除暴安良的利器,用心叵测者就不好说了,但是技术终归是技术 ......

VB文件粉碎机


'代码:
Option Explicit
'======================用于查找进程和终止进程的API函数常数定义================ =====
Private Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
Private Declare Function ProcessF ......

VB六个数取最大值和最小数

mxl=1                          && 最大的文本框编号
mnl=1                  &n ......

vb用api调用对话框

建一个模块
Public Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Public Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilt ......

VB 编程中如何使窗口右上角的关闭按钮(X)失效

1、Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As
Integer)
        Cancel = True
       End Sub
    2、Private Sub
Form_Unload(Cancel As Integer)
        Cancel = ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号