Display Size Of Logical Drives?
Aug 18, 2010Display Size Of Logical Drives
View 23 RepliesDisplay Size Of Logical Drives
View 23 RepliesI am listing all logical drives with GetLogicalDrives() function and i am getting that----( A: , C: , D: , K: , M:)[code]If i checks "Get FilesCount (Drive_name)" for A: (Floppy Drive) then I gets error "DRIVE NOT READY".I want CODE WITHOUT THIS ERRORRR Even if floppy drive is empty or a CD/DVD-ROM is empty.
View 1 RepliesI want to display all the drives and folders , and user can select the file also
i got this code from one of forum, but it is showing all the files but not folders and directives
{code]...
I have a small app and i want to display the data (prices) from some hard drives from some site's. I use this code
Dim PageElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
For Each CurElement As HtmlElement In PageElements
TextBox2.Text = TextBox2.Text & CurElement.GetAttribute("src") & Environment.NewLine
Next
My sql query is returning records from the database that contains a filename. I will be appending the filepath (from the web.config file) to allow the user to download the complete file. However, another colum in the grid, has to be the file size. How can I obtain the filesize, given that the name is being returned from the database, and the filepath is from the web.config file?
View 4 RepliesSo far I can access the Recycle Bin to empty it with this:
#Region "Empty Recycle Bin (SUB)"
Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal hWnd As Int32, ByVal pszRootPath As String, ByVal dwFlags As Int32) As Int32
[code].....
I've a form set to size 1240:750. On my PC where I've VB2010 installed, the screen size is set to 1680:1024 and the form can be viewed fine but on a PC with screen size set to 1280:1024 (higher than the form) the form in question is cropped almost a third of it. To adjust the form to everyone screen size I set the below code at load with no avail.
'Autosize form to screen
Me.Height = (SystemInformation.PrimaryMonitorSize.Height) * (0.9)
Me.Width = (SystemInformation.PrimaryMonitorSize.Width) '* (0.9)
Me.MaximumSize = New System.Drawing.Size(Me.Width, Me.Height)
Me.MinimumSize = New System.Drawing.Size(1240, 750)
I'm trying to calculate the size of multiple monitors together, like the display size. This is an example of what I am talking the Size of the Virtual Screen"). I tried the code, with no luck. The WinAPI didn't seem to do anything, but take space in my code edit
View 1 RepliesI know that I can calculate the display area for a given font using
TextRenderer.MeasureText("Text", New Font(Arial, 12.0F)
I want to calculate the size of a font I should be using in order to fit a given display area. Is there a function that allows me to do that?
Whenever a person adjusts how big they want there display, it will distort my application, it will make images overlap and will make text bigger.
Is there some code I can do to tell my program to ignore the size set by the display on windows?
i posted about how to transfer file and i found a thread explains it with sample. Now how am i able to display it in a form the file transfer, the icon the name and size. And the user can click it .
View 4 RepliesIn the Windows control panel you can adjust the Display properties for which text size to use between the default value which is the smallest size text and 2 larger sizes. How can you get which text size the Display properties are set to for one's computer through Visual Basic code?
View 3 Repliesmy .net app output data from sql server to a datatable in my app using executreader.for example:one of the column size in sql server varchar(40),actullay the field only contain 2 chars (like: "AB" for example)when it executes into datatable,it display in the column like "AB" <<this chars + white space = actual size of the column,but I want only the size of the data only, which is "AB" when I export it as csv file the field is >> "AB?
View 4 RepliesIs there a way to tell the DISPLAY size of an image in a picture box? If the PictureBox.SizeMode=Zoom, the picture sometimes is not displayed as big as the picture box is, and is sometimes displayed smaller, or larger, than the actual image is. I just want to know what size it is actually displaying as.
View 3 RepliesDid anyone else read this article under Visual Basic News? I thought it was a very bad treatment of the subject. I especially don't like articles like that when the code they post relies on Option Strict Off.
View 12 Repliesi'm trying to find a way to get with vb.net info regarding logical drive such as: Total Size, Free Size and Volume label ame and to write the info to some textbox or somthing similar.
View 8 RepliesSorting arrays are useful when you want to get the first/last/min/max logical item of a list. I.E. A list that contains numbers and you want to find the Min/Max (without LINQ), you can sort the list and pull the first/last element. It's also useful to display lists to the user in alphabetical order.
View 2 RepliesAccording to MSDN The And operator can act as a bitwise operator OR a logical operator.The only way to know if it is used as One operator or another is, If it is on the right side of an assignment operation? for example x = 3 AND 5. I cannot find any other instances where the bitwise operator would be used instead of the logical operator, are there?
View 1 RepliesI don't know the codes to lock the logical drive What it will be if anybody knows it
View 1 RepliesIs it possible to create a logical serical port in vb that another application can open and read/write to?
View 2 RepliesI need to test a logical expression held in a string to see if it evaluate to TRUE or FALSE.(the strig is built dynamically)For example the resulting string may contain "'dog'<'cat' OR (1>4 AND 4<6)". There are no variables in the string, it will logically evaluate. It will only contain simple operators = > < >< >= <= and AND , OR and Open and Close Brackets, string constants and numbers. (converted to correct syntax && || etc.)
I currently acheive this by creating a jscipt function and compiling it into a .dll. I then reference the .dll in my VB.NET project.
class ExpressionEvaluator
{
function Evaluate(Expression : String)
{
return eval(Expression);
}
}
Is there a simpler method using built in .NET functions or Lamdba expressions.
I've seen the operator Max used two different ways. The following two queries produce the same results. The MSIL code is slightly different. What is the benefit of using the Aggregate operator? Logically, is there a difference?
[Code]...
I have the need to express simple conditionals as program input. The input must be human readable. Is XML suited for this? For example, I have the following conditional statement:
If AnimalType = Leopard And (SourceCountry = Kenya Or TargetCountry = Kenya) Then
ZooKeeper=Jack
Else
ZooKeeper=Jill
End If
Expressing the above in XML might look something like this:
<If>
<Conditional>
<And>
<AnimalType>Leopard<AnimalType>
[Code] .....
How best to represent conditional statements in XML? I haven't yet explored using attributes. I don't currently have the need for nested 'If' statements or the 'Else If' clause, but I'm going to try and work them in anyway. Perhaps the VB code is more 'readable' than XML can be in this case and I should create a custom flat-file format instead.
Does anyone know the code to address Logical Block 0 of a disk? This is my dump of block 0 of a multipartition disk.
[Code]....
Can I set up a change in the font color when a certain true value comes up with a logical test - e.g. If the "value_if_true" says STOP, can I have the STOP show up in a red font and if the "value_if_false" says OK, then leave it as a black font?
View 1 RepliesPublic Class Final18
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[code].....
I found using AndAlso/OrElse, all the time, VERY annoying. It reduces code readability, especially when conditioning get complicated.
View 2 RepliesNow all went well about from using the structure correctly. The working of the structure was perfect. How ever i missed Two important issues. The structure needed a fixed size of 10 items (9 in programming terms starting from 0) And also out of the 5 items allowed to be chosen as one of the member types for the structure a limit of 5 items of that particular type.
[Code]...
I don't have any problem with the OpenFileDialog provided I set the .InitialDirectory to somewhere or other on my machine.However I just can't set the .InitialDirectory to a URL even as "http:localhost/..." ie my machine.Is there some way of getting the OpenFileDialog to see Network Drives, URLs, etc?
View 7 RepliesI'm trying to get a list of current hard drives (that part is done), but then go through the list one by one and remove those that have no size (dvd drives for example). I'm sure this is horribly wrong (4 errors are shown in the list). Could someone give me a hand?
Here is what I have so far:
ComboBoxHD.Items.AddRange(System.IO.Directory.GetLogicalDrives)
Dim dInfo As New System.IO.Directory
For Each drive As System.IO.Directory In dInfo.GetLogicalDrives()
[code].....