vb class Property Get¡¢Property Let ʹÓÃ
vb class Property Get¡¢Property Let ʹÓÃ
<%
'ÔÚ Class ¿éÖУ¬³ÉԱͨ¹ýÏàÓ¦µÄÉùÃ÷Óï¾ä±»ÉùÃ÷Ϊ Private(˽ÓгÉÔ±£¬Ö»ÄÜÔÚÀàÄÚ²¿µ÷ÓÃ) »ò Public(¹«ÓгÉÔ±£¬¿ÉÒÔÔÚÀàÄÚÍⲿµ÷ÓÃ) ¡£
'±»ÉùÃ÷Ϊ Private µÄ½«Ö»ÔÚ Class ¿éÄÚÊǿɼûµÄ¡£±»ÉùÃ÷Ϊ Public ²»½öÔÚ Class ¿éµÄÄÚ²¿ÊǿɼûµÄ£¬¶Ô Class ¿éÖ®ÍâµÄ´úÂëÒ²ÊǿɼûµÄ¡£
'ûÓÐʹÓà Private »ò Public Ã÷È·ÉùÃ÷µÄ±»Ä¬ÈÏΪ Public¡£ÔÚÀàµÄ¿éÄÚ²¿±»ÉùÃ÷Ϊ Public µÄ¹ý³Ì£¨Sub »ò Function£©½«³ÉΪÀàµÄ·½·¨¡£
'Public ±äÁ¿½«³ÉΪÀàµÄÊôÐÔ£¬Í¬Ê¹Óà Property Get¡¢Property Let ºÍ Property Set ÏÔʽÉùÃ÷µÄÊôÐÔÒ»Ñù¡£
'ÀàµÄȱʡÊôÐԺͷ½·¨ÊÇÔÚËüÃǵÄÉùÃ÷²¿·ÖÓà Default ¹Ø¼ü×ÖÖ¸¶¨µÄ¡£
Class myClass
'//----ÉùÃ÷£¨ÉùÃ÷¾ÍÊǶ¨Ò壩myClassÀàµÄÀàÄÚ²¿£¨Ë½ÓеÄ[Private]£©±äÁ¿
Private strAuthor
Private strVersion
Private strExample
'//---------------------------¶¨ÒåÀàµÄʼþ-------------------------------//
'//----Class_Initialize()ÊÇÀàµÄ³õʼ»¯Ê¼þ£¬Ö»ÒªÒ»¿ªÊ¼Ê¹ÓøÃÀ࣬Ê×ÏȻᴥ·¢¸Ã²¿·ÖµÄÖ´ÐÐ.
'ÏÂÃæÎÒÃÇ»áÔڸóÉÔ±Öгõʼ»¯¸ÃÀàµÄ×÷ÕߺͰ汾ÒÔÔÚÆÁÄ»ÉÏÏÔʾһϸÃÀàÒѾ¿ªÊ¼ÁË
Private Sub Class_Initialize()
strAuthor = "˼Դ"
strVersion = "1.0"
Response.Write "<br/>myClass¿ªÊ¼ÁË<br/>"
End Sub
'//----Class_Terminate()ÊÇÀàµÄ½áÊøÊ¼þ£¬Ö»ÒªÒ»Í˳ö¸ÃÀ࣬¾Í»á´¥·¢¸Ãʼþ.
'ÏÂÃæÎÒÃÇ»á¸ÃʼþÖÐÉ趨Í˳ö¸ÃÀàʱ»áÔÚÆÁÄ»ÉÏÏÔʾ¸ÃÀàÒѽáÊøÁË¡£
Private Sub Class_Terminate()
Response.Write "<br/>myClass½áÊøÁË<br/>"
End Sub
'//---------------------------Óû§×Ô¼º¶¨ÒåµÄ·½·¨-------------------------------//
'//----¸Ã·½·¨·µ»ØÒ»¸ö°æ±¾ÐÅÏ¢
Public Sub Information()
Response.Write "<br/>Coding By <a href='mailto:coder@sinobe.com'>Maxid_Zen</a> @ <a href='http://www.design60s.com'>www.design60s.com</a>.<br/>"
End Sub
'//---------------------------¶¨ÒåÀàµÄÊä³öÊôÐÔ-------------------------------//
'//----¶¨ÀàµÄÊôÐÔ£¬¸ÃÊôÐÔÊÇÈÃÓû§³õʼ»¯strExample±äÁ¿
Public Property Let setExample(ByVal strVar)
strExample = strVar
End Property
'//---------------------------¶¨ÒåÀàµÄÊä³öÊôÐÔ-------------------------------//
Ïà¹ØÎĵµ£º
'*********************************************************************
' ³ÌÐòÉè¼Æ ºÓÄϹ¤Òµ´óѧÐÅÏ¢Íø-http://www.hautbbs.com.cn
'±¾Õ¾ÒÔ·½±ãÔÚУʦÉúÐÅÏ¢½»Á÷Ϊ×ÚÖ¼£¬ÊÇÒ»¸ö¼¯ÐÅÏ¢´«µÝ¡¢×ÊÁϲéѯ¡¢ÓéÀÖ½»ÓÑΪһÌåµÄÐ£Ô°ÍøÂçÆ½Ì¨!
'ÎÒվΪÄúÃâ·ÑÌṩÐÅϢƽ̨,ÄúÖ ......
VBÖд´½¨µÄDLLÖ»ÊÇCOM×é¼þ£¬ÎÞ·¨×÷ΪÊä³öº¯ÊýµÄDLL¡£½ñÌì´ÓÅóÓÑÄÄÀï¸ãµ½Ò»ÖÖ¿ÉÒÔ´´½¨Êä³öº¯ÊýµÄDLLµÄ·½·¨£¬ÐÀϲ֮Ó࣬²»¸Ò¶ÀÏí£¬ÏÖÔÚ°ÑËû½éÉܸø´ó¼Ò¡£
¡¡¡¡VB±àÒëÎļþʵ¼ÊÉϲÉÈ¡ÁËÁ½´Î±àÒëµÄ·½·¨£¬Ê×ÏÈÊǵ÷ÓÃc2.exe²úÉúOBJÎļþ£¬È»ºóµ÷ÓÃLink.exeÁ¬½Ó¡£Èç¹ûÔÚlinkµÄʱºòÌí¼ÓEXPORTÑ¡Ïʵ¼ÊÉÏÊÇ¿ÉÒÔÊä³öº¯ÊýµÄ¡£µ«ÊÇ£¬ÔÚV ......
´«Í³·½·¨ÊDZéÀúÒ»±é
Èç¹ûlistbox ÏîÄ¿¹ý¶à
Ã÷ÏÔËٶȲ»ÐÐ
ºÃ·½·¨ÊÇͨ¹ýsendmessge·¢ÏûÏ¢¸ølistboxÈÃËû°ÑÑ¡ÖÐÏîĿֱ½Ó´«µ½²ÎÊýÊý×éÖÐ
You can use the SendMessage() API function instead.
As
you probably know, this function lets you send a message to one or more
windows. The declaration statement conforms ......
×î¼òµ¥µÄ·½·¨ÊÇʹÓÃfilesystemobject¶ÔÏó¡£¶øËü²¢·ÇVBÄÚÖöÔÏó£¬
ÐèÒýÓòſÉÒÔʹÓá£
1£®filesystemObject¶ÔÏóÒýÓÃ
“¹¤³Ì/ÒýÓÃ/microsoft scription Runtime”
ÔÚ¶ÔÏóä¯ÀÀÆ÷´°¿ÚÖÐÑ¡“scripting”Ä£¿é£¬¿´µ½ÔöÁËÐí¶à¶ÔÏó£¬
drive filesystemobject textstream &nbs ......
Welcome to Microsoft Developer Support, Languages team blog! You will find a lot of language related troubleshooting resources here.
Troubleshooting PInvoke Related Issues
I am back with some more PInvoke Stuff. Recently I was working on a PInvoke issue which I found interesting ......