[URL] There's a RemoveEntry() function to remove a file, but I can't seem to find a function to remove a directory... Does DotNetZip support directory removal? If not, what are some other libraries I could try?
I am trying to track the progress of a file that is being extract with a progress bar. but i have no idea on what i should set as the max of the progress bar and the value..
here is my
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Dim ZipToUnpack As String = "C: est.zip"
I'm currently working on a utility software, file compression, with VB.Net. And using an open source library to compress and decompress files - DotNetZip - and already running.
My friend told to make it unique and not traditional, that I make the output compressed files cannot be opened with other compression software. Now my question is... is it possible that way? Using an open source library which the output format is ".zip"?
I first thought that changing the file extension of the compressed file to unknown format so it can't be opened when you try to decompress it, unfortunately, using the "Open With..." function of windows it could still be decompressed.
Is it really possible? OR what other features can I add that WinZIP doesnt have yet? I compared my work to WinZip since the same output is ".zip".
I have a FolderBrowserDialog box, and when the user selects a folder, I would like to scan that folder and its sub folders for these file types: jpg, gif, png Here is what I have so far:
I'm reading a csv and load it to a DataGrid using this:[code]Each item on record is between two commas, I tried a lot of things to remove them but I failes, wich is the best method?
I'm using this code to remove controls from a panel.vb.net For Each c As Control In Me.pnlDevices.Controls Me.pnlDevices.Controls.Remove(c)Next
but somehow it doesn't remove all the controls at once, I have to run the code 3 times to remove them all(there is about 20 to 30 of them, mainly labels I don't know if it matters, but the controls where added dynamically at startup...
in my application there's Textbox1.text, Textbox2.text, Textbox3.text and Button1.
my code is:
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text) End Sub End Class
Public Structure ReportOrderType Public ReportName As String Public ReportDate As Date Public SaveFile As String End Structure [Code] ....
Basically, I have a list of reports. In one place they get ordered, and later on the program looks to see which ones have come back -- see if the .SaveFile exists on disk. If it exists, then that report gets processed, and then I want to remove that item from the list of reports-on-order. However, I get an error message back that by doing the .Remove(R), I've changed the list itself & things won't go well with the rest of the For Each loop, which makes some sense.
When I get to this routine, the list of ordered reports will be something from a couple of dozen or less, and some number of them (perhaps zero, perhaps all, probably a few) will exist & be processed & then should be removed from the list. How should I go about accomplishing this? This is my first time working with List(of t) as a Visual Basic tool; everything I've used in the past has been with arrays, and I can do this there.
I need to parse an alphanumeric string leaving the characters "0-9", ".", "/" and space & remove everything else. I use "[^0-9./ ]" as my regex string and it works well. But now I have a couple other conditions that I dont know how to handle with my regex string. I actually only want to keep the "." character if it falls between two digit characters (ie. 3.5), otherwise remove it. And also I need to replace any "-" characters with a space if it falls between two digit characters (ie. 2-1), otherwise remove it.
I'm making quite the complex program, and while I try to figure out some more advanced methods that work better for what I'm trying to do, I'd like to learn how to do this (which is a bit of a roundabout method to what I've been trying). I'm wondering, how can I programatically create and remove objects? For example, I have webbrowser1. I want to remove it and create another webbrowser that I will also name webbrowser1. (therefore, the instance of the original must be removed)
What's wrong with the following code? I'm trying to remove some radio buttons that were created dynamically but the controls' names are not being picked up by this code (only the name of the type of control).
I have a file location as a string. How can i remove the path from the string and just use the file name? For example:c:filesfile.zip - is the stringhow can i just make it so it's file.zip?keep in mind that the location is found by using anpenfiledialog(), so it needs to be able to remove the location wherever the file is.
I have a problem with a bit of code that is supposed to delete every controls on a form appart from the 2 first controls
vb2010 Private Sub ClearCheck(ByRef Container As Control) Dim ctl As Control Dim Boxtype As Control Dim i As UShort = 0
[Code]...
The behavior is strange, I can't find any logic to it, it will sometime delete a part of the objects, other times it will delete other part of the objects. If I run it more than once, I can achieve the wanted result and remove all controls except the 2 I want to keep. It's as if it was checking 1 out of 2 controls.
To give you a better idea I have a combobox on the form and depending on choice it adds appropriate controls (not show/visible true) and add a second combobox to refine the search. If I change the value in the first combobox I want to remove the added controls from the previous combobox.SelectedIndexChanged as well as any control created by the following combobox from the form.
If need be I'll post the code that creates those new controls, but it's quite long so I didn't include it in this post
I have an array with a possible of 25 numbers that can be entered into it, how to take out the unnecessary zero's for the valueas i have not entered into my array.
Public Class Form1 Dim mintArray() As Integer 'Declares Array without giving it a size Dim Array(24) As Integer
[Code].....
I get an error at the highlighted part : " InvalidCastException was unhandled, Conversion from string "" to type 'integer' is not valid."
I have written this code to send a notification to a group of people.... what i want to do is set up a draft, then send a email to each person on the list without a cc: or Bcc:when i run this code it takes the draft out of the draft folder after the first email is sent.how can i stop it from removing the email? [code]
I have been using the following code to remove text from strings so far;
String = Replace(String, "TextToChange", "")
However, I now would like to remove two words only when the occur consecutively for example, I would like to remove "Task 1", not all instances of the word "Task" and value "1".
I have a file that is constantly altered, and if an error happends, I want to have a backup. I was wondering if there's a way to make a script that will copy all the files in the selected folder, and post/overwrite them every 20 minutes in a back-up folder or something, and I say overwrite so it doesnt take up 298347234 gigs of data.
Currently I'm working on a retro-pong game using graphics. The problem is, my code keeps drawing new ellipses every time, and doesn't discard the old ones.
Current Private Sub timeEngine_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmeEngine.Tick
I have strMyString that contains about 5000 lines of data. There are some lines of data that need removing if they contain a certain string, such as "http", "www.", ".com", "cat", "fish", etc. The whole line needs removing. Each line is separated by a vbNewLine or similar.
How can I do that? Does it need pasting into a rich textbox first before processing?
I'm trying to have a program remove lines from a text file if they start with a certain string. I haven't had much luck with this over the past couple of days so I thought I'd try and get some advice.
This is the code that I've tried most recently, and makes some sense to me, but gives a "A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll" error:
Dim SourcePath As String = "C: est.txt" Dim fileLines As List(Of String) fileLines = New List(Of String)(File.ReadAllLines(SourcePath))