VS 2008 Open A File From Zip Archive
Aug 31, 2010ok if there is any way to open a file from zip archive without extracting it ?
View 6 Repliesok if there is any way to open a file from zip archive without extracting it ?
View 6 RepliesI'm using jmcilhinney's library (found here), with a few modifications to make it compatible with VB.NET 2008. Using this forum's search feature, I see that it has been noted that SharpZipLib does support adding files to existing archives, but jmcilhinney's library does not implement this feature, and I have no idea where to start in writing my own method.
View 3 RepliesHow exactly do you copy the content of a .rar/.zip file (from your resources) to an archive in the computer? (.jar - Java Archive)I mean without deleting existing data on the .jar file already. I use this code currently.The TestArchive is a .zip file, and when I press the button, it extracts the content of TestArchive to the .jar arhive, but deletes everything that was already inside the .jar archive.[code]...
View 8 RepliesI'm working on a school project right now and I have everything fine except this one part of the project: "The audit and errorevent logs should be archived if they are larger than 5K and up you need to keep up to 3 copies of the files." I know how to read and write text files just fine, so I don't need help with that. What I don't know is how to archive a file based on file size, or how to keep up to 3 copies of the files?
View 2 Replieshow would I copy files into a jar, as well as delete folders from that jar. Would I have to decompile it then recompile it? Would sharpziplib do the trick?
View 1 Repliesi found out that you can create a Archive but how would i add a password to it?i know this.
Dim di As DirectoryInfo = New DirectoryInfo(Application.StartupPath + "folder")
di.Attributes = FileAttributes.Archive
how to add in the pass now from that code ? or is it a different syntax?
Im trying to write a program that displays the content of folders to show files and directories using a treeview with images. I have acheived this and the code is below but what i would like to do is to remove all unwanted parts of archives.Display Example.rar and remove Example.rar, Example.r00, Example.r01 or Display Example.rar and remove Example#Part1.rar, Example#Part2.rar
The reason why i am trying to do this is because i am looking to set a loop that will copy or extract files in certain directories but the problem is with partial files is that full extractions are done to each individual part. Say for example there is 10 files to one archive, the extraction is repeated 10 times, for 20 files, 20 full extractions and so on
Imports System.IO
Public Class Form1
Dim tPath = "C:Documents and SettingsAll User"
[code]....
What i am trying to do is open a save file dialog and write to a .txt firl the contents of my listview. so far:
[Code]...
i have this, but i'm not to sure how to write to the .txt file i know i need to use a for each to loop the contents of the list view
I am using this, to read 1+ files from the openFileDialog, but I am having a problem getting just the file name, I can get the location "C:My Documentsfilename.jpg" but how do I get just the name "filename.jpg"?
I want to replace it with this line: can.Text = Regex.Replace(file, ".+\$", "")
vb.net
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
[Code]....
I understand how to associate my windows form application with a file extension (in my case, *.cmf). However, when the user double clicks on the file in, say Windows Explorer, the application opens but without the file being loaded. I also understand that this scripting (for the response to double clicking the file) can be defined by the My.Application.Startup Event, but I have not been able to find (in either this forum or MSDN) a clear example of what to do with the command line arguments after they passed to the application
View 3 RepliesI am working on a project and within that project I need to call on an already existing ocr file within vb 2008. I have tried to call the ocr in several mode
[Code]...
I have an app that works client cases and at one point they need to open a .MSG file that's been dragged into the case.
Right now it opens in Outlook. Sloppy and slow.
I would actually like to open and parse the data out of that file myself. Maybe put it into a richtextbox?
I want to put the program in a folder before I send it out, And it has several .txt files in the folder such as "How to use this" and "how to use that" I have a menustrip, And I have an option "How to use." < Whatever section there on.How would I make it so when they click that it will open up a .txt file from that folder which would be like" My program By ME " would be the folder name..I was thinking streamwriter or streamreader? But I can't understand how to use it.
View 13 RepliesI'm trying to open a .chm file in my VB solution using the following
Dim binWriter = New IO.BinaryWriter(IO.File.Create("help.chm"))
binWriter.Write(My.Resources.MyHelp)
binWriter.Close()
Process.Start("help.chm")
Everything works fine but when I click twice on the command button to open the chm I get the following exception:The process cannot access the file 'C:help.chm' because it is being used by another process.
On my computer I've set that when you try to open a txt file it opens it with my application. When I open a txt-file, the computer opens my program, but then is RichTextBox1 empty. (Of course, because I haven't set my program yet to show the content of the textfile in RichtextBox1.)
How do I make my program know from which file it's launched? So that it can load the content of the file using a StreamReader?
Can someone point me in the right direction? I am trying to find out the 5 modes a file can be opened in.
I can only think of Input, Read and Shared. What are the other two?
I want to find the full path of the program that will open a given file type. e.g. '.txt' is opened by c:windowssystem32 otepad.exe
I've done a bit of searching but i keep just finding how to create an association, not read one. I've also tried looking in the registery, but it looks like all that's there is a link to the program ID or something.
How would I be able to click on a label and make a text file open which would be save in the folder i sent out so something like
C:UserDesktopProgram FileRead me.txt
How would I also do the "user" part since I wont know everyone's computer user name that I send it to?
I am not so good with buffers and arrays and I dont know how to continue from here:
[Code]...
My intention is to open an image file as bytes, Convert the bytes to a string, send bytes to server and server stores bytes in a database. Then I need to reverse the process and be able to convert the bytes to an image.
I know this may sound a little wierd but I need to open file as bytes, convert bytes to string, encrypt the string, decrypt the string, convert the string to bytes and save.
I have been working on this for some time now and cant get it on working.This is my current mess for encypting the file:
[Code]...
I have an application which read data from Excel sheets when I drop them into one of apps forms.Is it possible to write an app. with which I will be able to use "Open file with", and the result will be the same as when I drop a file into a form?And is it also possible to add this option to the context menu strip of files with specified format?
View 12 RepliesI'm making a tiny program that calculates a total for a user for some type of styling service. A user clicks the radio button for either hairstyle, perm makeup, makeover, or manicure. then clicks a discount radio button, either none, 10% or 20%. then it calculates the total (price of service - discount %). then it displays the total in the current service text box & keeps a running total and displays that in a second total box.
My problem is i try to run the program i made and it basically crashes. In the code, when in VB, there's an error message when you go over PriceDecimal, DiscountDecimal, and GrandTotalDecimal saying the variable is used before it is assigned a value.also is there any way to open a .exe file and see the code for it?
Public Class ImageForm
' Declare module-level constants
Const MAKEOVER_PRICE_Decimal As Decimal = 125D
Const HAIRSTYLING_PRICE_Decimal As Decimal = 60D
[code]....
How can I make my application to extract files inside .rar/zip archive in application.startupPath directory!?
View 2 RepliesIs it possible for vb to extract files from tar(and put them back)? I found this but it says that Dim tar As New ChilkatTar <<<< ChilkatTar does not exist I am trying to edit one xml file(which is not compressed) but if i do that with notepad, the tar becomes corrupt
View 1 RepliesCurrently i working on a project which needs an excel file to be opened at the rum time in Vb.net 2008.i tried to call the same using richtextbox, it shows the file but the content is not readable.
View 1 RepliesI am doing a project using Visual Basic 2008 (Windows Application). I need to show the results of my calculations in a Word (2007) document. I have a template (report) that contains the header/paragraphs/Tables.. What I need is to fill the blanks in this document using Visual Basic and insert pictures in that document.
View 1 RepliesHow would i open a text file which is hosted online, even with the url ending in .txt? When i try to open this in streamreader i get uri location is not supported.
View 2 RepliesAt home I use Visual Studio 2008 Pro but a class of mine is trying to have us use Visual basic 2005 express edition. Since we need to submit source code files will there be a problem if I just submit the .vb file instead of the whole solution?
[Code]...
I'm trying to open any file using Process.Start, but every time I try to open a file that isn't an executable the program crashes... This is the code I'm currently using:
vb.net
Private Sub ListView1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDoubleClick
For Each lvi As ListViewItem In ListView1.SelectedItems
Process.Start(path & "" & lvi.Text)
Next
End Sub
Path is a string that contains the selected folder path, and lvi is the text of the list view item (each item contains the icon and name of each file). It is working fine for .exe files, I was just wondering if it's JUST for .exe files...
I'm using Vb.net 2008 This code will open specific Excel file from specific location(C: a1.xlsx) and print data to it. Is it possible to open this file from any location(as when we use Process.Start("ta1.xlsx") )on Pc and complete the process of code( print datat)
vb
Dim exl As New Excel.Application
Dim exlWorkSheet As Excel.Worksheet
exl.Visible = True
[code]....