Modifiying Code To List All Disks?

Jul 21, 2011

I have the following code in my app to show free space / disk size and SMART status for a hard disk How can I modify it so that it lists all disks and shows the above info for each one

[Code]...

View 11 Replies


ADVERTISEMENT

Get List Of Fixed Disks In Computer

Jan 27, 2010

I need to write an application that does the following, and I figured it was a good opportunity to write my first VB.Net application:

1. Get the list of fixed disks in the computer
2. For each disk, recurse through all its directories and sub-directories looking for filenames that match a given regex (eg. MyFile.d{3})
3. If found, hash this file to get a unique ID, eg. MD5 (just to check if this file already exists elsewhere)
4. If this file hasn't already been seen elsewhere on the disk, copy it to a central directory

View 2 Replies

Get The List Of Fixed Disks In The Computer?

Jan 27, 2010

I need to write an application that does the following, and I figured it was a good opportunity to write my first VB.Net application:

1. Get the list of fixed disks in the computer

2. For each disk, recurse through all its directories and sub-directories looking for filenames that match a given regex (eg.MyFile.d{3})

3. If found, hash this file to get a unique ID, eg. MD5 (just to check if this file already exists elsewhere)

4. If this file hasn't already been seen elsewhere on the disk, copy it to a central directory.

View 2 Replies

SendMessage API - Send "list Disks" Follow By An "Enter"?

Jan 29, 2012

provide me with an example of SendMessage API to do the following.

1) I have a form with a button to execute c:windowssystem3diskpart.exe.

2) After diskpart executes hidden, I want to send "list disks" follow by an "Enter"

Dim MyProcess As New Process()
btnMakeFlashDisk.Enabled = False
MyProcess.StartInfo.UseShellExecute = False [code]....

View 2 Replies

Eject USB Disks And CM_Request_Device_Eject?

Aug 5, 2010

i have been looking for a way for my application to 'safely remove hardware' or to eject the USB key specified, the application detects the removal and arrival of new devices but i am stuck on being able to eject them. So far my research has lead me to using setupapi.dll and CM_Request_Device_Eject and i have declared

Private Declare Function CM_Request_Device_Eject Lib "setupapi.dll" Alias "CM_Request_Device_EjectW" (ByVal dnDevInst As IntPtr, _ ByRef pVetoType As PNP_VETO_TYPE, ByVal pszVetoName As IntPtr,ByVal ulNameLength As Integer, ByVal ulFlags As Integer)

As Integer I usually code in asp for web application and have no idea how to use these types of unmanaged functions I made my function that takes the drive letter to eject by parameter

Public Function EjectDevice(USBDriveLetter as string) As Integer
'TODO USE CM_Request_Device_Eject() to eject the drive
End Function

I found pinvoke.net: cm_request_device_eject (setupapi) this info on pinvoke for CM_Request_Device_Eject() but i am clueless on how it works and the vb.net section looks portly documented...

View 11 Replies

Read From Physical Disks

Mar 28, 2009

how I can Read data from Hard disk or flash card, etc., and save read data in .bin file.

View 2 Replies

Using FileSystemWatcher For Monitoring Connected External Hard Disks

Nov 13, 2011

i tried several ways to monitor the File System of one of the external drives that are connected to my PC using the FileSystemWatcher. But nothing seems to work..[code]

View 2 Replies

A Disk File Listner Lists All Files On All Disks On Local Computer?

Jul 27, 2010

I'm working on a program that lists all of the files on all of the drives on my computerI'd comments. To use the program Start a new Windows Forms application and replace the code on Form1 with the code listed here.

Imports System.IO
Imports System.ComponentModel
Imports System.Globalization

[code].....

View 19 Replies

VB Code Case Statement - Added A List Box With A List Of Names

Jan 13, 2011

I am used to C like languages such as C#. I added a list box with a list of names. In the code behind I added the below code. When I run the code I am getting the MessageBox but it will state "UserName favorite color is " but does not show the color. I thought it might be misspelled or non-matching names but this is not the issue due to the names being correct.

Public Class Form1

Private Sub lstData_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstData.SelectedIndexChanged

'Declare Variables

[CODE]...

View 4 Replies

VS 2005 Code For Clear List In List Box?

Aug 23, 2011

I want to know what is code can be write for clear all item in list box??..Here i attach my code for looping for.This looping will display are result in list box. For info i am using visual studio 2005.Public Class Form1

Private Sub btnLoop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOnWard.Click
Dim num As Integer

[code].....

View 2 Replies

DB/Reporting :: OLE Database Access - Move My Programs And The Database To Another Computer And Hard-disks

Apr 21, 2008

I want to move my programs and the database to another computer and hard-disks. It looks to me as though I nearly have to re-create the controls and rewrite some of the code to make it so the programs still work after the move. At least with ODBC all I would change was the DSN definitions external to the programs. Is there an easy way to move or rename a database without loads of work?

View 3 Replies

Create A "virtual" Folder On Many Hard Disks?

Apr 9, 2011

Is it possible to create a folder that spans over many hard disks?in such a way that the application considers it as a standard folder but the data are distributed on more than one hard disk?

View 3 Replies

Code To List All Currently Running Process And Get Their Path And List All The Path In Listbox1?

Dec 3, 2010

can i know what code that enable me to list all currently running process and get their path and list all the path in listbox1.

View 2 Replies

Code - Re-initializing List Box

Oct 5, 2011

Why if I run the following code does the argument in the Add method pass {"foo2", "bar2"} in both method calls?

Dim myList As New List(Of String)

myList.AddRange(New String() {"foo", "bar"})
Add(New RandomClass("blah", myList ))

[CODE].....................

View 4 Replies

How To Code An Option In List

Nov 30, 2009

ive got a college project and I've tried to make it seem quiet realistic, i've added a menu strip, and I don't know how to code an option in the list. Does anyone know how to code it?

View 5 Replies

Percents In Code For List Box?

Oct 25, 2010

I need to know how to code percent in my list box for example: 5, 5.25, 6, 6.25 and so on.This is for visual basic express edition 2008

View 3 Replies

Add Code To List Boxes Items?

Jan 31, 2012

I am surely a new self-learner programmer using VB 2010 Express edition and I have a problem on writing my first code. I have designed my form and I only want to add code as events. The IDE already adds the methods when I double-clicked the button which I want to add the code on.

This question may be good on the IDE forum, but I just thought to ask it here because there may be more experts here on VB language functions. I have added the MenuSctripItems such as File, Edit and so on. How do I write the code for New, Open, Save, etc under file menu? It may sound boring or even silly, but I am here to learn and your contribution is both for me, you and the MSDN.

View 2 Replies

Add Item To Sharepoint List Using Vb Code

Sep 29, 2011

I am trying to add items in a SharePoint list and I would like to use vb. I have tried using this this from here: [URL] but i get this error: Type SPWeb is not defined.

[Code]...

View 15 Replies

Code A Price Value From A Drop Down List?

Jul 27, 2010

i have four price values in a drop down list and i need to code these values and add them to values from a checklist object i am doing very simple coding ?

View 1 Replies

Disable An Asp.net Dropdown List From The Code Behind?

Dec 23, 2011

Is there a way to disable an asp.net dropdown list from the vb code behind?

<select id="reassign_reason" name="reassign_reason">

This is the name of my drop down list and I tried this in the code behind in vb.net

reassign_reason.disabled = True

View 1 Replies

2 Dimensional Array List - Paste In The Code

Nov 18, 2011

i have been working on a simple program but cant get my head around it. It does not show any errors at the moment but when i run it does not do the things i would like it to do. I will paste in the code first and explain it below.

[Code]...

So basically the form has help button to show instructions, quit to quit the program and check to check whether the country from listbox lstCountries matches the correct capital in lstCapitals. The idea of the program is to shuffle the items in two arraylists and then add them to seperate listboxes called lstCountries and lstCapitals. At start i used 1 dimensional array and it worked like a charm for mixing up items in arrays and then adding them to listboxes, but then the problem had to match the correct Country with correct Capital and it only worked if i picked the items on the same index such as 1 and 1(straight line). It all sounds complicated and confusing, P.S alot of code is commented out, because i have tried many ways to make it work.

[Code]....

View 8 Replies

Adapting Combination Code For Larger List?

Apr 12, 2010

I have the following code to generate combinations of string for a small list and would like to adapt this for a large list of over 300 string words.Can anyone suggest how to alter this code or to use a different method.

[Code]...

View 2 Replies

C# - Code Up A Month And Year Drop Down List For ASP.NET?

May 1, 2009

I have an internal application that I needs to have a drop down list for two date type elements: Month and Year.These values are not in a database or other repository of information.I know I could just setup a list with the values I need by adding them to a dictionary like object (I need to correlate the Month to the numerical representation, January => 01):

var months = new Dictionary<String,String>();
months.Add("01", "January");
...

The drop down list for the year will be a bit easier as I can just choose a starting year and iterate up to the current or current+1 year in a generic list.Is there a better way to handle these data elements? Something built in, or a good design pattern that I should be implementing?

View 4 Replies

Code For Loading List Of Plugged In USB Devices?

Sep 11, 2010

This is my code for loading list of plugged in USB devices:

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
ListBox4.Items.Clear()
For Each Drive As IO.DriveInfo In IO.DriveInfo.GetDrives

[code]....

I would like when a button (lets say buttontest) is pressed it will show all files of a CD (only MP3) into ListBox5, then when buttontest2 is pressed the files in ListBox 6 will be copied from the CD to the selected USB device?

View 1 Replies

Converting ODBC List Vb6 Code To .net 2008?

Jan 21, 2009

Option Explicit
Private Declare Function SQLAllocEnv Lib "odbc32.dll" (phenv As Long) As Integer
Private Declare Function SQLFreeEnv Lib "odbc32.dll" (ByVal hEnv As Long) As Integer
Private Declare Function SQLDataSources Lib "odbc32.dll" _
(ByVal hEnv As Long, ByVal fDirection As Integer, ByVal szDSN As String, _

[code].....

View 1 Replies

Loop Code For A List Of Radio Buttons?

Jan 28, 2010

I need help in finding out if there is a more efficient way of writing my code. The code below is a list of radio buttons all of which have different values for example

radiobutton1 has a value of 1
radiobutton25 has a value of 20
the values are stored in a variable called 'count'
the 'count' is incremented by the ammount from the radio button clicked.

Is there a way the radio buttons can be compressed into a for loop and if so how can i still access thier each values.

[Code]...

View 9 Replies

Adapt String Combination Code For Large List?

Apr 12, 2010

I have the following code to generate combinations of string for a small list and would like to adapt this for a large list of over 300 string words.Can anyone suggest how to alter this code or to use a different method

[Code]...

View 2 Replies

Code - Suposed To Go Through All The Computer Names In A List Box And Ping Them

Apr 9, 2009

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Counter As Integer

[CODE]...

The code is suposed to go through all the computer names in a list box and ping them.

View 8 Replies

VB Code To List All Webcams Or Video Capture Devices?

Jan 19, 2010

I am trying to add the ability to select a camera to my program to start with I need to list the currently installed devices in a drop down menu much like what is used in MSN's webcam selection but the only thing that I can find that comes close is

Declare Function capGetDriverDescriptionA Lib "avicap32.dll" _
(ByVal wDriverIndex As Short, _
ByVal lpszName As String, ByVal cbName As Integer, ByVal lpszVer As String, _
ByVal cbVer As Integer) As Boolean

This, even with 4 different webcams installed, returns "Windows WDM image capture"

View 10 Replies

VS 2010 WMI Code To List Remote Share Permissions?

Apr 30, 2010

I've been struggling for hours now to get some working code to list the share permissions of a remote share. I've got WMI code which uses win32_share which lists the shares and path and it works great. I"m now trying to add in a routine to get the share permissions as well.

I've searched just about every site for some sample code and can only find some C# (I think) code.

[Code]...

View 1 Replies







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