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

ÖØÊ°VBÖ®Èý£¬¶þ½øÖÆÎļþƪ

ÖØÊ°VBÖ®Èý£¬¶þ½øÖÆÎļþƪ
PMP ¹Ø¾¢ËÉ
     ¹íʹÉñ²î£¬09Äê12ÔÂÈëÖ°µÄ¹«Ë¾ÈÔʹÓÃVB¿ª·¢Èí¼þ£¬ËäÈ»²¢·Çרְ¿ª·¢£¬µ«Ò²²»µÃ²»ÔÚʸô4ÄêÖ®ºó£¬ÖØÐÂʹÓÃVB¡£
¶ÁÈ¡¡¢Ð޸Ķþ½øÖÆÎļþÈÔÊǴ󲿷ֱà³ÌÓïÑԵĻù±¾¿ª·¢¼¼ÄÜ¡£¿ÉÒÔÌá¸ß´¦ÀíÎļþЧÂÊ£¬Ö÷ÒªÓ¦ÓÃÔÚͨÐÅ¡¢½»»»Êý¾ÝµÈ·½Ãæ¡£
'open   filename$   for   binary   #filenumber'ÒÔ¶þ½øÖÆ·½Ê½½¨Á¢»òÕß´ò¿ªÎļþ£¬È»ºóÔÙÓÃ
  'Put #FileNumber, postion, inputdata 'дÈëÊý¾Ýinputdata£¬
  'Get #FileNumber, postion, outputdata '¶Á³öÊý¾Ýµ½outputvarible
#FileNumber, ´ò¿ªµÄ¶þ½øÖÆÎļþÁ÷¡£
 postion,    ÎļþÖеÄÊý¾ÝλÖá£
 inputdata   ÊäÈëÊý¾Ý»º³å¡£¿ÉÒÔʹÓÃÊý×é»ò×Ö·û´®¡£
 outputdata  Êä³öÊý¾Ý»º³å¡£¿ÉÒÔʹÓÃÊý×é»ò×Ö·û´®¡£
´úÂë
 
Sub read()
Dim strFileName1, s As String
Dim aryContent(20) As Byte
strFileName1 = App.Path & "\test.hex"
Open strFileName1 For Binary As 1
Get #1, 120, aryContent() '´ÓÎļþÖÐ120×Ö½Ú´¦È¡³ö³¤¶È20µÄÊý¾Ýµ½Êý×éÖС£
msgbox(aryContent())      'ÒÔ16½øÖƵķ½Ê½ÏÔʾ¡£
s = Space(20)     'ÖØ¶¨Òå×Ö·û´®³¤¶È¡£
Get #1, 2514, s   ' ´ÓÎļþÖÐ120×Ö½Ú´¦È¡³ö³¤¶È20µÄÊý¾Ýµ½×Ö·û´®ÖС£
msgbox(s)         'ÒÔ×Ö·ûµÄ·½Ê½ÏÔʾ¡£
Close 1
End Sub
Sub write()
Dim strFileName1, s As String
Dim aryContent(20) As Byte
strFileName1 = App.Path & "\test.hex"
Open strFileName1 For Binary As 1
s = Space(20)
s = "teststtsestssts33333"
 
Put #1, 2486, s         'ÔÚÎļþÖÐ2486×Ö½Ú´¦Ð´È볤¶È20µÄ×Ö·û´®Êý¾Ý¡£
Debug.Print s
aryContent(0) = &H4F    '³õʼ»¯Êý×é
aryContent(1) = &H33
aryContent(2) = &HA1
aryContent(3) = &H42
aryContent(4) = &H8D
Put #1, 2514, aryContent()      ''ÔÚÎļþÖÐ2514×Ö½Ú´¦Ð´È볤¶È20µÄÊ®Áù½øÖÆÊý×éÊý¾Ý¡£
Debug.Print aryContent()
Close 1
End Sub


Ïà¹ØÎĵµ£º

[VB]»ñÈ¡SYSKEY

ºÜ¾ÃÒÔǰµÄÒ»¸ö´úÂëÁË¡£¡£¡£¡£¡£ÄÇʱ»¹³ÁÃÔÓÚÑо¿WindowsXPµÇ¼ÃÜÂëµÄ¼ÆËã·½·¨¡£¡£¡£¡£
ÏÈн¨Ò»¸öVB¹¤³Ì£¬»­Ò»¸öCommandButton£¬¸ÄÃûΪcmdGetSYSKEY£¬»­Ò»¸öTextBox£¬¸ÄÃûΪtxtSYSKEY£¬È»ºóÕ³ÌùÏÂÃæµÄ´úÂ룬ÔËÐм´¿É£¬ÔÚWindowsXP SP2 Build 2600 + VB6.0 SP6ϲâÊÔͨ¹ý£¬»ñµÃµÄSYSKEYÓëCain&Abel v4.9.6Ò»Ö¡£¡£¡£¡£ ......

»ñµÃVB listbox Ñ¡ÖÐÏîÄ¿(¶àÏî)µÄÒ»¸öºÃ·½·¨

´«Í³·½·¨Ê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 ......

VBʹÓÃCopyMemory×Ö·û´®´¦Àí

²»ÄÜÖ±½ÓʹÓÃCopyMemoryStr£¬Ó¦¸Ã½«×Ö·û´®×ªÎªbyteÊý×飬ȻºóʹÓÃCopyMemory
Property Get item() As String
    If h = 0 Then ErrRaise ERROR_INVALID_DATA
    'BugAssert p <> pNull
    Dim c As Long, ptr0 As Long
    Dim ab() As Byte
& ......

vb class Property Get¡¢Property Let ʹÓÃ

vb class Property Get¡¢Property Let ʹÓÃ
<%
'ÔÚ Class ¿éÖУ¬³ÉԱͨ¹ýÏàÓ¦µÄÉùÃ÷Óï¾ä±»ÉùÃ÷Ϊ Private(˽ÓгÉÔ±£¬Ö»ÄÜÔÚÀàÄÚ²¿µ÷ÓÃ) »ò Public(¹«ÓгÉÔ±£¬¿ÉÒÔÔÚÀàÄÚÍⲿµ÷ÓÃ) ¡£
'±»ÉùÃ÷Ϊ Private µÄ½«Ö»ÔÚ Class ¿éÄÚÊǿɼûµÄ¡£±»ÉùÃ÷Ϊ Public ²»½öÔÚ Class ¿éµÄÄÚ²¿ÊǿɼûµÄ£¬¶Ô Class ¿éÖ®ÍâµÄ´úÂëÒ²Êǿɼûµ ......

ʹÓÃVC±àдVBʹÓÃDLL

ʹÓÃVC±àдVBʹÓÃDLL
Ò»¡¢ÔÚº¯Êý¶¨Òåǰ±ØÐë¼ÓÉÏextern "c"£¬_stdcall¹Ø¼ü×Ö¡£
 extern "C" int _stdcall Sum(int x,int y)
 {
  return x+y;
 }
 
¶þ¡¢DLLµÄ.defÎļþÖбØÐë¼ÓÉÏÈë¿Úº¯Êý
    EXPORTS
     sample @1
     ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ