• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 12 رای - 2.42 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: Copy a File Quickly
حالت موضوعی
#1
با سورس کد زیر میتونید به سرعت فایلی رو کپی کنید در مقصد مورد نظرتون

Visual Basic is often seen as a tool to create front end GUI intensive applications. However, it can also easily be used to do lower level tasks such as quickly copying one file to another byte by byte. This code snippet demonstrates how you can easily take one file and copy it to a second one as quickly as possible. The way it does this is by pulling the whole file into memory and then writing it back out to the second file name.

This sample demonstrates some of VB's File IO operations such as Open, Get, and Put. It also demonstrates how you can declare a variable array and then change its size using the ReDim construct.

To implement this source code create a new VB6 program, add a button to the form, double click the button to get into its click event handler method, and add the following code within that method.
کد:
Dim mByte() As Byte
    
    Open "C:\Command.com" For Binary As #1
    Open "C:\Backup.com" For Binary As #2
    
    ReDim mByte(0 To LOF(1))
    
    Get #1, , mByte()
    Put #2, , mByte()
    
    Close #1
    Close #2
    MsgBox "Done", vbInformation
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
#2
درود

دوستان اون ReDim جادو و تردستی نیست !!! با این می تونین یک آرایه رو که تعریف کردین دوباره تعداد آرایه هاشو تعریف کنین !
مثلا" نیاز دارین بیشترش کنین یا برای آزاد کردن رم می تونین اون مقدار آرایه رو که زیاد تعریف کردین کم کنین !
ضمنا" درنظر داشته باشین که فقط برای آرایه کاربرد داره و نه برای متغیر های معمولی !
باید حرف زورو نشنوم کر شم فقط -- تو نه رفیق ریگی نیست به کفشم نترس

 نه ، نه من تروریست نیستم -- من رو کاغذ می بازم ولی تئوری نیستم

باید دردای دلمو و تو دلم چال کنم -- تا چشمای من یه روزی  یهویی خیس  شن
 
پاسخ
#3
azithromycin ohne rezept kaufen azithromycin kaufen azithromycin kaufen schweiz
nitrofurantoin kaufen apotheke nitrofurantoin kaufen rezeptfrei nitrofurantoin kaufen apotheke deutschland
keppra bestellen ohne rezept levetiracetam 1000 mg kaufen levetiracetam ohne rezept
nitrofurantoin tabletten kaufen nitrofurantoin bestellen ohne rezept nitrofurantoin kaufen rezeptfrei
vermox bestellen ohne rezept vermox online kaufen ohne rezept vermox kaufen online
seroquel kaufen ohne rezept seroquel 5 mg seroquel rezeptfrei kaufen
modafinil kaufen deutschland ohne rezept modafinil ohne rezept bestellen modafinil online kaufen ohne rezept
lasix online kaufen lasix rezeptfrei bestellen lasix 40 mg rezeptfrei
meloxicam al 15 mg kaufen meloxicam kaufen ohne rezept meloxicam 7 5 mg rezeptfrei kaufen
maxalt 10 mg kaufen rizatriptan kaufen ohne rezept maxalt rezeptfrei
 
پاسخ
  


موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  Open File Binary And Search String In Files Amin_Mansouri 1 2,885 01-24-2017، 04:15 PM
آخرین ارسال: aminjannoukaretam
  copy a.adhami 1 1,890 10-06-2014، 02:50 PM
آخرین ارسال: Amin_Mansouri
  استفاده از شی File System Object در ویژوال بیسیک Ghoghnus 0 1,978 04-24-2012، 06:54 PM
آخرین ارسال: Ghoghnus
  Retrieve File Association and open a file in its native application Amin_Mansouri 0 1,818 04-15-2012، 07:14 PM
آخرین ارسال: Amin_Mansouri
  حل مشکل باز نشدن فایل های space دار و رفع پیغام file not found Amin_Mansouri 0 3,320 08-29-2011، 04:17 PM
آخرین ارسال: Amin_Mansouri
  Delete File Amin_Mansouri 0 2,203 05-10-2011، 05:06 PM
آخرین ارسال: Amin_Mansouri
  Source code Insert & Delete data from a file Amin_Mansouri 0 2,551 04-29-2011، 03:56 PM
آخرین ارسال: Amin_Mansouri
  Source Code Burn Iso File Amin_Mansouri 0 2,360 04-19-2011، 11:38 AM
آخرین ارسال: Amin_Mansouri

پرش به انجمن:


Browsing: 1 مهمان