In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to achieve VB.NET disk format, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Disk is a common carrier of data, and our software may provide users with the ability to back up data to disk. To avoid having files with viruses on the disk, the safest way is to remind the user to format the disk.
Visual Basic can format a disk, either a disk or a hard disk, by calling the API function.
Open a new project (project1), and if you haven't changed the default mode, Visual Basic will automatically add a form1 file, add a command control to form1, and copy the following code.
Option Explicit Private Declare Function SHFormatDrive Lib "shell32" _ (ByVal Hend AS Long,_ ByVal Drive AS Long,_ ByVal FormatID AS Long,_ ByVal Options AS Long) as Long Private Sub FormatDisk (intDrive as integer,blnQuickFormat as Boolean) dim lngReturn As Long; if (blnQuickFormat) then lngReturn= SHFormatDrive (0 &) else lngReturn= SHFormatDrive (0 &) end if end Sub Private Sub Command1_Click () call FormatDisk (0) End Sub
Run this program, you can achieve the function of VB.NET disk formatting.
It is important to remind the reader that the * variables of the FormatDisk function are very important. The values of 0 ~ (* *) 1 and 2 represent formatted disks A, B, and C.
Note: readers should not use the hard disk to do experiments when using this VB.NET disk formatting program for exercises. The author is not responsible for possible errors and losses.
The above is all the contents of the article "how to format VB.NET disk". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.