Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÏÂÔØÎļþ

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Sub Command1_Click()
Dim Url As String, Filepath As String
Url = "h ......

VB´°¿ÚÈ«ÆÁÓëÖö¥

È«ÆÁ
Private Sub Form_Load()
    Me.Width = Screen.Width
    Me.Height = Screen.Height
    Me.WindowState = 2
End Sub
Öö¥
1.ÔÚVBµÄͨÓôúÂëÀïдÈëAPIÉùÃ÷
Private Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, _
  &n ......

vb ´®¿ÚͨѶ

MSComm¿Ø¼þÌṩÁËÁ½ÖÖ´¦ÀíͨÐŵķ½Ê½£ºÒ»ÖÖΪʼþÇý¶¯·½Ê½£¬¸Ã·½Ê½Ï൱ÓÚÒ»°ã³ÌÐòÉè¼ÆÖеÄÖжϷ½Ê½¡£µ±´®¿Ú·¢Éúʼþ»ò´íÎóʱ£¬MSComm¿Ø¼þ»á²úÉúOnCommʼþ£¬Óû§³ÌÐò¿ÉÒÔ²¶»ñ¸Ãʼþ½øÐÐÏàÓ¦´¦Àí¡£±¾ÎĵÄÁ½¸öÀý×Ó¾ù²ÉÓø÷½Ê½¡£ÁíÒ»ÖÖΪ²éѯ·½Ê½£¬ÔÚÓû§³ÌÐòÖÐÉè¼Æ¶¨Ê±»ò²»¶¨Ê±²éѯ MSComm¿Ø¼þµÄijЩÊôÐÔÊÇ·ñ·¢Éú±ä»¯£¬´Ó¶øÈ ......

vb½çÃæ×ÔÊÊÓ¦²»Í¬·Ö±æÂÊÖÕ¼«½â¾ö·½°¸

ÏÖÔÚ¿íÆÁ£¬´óÆÁÄ»ÏÔʾÆ÷Ô½À´Ô½ÆÕ±é£¬Ô­À´ÔÚ800*600ÏÂÉè¼ÆµÄÈí¼þ½çÃæ£¬ÔÚ´óÆÁÄ»ÏÔʾÆ÷£¨1680*1050£©ÉϽçÃæ×ÜÊÇËõµ½Ò»½Ç£¬·Ç³£ÄÑ¿´£¬Òª½«ÀϳÌÐòµÄ½çÃæ°´ÕÕ²»Í¬µÄ·Ö±æÂÊÔÚÖØÐ½øÐÐÉè¼Æ±à³Ì£¬Õû¸ö¹ý³Ì±È½Ï¸´ÔÓ¶øÇÒʵÓÃÐÔ²»´ó£¬Èç¹ûÔ­À´³ÌÐò±È½Ï´óÇÒ½çÃæ±È½Ï¶àµÄ»°ÄÇô¹¤×÷Á¿Ò²½«ÊǾ޴óµÄ£¬¶øÇÒ»¹¿ÉÄܳöÏÖÆäËû´íÎó£¬ÓÐûÓÐÒ»ÖÖÖØ ......

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ºÅ