VS 2008 Open File As String?
Oct 11, 2009
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]...
View 8 Replies
ADVERTISEMENT
Oct 11, 2010
i need a vb8 code to open a txt file,search for a string in it & extract string in a excel file.
View 2 Replies
Mar 13, 2007
how can i save 2 textboxes(string) into 1 file? and when open the file, the string goes to definite texboxes...
[Code]...
View 7 Replies
Apr 22, 2010
I'm trying to Save Arabic string on file using file open but every time I load the file it gives me deffrant craters cant read it like "this code workking good In English but in arabic the resulut always like "??????" and cant read it back.
[Code]...
View 1 Replies
Apr 7, 2011
On my program, the user inputs a "name", "lastname" and "ID number" and saves the file, so the file will save as follows:
namelastname idnumber.txt (with nane/last name together).
My search feature asks for the name and last name and id no for the file and it will use that input to open the file.
But now i want a search feature that just asks for the id number. So how i do it so it reads the last string after the space (so after namelastname) of a text file, in this case, the ID number the user has inputted?
I thought of it theoretically:
the user inputs an id number in search, it records the length of that input (say 5 characters) and just reads the last 5 characters of the file name in directory X (that being, in this case, the ID number).
View 1 Replies
Sep 18, 2009
Ive figured out how to open a file to read and then display it, and i can probably work out how to write a string to a file. The part i am stumped by is this. Say i open a text file with the following text I has a badger i then want to correct this to I have a badger.
Its just an example and not for a grammar corection program. What i want to do is detect what was said and alter it acordingly. I presume this would come under string manipulation but i cant find any details on this.
View 10 Replies
Nov 8, 2010
I have a textbox on my form. I want the form which name is typed into the textbox (if exists) to open.
vb.net
Dim frmName As String
Dim objFRM As New Form
Try
frmName = tmp(1)
[Code] .....
With that code I get this error:
"Cannot create ActiveX component"
View 2 Replies
Nov 1, 2009
I would like to step through each *.txt file in a given directory, open it, find and replace all, perhaps a thousand, occurances of a given string (e.g. "00/00/00"), then close and save file, and step to next one in the directory to do the same find and replace. I've been looking at filestream classes and regular expressions but don't see a clear way to do this.
View 4 Replies
Dec 19, 2009
i want to save String in File Who not Able to open in Text Editor Open it Only on my Application Suposly i want to save Phone Book Contact In this file
Three Text Boxes
1. Name
2. Phon Number
3. @mail Address
i already read these stuff but still not Understand i already check Kaymaf Provided link , but i m not understand Create Your Own Custom File Type
View 1 Replies
Mar 22, 2009
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
View 2 Replies
Aug 17, 2009
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]....
View 2 Replies
Dec 24, 2008
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 Replies
Jun 24, 2009
I 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]...
View 4 Replies
Oct 1, 2009
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?
View 9 Replies
Aug 1, 2009
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 Replies
Apr 30, 2010
I'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.
View 2 Replies
Mar 20, 2010
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?
View 7 Replies
Mar 8, 2010
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?
View 8 Replies
Oct 7, 2009
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.
View 4 Replies
Jul 25, 2009
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?
View 5 Replies
Aug 31, 2010
ok if there is any way to open a file from zip archive without extracting it ?
View 6 Replies
Oct 2, 2009
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.
View 11 Replies
Apr 20, 2010
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 Replies
Jan 22, 2009
I'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]....
View 2 Replies
Jan 2, 2010
Currently 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 Replies
Apr 12, 2009
I 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 Replies
May 22, 2009
How 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 Replies
Mar 11, 2010
At 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]...
View 1 Replies
Jul 8, 2009
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...
View 15 Replies
Nov 26, 2011
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]....
View 1 Replies