vbʹÓÃopen·½·¨¶ÁдÎļþ
vbʹÓÃopen·½·¨¶ÁдÎļþ
£¨Ò»£©´ò¿ªºÍ¹Ø±ÕÎļþ
¡¡¡¡1¡¢Ë³ÐòÎļþ
¡¡¡¡´ò¿ªË³ÐòÎļþ£¬ÎÒÃÇ¿ÉÒÔʹÓÃOpenÓï¾ä¡£ËüµÄ¸ñʽÈçÏ£º
Open pathname For [Input |Output |Append] As [#]filenumber [Len = buffersize]
¡¡¡¡ËµÃ÷£º
¡¡¡¡£¨1£©²ÎÊýpathname ±íʾҪ´ò¿ªµÄÎļþÃû£¬ÎļþÃû¿ÉÒÔ°üº¬ÓÐÇý¶¯Æ÷ºÍĿ¼
¡¡
¡¡£¨2£©Input Output
ºÍAppendÓÃÓÚÉèÖÃ˳ÐòÎļþµÄ´ò¿ª·½Ê½¡£ÆäÖУ¬Input±íʾ´Ó´ò¿ªµÄÎļþÖжÁÈ¡Êý¾Ý¡£ÒÔÕâÖÖ·½Ê½´ò¿ªÎļþʱ£¬Îļþ±ØÐë´æÔÚ£¬·ñÔò»á²úÉú´íÎó¡£
Output±íʾÏò´ò¿ªµÄÎļþÖÐдÈëÊý¾Ý¡£ÒÔÕâÖÖ·½Ê½´ò¿ªÎļþʱ£¬ÎļþÖÐÔÓеÄÊý¾Ý½«±»¸²¸Ç£¬ÐµÄÊý¾Ý½«´ÓÎļþ¿ªÊ¼Ð´Èë¡£Èç¹ûÎļþ²»´æÔÚ£¬Ôò´´½¨Ò»¸öÐÂÎÄ
¼þ¡£Append±íʾÏò´ò¿ªµÄÎļþÖÐÌí¼ÓÊý¾Ý¡£ÒÔÕâÖÖ·½Ê½´ò¿ªÊ±£¬ÎļþÖÐÔÓеÄÊý¾Ý½«±»±£Áô£¬ÐµÄÊý¾Ý½«´ÓÎļþΪ¿ªÊ¼Ìí¼Ó¡£Èç¹ûÎļþ²»´æÔÚ£¬Ôò´´½¨Ò»¸öÐÂ
Îļþ¡£
¡¡¡¡£¨3£©As[#]filenumber ×Ó¾äÓÃÓÚΪ´ò¿ªµÄÎļþÖ¸¶¨ÎļþºÅ.¶ÔÎļþ½øÐжÁд²Ù×÷ʱ,ÒªÓÃÎļþºÅ±íʾ¸ÃÎļþ.ÎļþºÅÊǽéÓÚ1~511Ö®¼äµÄÕûÊý,¼È¿ÉÒÔÊÇÊý×Ö,ÓÖ¿ÉÒÔÊDZäÁ¿.Ò²¿ÉÒÔÊ¡ÂÔ²»ÓÃ.
¡¡¡¡(4)µ±ÔÚÎļþÓë³ÌÐòÖ®¼ä¿½±´Êý¾Ýʱ,Len=buffersize×Ó¾äÖ¸¶¨»º³åÇøµÄ×Ö·ûÊý.
¡¡¡¡ÀýÈç:
Open App.Path + "\test.dat" For Output As 1
Open App.Path + "\test.dat" For Output As 1
¡¡¡¡ÕâÁ½¾ä´úÂëÔÚµ±Ç°Ó¦ÓóÌÐòËùÔÚĿ¼Ï´´½¨ÁËÒ»¸öÃûΪtest.datµÄÎı¾Îļþ,·ÖÅäÎļþºÅΪ1.
Open App.Path + "\test.dat" For Input As [#]filenumber
¡¡¡¡ÕâÌõÓï¾äÊÇ´ÓÎı¾ÎļþÖжÁÈ¡Êý¾Ý.
Open App.Path + "\test.dat" For Append As [#]filenumber
¡¡¡¡ÕâÌõÓï¾äÔòÊÇÏñÎı¾ÎļþÖÐÌí¼ÓÊý¾Ý
¡¡¡¡2¡¢Ëæ»úÎļþ
¡¡¡¡²Ù×÷Ëæ»úÎļþ֮ǰ,Ê×ÏȱØÐ붨ÒåÓÃÓÚ±£´æÊý¾ÝÏîµÄ¼Ç¼ÀàÐÍ.¸Ã¼Ç¼ÊÇÓû§×Ô¶¨ÒåÊý¾ÝÀàÐÍ,ËûÃÇÊÇËæ»úÎļþÖд洢Êý¾ÝµÄ»ù±¾½á¹¹.ÀýÈç:
Type Student
¡¡No As Integer
¡¡Name As String * 20
¡¡age As Integer
End Type
Dim Stud As Student ‘¶¨ÒåÒ»¸ö¿ÉÒÔ´æ·ÅѧÉú²ÄÁϵıäÁ¿
¡¡¡¡Ëæ»úÎļþÖÐ,ËùÓеÄÊý¾Ý¶¼½«±£´æµ½Èô¸É¸ö½á¹¹ÎªStudentÀàÐ͵ļǼÖÐ, ¶ø´ÓËæ»úÎļþÖжÁ³öµÄÊý¾ÝÔò¿ÉÒÔ´æ·Åµ½±äÁ¿StudÖÐ.
¡¡¡¡Ö®ºóÎÒÃǾͿÉÒÔ´ò¿ª²¢¶ÁдÎļþÁË.ÏÂÃæÊÇ´ò¿ªËæ»úÎļþµÄÓï·¨¸ñʽ:
Open filename For Random as [#]filenumber Len = Reclengt
Ïà¹ØÎĵµ£º
Function crypt(Action As String, Key As String, Src As String) As String
'Action
' E encrypts, D decrypts,
'Key is a unique string needed to en/decrypt (either
' hardcode or setup something for the user to enter.
'Src is the string to be en/decrypted.
On Error GoTo errHandl ......
Option Explicit
Private Type UNICODE_STRING
Length As Integer
MaximumLength As Integer
Buffer As Long
End Type
Private Type OBJECT_ATTRIBUTES
Length As Long
RootDirectory As Long
  ......
°ÑÊó±êÒƵ½ÆÁĻָ¶¨Î»Öà È磨111.111£© µ¥»÷Ò»ÏÂ
ÔÙÒƵ½ÆÁÄ»ÁíÒ»Ö¸¶¨Î»ÖÃÖ¸¶¨Î»Öà È磨222.222£©µ¥»÷Ò»ÏÂ
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Declare Function SetCursorPo ......
C#×Ô¼ºÃ»ÓÐInputboxÕâ¸öÀ࣬µ«ÊÇInputboxÒ²ÂùºÃÓõģ¬ËùÒÔÓÐÁ½ÖÖ·½·¨¿ÉÒÔʹÓÃ
Ò»£º.¼ä½Óµ÷ÓÃvbÖеÄInputbox¹¦ÄÜ
1¡£ÔÚÏîÄ¿ÖÐÌí¼Ó¶ÔMicrosoft.VisualBasicÒýÓÃ
2¡£ÔÚÏîÄ¿ÖÐÌí¼ÓÃüÃû¿Õ¼äUsing Microsoft.VisualBasic;
&n ......
Ç°¼¸ÈÕ£¬Óиö¸çÃÇ˵ÓкܶàµçÓ°£¬ÎÊÎÒÒª²»Òª£¿ÎÒ¾ÍÈÃËûÒ»¸öÒ»¸öµÄд¹ýÀ´£¬ÈøçÃÇÀÛ¸ö²»Çá¡£ËùÒÔ¾ÍÏë¼òµ¥Ð´¸ö³ÌÐò£¬»ñÈ¡Ò»ÏÂÎļþ¼ÐÏÂÃæµÄËùÓÐÎļþÃû³Æ£¬ÕâÑù¾Í¿ÉÒÔ½ÚÊ¡ºÜ¶àʱ¼äÁË¡£
Èí¼þÄØ£¬ÎÒÒѾÉÏ´«µ½ÍøÕ¾ÁË£ºhttp://download.csdn.net/source/1802599
vb°æ±¾Ä¿Â¼»ñÈ¡Æ÷ 1.0£¨Áú¾í·ç³öÆ·£©
˵Ã÷£º
1.Ñ¡ºÃĿ¼ºó£ ......