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

vb ±£´æͼƬµ½Êý¾Ý¿â

'¶ÁÊý¾Ýµ½¶þ½øÖÆ×Ö¶Î
Public Sub ReadfromBLOB(filed As ADODB.Field, Filen As String)
Dim DataFile As Integer, Fl As Long, Chunks As Integer
Dim Fragment As Integer, Chunk() As Byte, i As Integer
'´«ËͿ鵥λ´óС
Const ChunkSize As Integer = 16384
Dim MediaTemp As String
Dim lngOffset As Long
Dim lngTotalSize As Long
Dim strChunk As String
Dim MediaID As Long
On Error Resume Next
DataFile = FreeFile
Open Filen For Binary Access Write As DataFile
lngTotalSize = filed.ActualSize
Chunks = lngTotalSize \ ChunkSize
Fragment = lngTotalSize Mod ChunkSize
'ReDim Chunk(ChunkSize)
ReDim Chunk(Fragment)
Chunk() = filed.GetChunk(ChunkSize)
Put DataFile, , Chunk()
lngOffset = lngOffset + ChunkSize
Do While lngOffset < lngTotalSize
   Chunk() = filed.GetChunk(ChunkSize)
   Put DataFile, , Chunk()
   lngOffset = lngOffset + ChunkSize
Loop
Close DataFile
End Sub
'дÊý¾Ýµ½¶þ½øÖÆ×Ö¶Î
Public Sub SaveToBLOB(fieldBLOB As ADODB.Field, filename As String)
Dim DataFile As Integer, Fl As Long, Chunks As Integer
Dim Fragment As Integer, Chunk() As Byte, i As Integer
'´«ËͿ鵥λ´óС
Const ChunkSize As Integer = 16384
Dim MediaTemp As String
Dim lngOffset As Long
Dim lngTotalSize As Long
Dim strChunk As String
Dim MediaID As Long
DataFile = FreeFile
Open filename For Binary Access Read As DataFile
    Fl = LOF(DataFile)    ' ÎļþÖÐÊý¾Ý³¤¶È
    If Fl = 0 Then
       Close DataFile
    Else
    Chunks = Fl \ ChunkSize
    Fragment = Fl Mod ChunkSize
    'If Chunks <= 0 Then Chunks = 1
    ReDim Chunk(Fragment)
    Get DataFile, , Chunk()
    fieldBLOB.AppendChunk Chunk()
    ReDim Chunk(ChunkSize)
   
    For i = 1 To Chunks
     Get DataFile, , Chunk()
  &n


Ïà¹ØÎĵµ£º

VBÁ¬½ÓACCESSÊý¾Ý¿â¾«¼ò°æ

Option Explicit
Private Sub Form_Load()
'¹¤³Ì->ÒýÓÃ->Ñ¡ÖÐMicrosoft ActiveX Data Objects 2.8 Library
Dim shujukulianjie As New ADODB.Connection
Dim jiluji As New ADODB.Recordset
'Á¬½ÓÊý¾Ý¿âµÄ´úÂë¶Î
shujukulianjie.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Sour ......

VB¶Áȡע²á±í

Private Type SECURITY_ATTRIBUTES
   nLength As Long
   lpSecurityDescriptor As Long
   bInheritHandle As Boolean
End Type
Dim lang As String
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hkey As Long, ByV ......

vb´ò°üÏòµ¼ Éú³É°²×°Îļþ

vb¿ª·¢Èí¼þÊÇÔÚÒ»¶¨µÄ»·¾³Ï½øÐеģ¬Èçvisual basic 6.0  mssql»òaccessµÈ£¬µ«ÊÇ×îÖÕÈí¼þÒª¸ø¹ã´óȺÖÚʹÓ㬱ðÈ˲»¿ÉÄܶ¼°²×°ÕâЩ¶«Î÷£¬ËùÒÔÐèÒª´ò°ü£¬Éú³É°²×°Îļþ£¬¾ÍÏëÎÒÃÇÏÂÔصĺܶలװ³ÌÐò£¬¶¼ÊÇ´ò°üºóµÄ½á¹û£¡
µ«ÊÇÖµµÃ×¢ÒâµÄÊÇ£¬´ò°üµÄ¹ý³ÌÖУ¬ÓÐÌí¼Ó£¬É¾³ý×é¼þ¹©ÄãÑ¡Ôñ£¬Èç¹ûÓõ½Ïà¶Ô·¾¶£¬¸½¼þ£¬ÍâÁªµ ......

ÓÃVBʵÏÖ´øͼƬµÄXP·ç¸ñµÄ°´Å¥¿Ø¼þ

    ËäÈ»ÔÚVBÀïʵÏÖXP·ç¸ñºÜ¼òµ¥£¬µ«ÊÇҪʹÓÃXP·ç¸ñͬʱÓÖÈð´Å¥ÏÔʾͼƬ£¬ÔòʵÏÖÆðÀ´ÒªÂ鷳һЩ£¬Îª´Ë£¬ÎÒдÁËÒ»¸ö¿Ø¼þÀ´ÊµÏÖÇ°Êö¹¦ÄÜ£¬Í¬Ê±ÈöÁÕß¿ÉÒÔ´ÓÖÐÁ˽âXPÖ÷Ìâ½çÃæµÄ»æÖƹý³Ì¡£
    ʹÓð취ºÜ¼òµ¥£¬ÔÚVBÀïн¨Ò»¸ö¹¤³Ì£¬È»ºóÌí¼ÓÒ»¸ö¿Ø¼þÄ£¿é£¬Õ³ÌùÒÔÏ´úÂ룬ÔÙ½«¿Ø¼þ·ÅÖõ½´°¿Ú¼´ ......

VBÖв¥·ÅWAVÎļþ

http://zhidao.baidu.com/question/33440250.html
ÔÚÄ£¿éÖÐÊäÈëÒÔÏ´úÂë
Public Declare Function sndPlaySound Lib "winmm" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
' flag uitzetten
Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ