نمایش نتایج 1 تا 3 از 3

نام تاپیک: فرمت کردن درایوها از طریق برنامه

  1. #1
    کاربر جدید
    تاریخ عضویت
    دی 1385
    محل زندگی
    کرج
    پست
    23

    Wink فرمت کردن درایوها از طریق برنامه

    سلام

    از همه دوستان درخواست دارم در مورد اینکه چطور میتونم یک درایو را از طریق برنامه فرمت کنم راهنمایی کنند.

    با تشکر از همگی.

  2. #2
    کاربر دائمی آواتار eyes_shut_number1
    تاریخ عضویت
    اردیبهشت 1386
    محل زندگی
    http://blueco.ir
    سن
    38
    پست
    1,090
    رو این کار کن ببین چی میشه
    va Property Hasho Dast kari kon


    imports system.io
    listbox1.items.clear()
    dim subfolders as directoryinfo
    subfolders=new directoryinfo("c:/").getdirectories
    dim subfolder as directoryinfo
    for each subfolder in subfolders
    listbox1.items.add(subfolder.fullname)
    next

  3. #3
    با این دستور میتونید :

    Shell("cmd /c format a:")

    cmd و c/ حتما باید باشند بعد از اینها هم هر دستوری که تو CommandPrompt قابل اجرا کردن باشه می تونید بنویسید. مثل فرمت با آپشن های مختلف.

    برای اطلاعات بیشتر در Help ویندوز cmd را جستجو کنید و در MSDN تابع Shell. هر دوشون پارامترها و جزئیات زیادی دارند.

    یه تیکش رو برات میذارم:

    Cmd

    Starts a new instance of the command interpreter, Cmd.exe. Used without parameters, cmd displays Windows XP version and copyright information.
    Syntax

    cmd [[{/c|/k}] [/s] [/q] [/d] [{/a|/u}] [/t:fg] [/e:{on|off}] [/f:{on|off}] [/v:{on|off}] string]
    Parameters

    /c
    Carries out the command specified by string and then stops.
    /k
    Carries out the command specified by string and continues.
    /s
    Modifies the treatment of string after /c or /k.
    /q
    Turns the echo off.
    /d
    Disables execution of AutoRun commands.
    /a
    Creates American National Standards Institute (ANSI) output.
    /u
    Creates Unicode output.



    Shell Function

    Runs an executable program and returns an integer containing the program's process ID if it is still running.

    Public Function Shell( _
    ByVal PathName As String, _
    Optional ByVal Style As AppWinStyle = AppWinStyle.MinimizedFocus, _
    Optional ByVal Wait As Boolean = False, _
    Optional ByVal Timeout As Integer = -1 _
    ) As Integer

    Parameters

    PathName
    Required. String. Name of the program to execute, together with any required arguments and command-line switches. PathName can also include the drive and the directory path or folder.
    If you do not know the path to the program, you can use the My.Computer.FileSystem.GetFiles Method to locate it. For example, you can call My.Computer.FileSystem.GetFiles("C:\", True, "testFile.txt"), which returns the full path of every file named testFile.txt anywhere on drive C:\.
    Style
    Optional. AppWinStyle. A value chosen from the AppWinStyle Enumeration specifying the style of the window in which the program is to run. If Style is omitted, Shell uses AppWinStyle.MinimizedFocus, which starts the program minimized and with focus.
    Wait
    Optional. Boolean. A value indicating whether the Shell function should wait for completion of the program. If Wait is omitted, Shell uses False.
    Timeout
    Optional. Integer. The number of milliseconds to wait for completion if Wait is True. If Timeout is omitted, Shell uses -1, which means there is no timeout and Shell does not return until the program finishes. Therefore, if you omit Timeout or set it to -1, it is possible that Shell might never return control to your program.

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •