VS 2008 Formatting Drive?

Aug 5, 2009

I want to make an application that allows you to format a drive.My application consists of a combo box (so user can select drive) and a format button to format the selected drive.

I would like to know is this possible and if so how?

View 3 Replies


ADVERTISEMENT

VS 2010 : Formatting A USB Drive?

May 26, 2010

formatting a USB Drive?

Imports System.Reflection
Imports System.IO

View 12 Replies

VB 2010 - Thumb Drive - Formatting, Partitioning, And Copying The Image

Oct 24, 2010

I have to create a program to manage a large number of USB Thumbdrives. In short, the drives will contain corporate images used by technicians to prep machines in the field. I do not have to create the images as they are already provided. Since I have to create 50 plus of these at one time, I am looking at writing a program to automate the process. As it stands now, formatting, partitioning, and copying the image to each key individually is, as you can understand, not efficient time wise. I have already purchased two industrial quality 7 port powered hubs.

The plan is to be able to: Fill all 14 slots in the hubs with USB ThumbdrivesUse the program to select the drives to prepareHave the program format and partition the drives (bootable)Copy the contents of the image folder provided to the USB keys. The idea is to do the above by filling all the slots and hitting one button, then walking away to do other work. When done, the drives would be ejected, and the next set of 14 installed.

I have already created the User Interface. It consists of: 5 buttons (Scan For Drives, Format Drives, Build Drives, Build And Format Drives, Exit).One "Select Source" entry field to select the source of the Image Files.One Checked Entry List. This is where all available drives will be listed, and the one's desired to be checked.

Now, it has been 20 years since I did any coding, and all of that was done in languages that are pretty much dead today (Turbo Pascal, Clarion Professional Developer and R:Base), so to say I'm behind the curve is an understatement. While I was never a real fan of Basic, I have some experience with it. But today's VB.Net ain't your daddy's basic, and there's no way I have time to learn C or C++. I have the Express version of Visual Studio 2010, which should be fine for this project.

View 2 Replies

WMI To Get Drive Letter Association With Physical Drive Path Misses CDROMs?

Feb 19, 2012

I'm running the following WMI script to get the associations between drive letters and physical drives on the system, but for some reason it omits CDROMs/DVD-ROMs. Can someone tell me how to get those as well?

Code:
ComputerName = "."
Set wmiServices = GetObject _
("winmgmts:{impersonationLevel=Impersonate}!//" & ComputerName)
Set wmiDiskDrives = wmiServices.ExecQuery _
("SELECT DeviceID FROM Win32_DiskDrive")

[Code3]...

View 12 Replies

Converting C++ Printf Formatting To / From String Formatting

Sep 30, 2010

I have some VB .NET software that interfaces to a load of old (but sound) COM objects. The VB provides a GUI for the COM objects, part of which consists of setting various options on the COM objects - several of which relate to string formatting.I have a simple pair of VB .NET functions that convert basic %f, %d, %g formats to/from .NET equivalents using a large select case covering specific common strings, but they don't cover all formats.[code]Before I start diving in and making it more versatile with some parsing, does anyone know of a class (eg VB or C# .NET) that provides a decent ready-made implementation? Or perhaps some regexp wizadry could be used?

View 2 Replies

Finding Physical Drive Number Using Drive Letter?

Jun 16, 2009

I have a program that allows the user to enter a drive letter into a text box. The program then takes the letter and find the physical drive number (i.e. deviceharddisk3..). It then stripes out everything and leaves me with the number 3.

In VB6 I used mDrive.bas from vbAccelerator.com and it worked perfectly. I have been all over the internet and back and cannot find a solution written in VB.NET.

View 14 Replies

Make A Tool That Will Assign USB Pen Drive A Drive Letter?

Oct 13, 2009

I want to make a tool that will assign a USB pen drive a drive letter, I am using WMI to acknowledge the device being plugged in, I can pull the deviceID, name, etc now I just need to work out how to assign the device to a drive and I just cant figure it out

View 4 Replies

Reading And Writing Files On External Hard Drive, Code To Ensure SQL Or Data Read/write Execution In Case Of Periodic Drive Reconnect?

Dec 18, 2010

The drive is connected via USB and the problem I'm having is that, periodically, while my code is executing, the usb drive seems to disconnect and reconnect. (Nothing to do with the program, but the drive itself).I want to find a way to prevent these temporary drive reconnects from interrupting my code. IE, i want to insure that whatever read or write that is requested is actually executed even in the case of a temporary drive interruption.

View 1 Replies

Determine If A Drive Is Local Or A Network Drive?

Dec 10, 2008

Does anyone know if there is a way to determine if a drive is local or a network drive?

View 1 Replies

Getting Physical Drive Number From Drive Letter?

Jun 17, 2009

I am trying to get the physical drive (device) number from the drive letter. If the user inputs the drive letter C the program will find the associated physical device number. For example if I input C then the result needs to be \Device\HardDrive1\... Some call it NT Device Name; I think. I have the code for VB6 from vbAccelerator, which works perfectly, but it does not work in VB.NET. My question is there a simple way of pulling the drive info that contains the drive letter and the physical device number. I have searched the internet and found nothing for VB.NET. I would post code but I have nothing for .NET.

View 1 Replies

How Can Read Data From USB Flash Drive Or Pen Drive

Sep 29, 2011

USB flash drive or pen drive in vb.net...

View 14 Replies

Physical Drive Number From Drive Letter

Jun 16, 2009

I have a program I am converting from VB6 to VB.NET and I am stuck at the very last piece of code. I need to determine what physical device number is associated with the drive letter.

The program takes the drive letter from a text box and goes and finds the device number (i.e. deviceharddrive3...) and strips out everything leaving me with the devicer number; in this case the number 3. I have searched the internet to and fro and found nothing in VB.NET.

My program in VB6 uses a .bas module from vbaccelerator.com called mDrive.bas and works great. I can't figure out how to convert it over to VB.NET.

View 6 Replies

VS 2008 Visual Studio 2008 Text Formatting?

Jan 5, 2010

if this is not the right area to be posting this. I couldn't find an area dedicated to discussion about IDE features.Somehow one of my .vb files is not showing the nice formatting that is default in VS2008, such as the text colors, etc. how I can get this back? I don't know what to search for, as I don't know what its actually called. On the left you see what I want, and on the right you see what I have right now.

View 4 Replies

2008 Percentage Formatting

Jan 28, 2009

I have a program that is calculating the cost of a certain number of plane tickets, the validation and basic calculations are fine the only problem i've got this: There is a discount text box field called "txtDiscount" where IF a user enters a number it will discount this as a percentage off the total cost of all the tickets, but I cannot get it to work [Code]

View 2 Replies

Date Formatting In VB 2008?

Apr 4, 2009

have a really annoying VB 2008 problem and I'm hoping someone knows how to solve this. I implement the following code:

Code:
DispArrDate = MonthArr & "/" & DayArr & "/" & YearArr
DisplayArrDate.Text = DispArrDate.ToLongDateString

So basically, I'm getting date information from the user and trying to convert it into a date format, and show it to the user in a text box which is obviously named "DisplayArrDate", and "DispArrDate" is a date variable and "MonthArr" & "DayArr" & "YearArr" are strings which are always numbers because they are selected from a drop down combo box.

Now, the code works perfectly on my computer and some others, but for some unknown reason, on some computers, even if they have the same local date settings, it gives me the error: "Conversion from string "4/13/2009" to type 'Date' is not valid.", that's just one example, where "13" is obviously the day. I use the month/day/year format because, in the toturial I'm reading, it tells me, that no matter my local date settings, when using VB 2008, the month/day/year format should always be used and it will display a date in the local format automatically. It seems that on some computers, this isn't the case, and the month/day format is creating errors.

View 1 Replies

VS 2008 Date Changes When Formatting?

Jul 15, 2009

formating a date here

Dim dt As DateTime
dt = dsTitles.Tables(0).Rows(0).Item("servicedate")
lbldate.Text = Format(dt, "dd/mm/yy HH:MM")

The original date is - 19/08/2008 00:00:00

the date that variable dt gets is - #8/19/2008#

the final result is - 19/00/08 00:08

View 5 Replies

VS 2008 Date Formatting From Var

Sep 30, 2011

Good day to all of you again, I've been looking into this problem for several hours now and I can't find what is wrong with my piece of code

[Code]...

View 2 Replies

VS 2008 Formatting A String?

Jan 4, 2012

I have this string "0.9874" and I would like to use vb code to change it to "0.9.8.74" so that it looks like a proper version number.How do I do this? String.Format("{???}",MyString) or perhaps:

View 8 Replies

VS 2008 Formatting A TimeSpan?

Jul 7, 2010

A TimeSpan by default shows hours, minutes & seconds when converted to a string. How do I show only hours & minutes? I tried ts.ToString("hh:mm") but that doesn't work.

View 7 Replies

VS 2008 Formatting Strings In .Net?

Apr 1, 2009

I need to make sure that a certain textbox only allows dates to be entered under a certain format EG: DD/MM/YYYY

View 8 Replies

VS 2008 Formatting XML File

Aug 25, 2009

I'm a bit rusty when it comes to formatting the old xml's lol i can write them fine, i have this so far:[code]

View 3 Replies

VS 2008 TextBox Formatting?

Feb 26, 2011

Example:

Format(781234.57,) 781235
Format(781234.57) 781234.6
Format(781234.576) 781234.58

[code]......

View 3 Replies

[2008] Number Formatting

Jan 19, 2009

I have two labels, one that will show the total gallons used in a journey and one that will show the total litres, both of these labels refer to their own Integer variables. How do I get the results to be shown only to 2 decimal places? This code below seems to work with Gallons but not with Litres?

[Code]...

View 9 Replies

VS 2008 : Formatting Time In A String?

Jul 21, 2011

PROJECT TYPE: Windows Forms Application
LANGUAGE: Visual Basic
.NET VERSION: 3.5

[code]....

I am attempting to display time in a label on my MainForm. The label should display a stopwatch control's elapsed time in hh:mm:ss format. My code is displaying "00:00:00". I have defined the hh, mm and ss as variables but I can't seem to figure out how to use them effectively.

vb
Public Sub RefreshTimeElapsed()
' Refreshes time elapsed display.
Dim hh As String = Me.MyStopWatch.Elapsed.TotalHours.ToString

[code]....

View 2 Replies

VS 2008 : RichTextBox Formatting In A Loop?

Jun 23, 2011

i am trying to display a line of smiley faces ☻ and change the colour of each face, i cant use a find method as there are 10 of these smilies so i thought about using a loop and selecting only the last one entered and changing its colour. here is a simplified version of my

VB.Net
For a = 0 to 9
RichTextBox1.Text += "☻" ' add the smiley

[code]....

This when i ran it changes the first nine to the first colour in the array and correctly does the colour of the last smiley? could i for instance format the character first then add it formatted?

View 2 Replies

VS 2008 Annoying In Text Formatting?

Jun 4, 2009

So i wrote a script which does a few things and richtextbox2 is updated as follows:

a = 27,130,000,000
b = 2,930,000,000
c = 4,290,000,000

Problem is, when i copy the contents of richtextbox2 to the clipboard using "clipboard.settext(richtextbox2.text)" and then open up note page, and paste the clipboard contents, it is wrapped wrongly and i get the following in note pad:"a = 27,130,000,000 b = 2,930,000,000 c = 4,290,000,000"

I am using "system.envoronment.newline" in my code to start a new line.

View 3 Replies

VS 2008 Formatting Phone # In Textbox?

Mar 28, 2011

I have a text box that displays a phone number. The data is coming from a database.Right now it just displays as "xxxxxxxxx". I'd like to display it as "xxx-xxx-xxxx" or even "(xxx) xxx-xxxx"Here's the code that I'm currently using to display the phone number - PhoneTextBox.DataBindings.Add("text", aBindingSource, "Phone")What can I add to this line to get some formatting?

View 2 Replies

VS 2008 Formatting The Contents Of A GridView

Oct 19, 2009

I'm using Visual Basic to assign a dynamic dataset to a gridview control. The VB calls a stored procedure on SQL Server which always returns the last 28 days of info and displays it in the gridview with the column headings as the date.

[Code]...

View 1 Replies

VS 2008 Text Output Formatting In VB?

Sep 18, 2009

I am currently trying to save a piece of data extracted from a piece of hardware in my office and save it as a text file. The problem now is, the text file saves the data like this:

[code].....

There are 3 buttons and 5 textboxes in my program. ignore the "plot" button as that is a machine specific code, as well as any weird lines like

Dim mgr As Ivi.Visa.Interop.ResourceManager

as these were provided by my machine vendor. I only need help with the data formatting.I am trying to program the "Agilent 8757D Scalar Network Analyzer.

View 13 Replies

Forms :: Determine A Dynamic Drive Letter For A Directory On The Removable Drive And Then Open That Directory In An Explorer Window

Feb 19, 2009

First off a short background of the project I am working on- I am developing a program that will be run off removable media (i.e. USB Flash drive). This will be a �virtual desktop� which you will be able to take with you and have the same �desktop� on any system. As we know drive letters can change with each host system the drive is plugged into, I need to be able to determine the path for the flash drive and access a specific folder ( i.e. My Documents)

I have an picture box(representing the icon) placed on my form (form1) and when I click the icon I want to be able to open and view the a specific folder from the portable drive. I need a click event that will determine a dynamic drive letter for a directory on the removable drive and then open that directory in an explorer window.

[Code]....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved