im programming this group of hexadecimals this group of hexadecimals are connected to a serial port(drag out from vs 2008 tool bar) so dat the serial port can trigger on or off
however i only need to change a certain portion of the hexadecimal...
ive got some difficulties converting hexadecimal.. for example...i got this group of hexadecimal which is 31 33..when its converted to CHR its 1 and 3 respectively... to make it clearer its 31(hex) = 1(chr) and 33(hex) = 3(chr) but i want to make it 13 instead...because the program i wrote is reading and writing out the value 1 then 3 instead of 13 together..how do i do it???
So I need to write out an object to a text file as well as read in objects from text files.How do I accomplish this? This is the code i've used to read and write just simple lines of text. Is there a small modification to this or just a different function i use to read in an entire object?
I have just recently been using VB 2010 after using VB5. I have noticed a lot of changes. The problem I have is that I wish to open and save text files to and from arrays in the background. I've attached what I would do in VB5. I have searched around, but all the examples I find use a Textbox instead of an array. Can anyone show me how I can do this with VB 2010?
I am creating a text file using a save file dialog and copying the path to the text box which file is used to write from vb.net. when i try to write i get an error "The process cannot access the file '....fileName.txt' because it is being used by other program".
The code is below
Public Sub writeInTextFile() Try Dim oWrite As New StreamWriter(TxtOutputPath.Text)
I am attempting to gather a group of file names from a directory. I am able to do this. I tested the code by having the list populate into a listbox and all desired items were added to the list.
Here is my code: Dim di As New IO.DirectoryInfo(strPath) Dim dir1 As IO.FileInfo() = di.GetFiles("*.txt") Dim dFiles As IO.FileInfo ListBox.Items.Add(dFiles)
However, a listbox is not my desired output. I am attempting to write these file names to a text file for purposes of then parsing the information to a datatable to compare with another datatable. How to get my filenames written to a textfile.
I am working on a program using VB.Net 2010 which will enable me to setup groups of files & folders for back up with syncing capabilities etc. I have a concept program which is based on some sample code I found out in one of the VB.Net forums. I have modified it from a command line based program to a form based program. At the moment I consider this code to be a "concept" program which once I have the various copy/sync routines developed and debugged will be integrated in to another program I wrote for creating "Back Up" groups to automate the process. There are some 3rd party programs that do similar things that I want to do such as Microsofts Sync Toy, but none of them offer the grouping and exclusions options that I am going to program in to this backup/sync program.
So here is my problem, I have the included code taking two folders, a source and a destination, and copying everything from the source to the destination. It will skip over any unchanged files/folders and will delete anything found in the destination folder that is not found in the source folder and it will update all files in the destination folder that have a newer version in the source folder. In other words it will mirror image the source to the destination but will be smart enough not to copy unchanged items from the source to the destination thereby saving a lot of time. The sync part of the program is working fine, the displaying of the progress and results is not.
I have a structure in memory which is working fine - now I need to write this entire structure to a file.The below code almost compiles, the problem is that "mstaRecordInfo" cannot be changed to a string, probably because of the Date field. I've just spent over an hour experimenting and searching the web but have gotten no closer to a solution
I am trying to print the contents of my array to a text file, but instead of just printing whats in the array it prints all indexes even if they are empty.
this is the code i am using..
Code: FileOpen(3, "garbage.txt", OpenMode.Append) Dim intCounter As Int16 For intCounter = strFirstName.GetLowerBound(0) To strFirstName.GetUpperBound(0)
for a school project I have to write data from a listbox to a new file that a user can create. I can create and save a file no problem, but for some reason I can't write anything. I followed the textbook provided but when the file saves, I open it up and it is blank. I'm using fileWriter.WriteLine and I'm just test something basic to write to a file first and I can't do it:
Code: Private Sub storeFileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles storeFileButton.Click 'creates a new file Dim result As DialogResult ' stores the file Dim fileName As String ' name the file to save the data
Well I'm in the middle of making a program to edit .ini files. Although I have hit a snag. I can save my settings (relies off checkboxes) with ease, however if I change something and/or hit the save button again even after the code has finished, both my entire .ini files are cleared (filePath and filePathPrefs) and all text is gone. Here's my
[Code]...
why it's clearing the .ini file even after the initial write worked? I've tested to make sure the entire code has finished before making another save with different settings but the issue happens again.
I am able to read the xml file into dataset. Currently it is printing in a string format. Is it possible to print in xml format from web method call. I want to publish through dataset.writexml
Im having trouble creating and then writing to a file. First, I check to see if the file exists, if it does not, then I create the file, close it, and then open again for appending text. I am getting an error during debugging saying the file is in use by another process, which is confusing since I am closing the file before opening it to append any further text. Here is my code:
I'm makin an application which will calculate the amount of carpet needed to floor a room, i would like to add in an order management bit too the application so that the user can add, delete and amend pending jobs. I'm a bit of a beginner so i don't know which way is really best to go, should i use file writing on database? I will be takin values from variables and textbox's if thats of any importance.
I have a tab spaced txt file that looks somthing like this;
[Code]...
I'd like to be able to read in the file and have a pop up message ask somthing like this; "Is cash1 for comp1 correct?" If yes ask about the 2nd line and if not ask what the real cash total is and then over write that to the file, then ask about the 2nd line.
i am working on a Yahtzee projeect for college and am struggling with reading and writing to a csv file the code i have to read the file works but only gets the first column and displays it on a line not as a list.
Private Sub HighScoreFrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code]....
the other criteria i have to work towards and wondering if anyone can help is to limit the amount of records to 10 so need to check what the lowest score is and if the current score is higher over write it,
I am using VB.net and am puzzling over an issue which cropped up.I have writen a POS application and am writing a number to a .csv file after each transaction.The problem I am having is this number is written to the file 3 times for each transaction.[code]
I am creating an application thats output is xml files that all have the same route node and then 4 child nodes and in each child node there are different numbers of grandchild nodes in these child nodes. At the moment i am trying to write the xml file starting from one form that has 5 different calls to the module to write the root node and then the 4 children.
but this is as far as i get. because each routine replaces the total xml file so i am left with the 4th child node. I would like to be able to create an XML writer that i can feed from the outside the names off the elements and attributes and values. Here is the code i have at the moment:
I have created a small game for my son and after each game it tells him his score.all I want is to write the highscore to a file and have it open each time he begins a game..so he can see what his last score was. I dabbled with all this Io.file stuff and I just can not seem to get it to write to the file..also how do I work with app path in this case? I mean when the game is done and installed the current path of the save text would change.
Don't know if I should use save Settings And get settings to save the color of a label everytime the program closes, then gets it when it opens? I have this but I am just confused on how to get it to read the color of the label
I am working on a program for work and I am stuck on trying to make a new XML file from VB.NET 2010. I have the old code which was done in C# and it works but even using a C# to VB converter didn't help. I will paste in both the C# and what I have in VB
This is my first post in the community. I am putting together a program that serves two functions:1. Takes input from TextBoxes and writes it to a text file.2. Takes the text from the text file and displays two specific strings of text in a MessageBox.This is the code for the button that writes the input to file.
Private Sub facSubmitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles facSubmitButton.Click Dim facultyRecord As String = "C:\Documents and Settings\All Users\Desktop\teeny.txt"
know that to output file with texts, can use the StreamWriter method. But may I know how to write text into a file and insert picture into the output file at the same. And also, how to read texts and pictures and display it into a RichTextBox.Realization!