Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

VBÈçºÎ´´½¨¼Çʱ¾µÄ.TXTÎĵµ

VBÈçºÎÔÚÖ¸¶¨µÄÎļþ¼ÐÖÐ(ÈçDÅ̵ÄTempÎļþ¼Ð)´´½¨Ò»¸öÃûΪabcµÄ¼Çʱ¾µÄ.TXTÎĵµ,¶øÇÒÏòÎĵµÖÐÊäÈëÖ¸¶¨TextBox¿Ø¼þÖеÄÄÚÈÝ

Dim txtStream As TextStream
    Dim fso As FileSystemObject
    Set fso = New FileSystemObject
    Set txtStream = fso.OpenTextFile(App.Path & "\abc.txt", ForWriting, True)

txtStream.Write text1.text

Open "c:\x.txt" For Output As #1
Print #1, Text1.Text
Close #1


TempÎļþ¼ÐÈç¹û²»´æÔÚ£¬ÒªÏÈ´´½¨¡£

VB code:

Private Sub Command1_Click()
If Dir("d:\temp") = " " Then MkDir "d:\temp"
Open "d:\temp\abc.txt" For Output As #1
Print #1, Text1.Text
Close #1
End Sub



ѧϰÁË

1Â¥Õý½â

Open "d;\temp\abc.txt" For Append As #1
Print #1, Text1.Text
Close #1


append ±È Output  ºÃ

ÒýÓÃ
append ±È Output  ºÃ


²»Ò»¶¨°¡,Òª¿´ÔÚʲôÇé¿öÁË,



½¨ÒéÂ¥Ö÷È¥Âò±¾VB»ù´¡Êé¿´¿´°É£¬Õâ¸öÎÊÌâ̫С¶ù¿ÆÁË¡£
»òÕß×°ÉÏMSDN

ÒýÓÃ
append ±È Output  ºÃ

²»Í¬³¡ºÏµÄÓ÷¨¶øÒÑ

ûÓÐË­±ÈË­ºÃµÄ˵·¨.

¸øÄã¸öÕÛÌÚµãµÄ£º

¸ñʽ£º


Ïà¹ØÎÊ´ð£º

ΪʲôCдDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷ÓÃ

ΪʲôCдµÄDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷Óã¿
VBÀïΪʲôÓеÄDLLÖ±½Óͨ¹ýÒýÓÿÉÒÔʹÓã¿ÓеÄÐèҪͨ¹ýdeclareÉêÃ÷Íⲿº¯Êý£¿ÕâЩDLLÓÐʲô²î±ð£¿

1¡¢ÎªÊ²Ã´PBÄÜͨ¹ýDECLAREÉùÃ÷¶øVB²»ÐУ¿
2¡¢Èç¹ûÕâ¸ödllÖÐµÄ ......

VBÈçºÎ×èֹij³ÌÐòÔËÐС££¿

±ÈÈç½ø³Ì¼ÓÔØÐµijÌÐò¡£

ÔÚÆäÔËÐÐ֮ǰ×èÖ¹¡£

È»ºóÔÊÐíºó·ÅÐС£


±ÈÈç³ÌÐòÖ÷Îļþ·¾¶ÊÇc:\test\test.exe£¬½¨Á¢ÄÚÈÝÈÎÒâµÄÎļþc:\test\test.exe.manifest¡£

¾ÍÊDz»ÖªµÀ³ÌÐòÎļþ·¾¶¡£

ÉèÖ ......

VBÐÞ¸Ä×¢²á±í

ÓÃVBÔõôֻÕë¶Ôwindows×Ô´øµÄÎļþµÄÓÒ¼üÌí¼Ó²Ëµ¥ È磨.txt .doc)
Õâ¸öÊÇÖ»Õë¶ÔÒÔÕâÁ½¸öΪÀ©Õ¹ÃûµÄÎļþ²Ù×÷
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\txtfile\shell\[Ëæ±ãÆðÃû]\command]
@= ......

VBÈçºÎÁªÏµÁ½¸ö´°Ì壿

¾ÍÊÇÉè¼ÆÒ»¸ö¼ÆËã»úÄ£Ä⿼ÊÔϵͳ£¬´øÓÐѧÉúºÍ¹ÜÀíÔ±£¬ËùÒԵǼ´°ÌåºÍÖ÷´°ÌåÏë·Ö¿ª£¬µÇ½ѧÉúµÄÏÔʾѧÉúµÄÖ÷´°Ì壬µÇ½¹ÜÀíÔ±ÏÔʾ¹ÜÀíÖ÷´°Ì壬ÎÒÖ»»áÒ»¸ö´°ÌåÓÃÒ»¶Ñ¿Ø¼þ£¬ÏÖÔÚÏíÓжà¸öÖ÷´°Ì壬²»ÖªµÀÔõô×ö£¬Ï£ÍûÇë´ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ