Application Reads/writes To HKEY_Users Instead Of HKEY_Current_User
Feb 17, 2010
I'm launching my application at the end of installation using custom installer class - Sub oncommited.I'm using vb 2005 setup project.The application main form load event need to read/write values from HKCUSoftwareMyApp registry.The problem is that when the application is launched at the end of installation ,it reads/writes from HKEY_Users.DefaultSoftwareMyApp instead of HKCU though I've written
My .Computer.Registry.CurrentUser.CreateSubKey(RegKey).GetValue("Name","")
When the application is launched through Program files shortcut,it reads/writes properly.I need to exit the application depending on registry values.
View 1 Replies
ADVERTISEMENT
Feb 24, 2010
I'm currently finishing up a project that reads / writes to an access database. The only issue I'm having is that it needs to have the file path to the database file. EX:
[Code]...
View 11 Replies
Mar 15, 2009
I am writing an app that reads from the com port, filters the data, then writes to the text box, then immediately starts over. This all takes place in an endless " do while" loop within the "start" button code. I also have a end button too which closes the com port and ends the program. Some other buttons are present also to change the filter settings.Problem is when I click start, data is logged, but none of the other buttons work. Also some of the text boxes are "see through" and dont look like thy have updated with the rest of the form.
View 9 Replies
Jan 24, 2012
I'm having a bit of trouble with the SerialPort class I'm hoping someone might be able to shed some light on. Specifically, writing to the port appears to work without incident. However, reading data is proving problematic. Initially I thought it was my hardware, but testing suggested the fault lied in software. I was able to confirm this with the installation of a loopback device on the port. It tends to be missing bytes, inserting bad bytes, and shifting bytes randomly.
[Code]...
View 1 Replies
Oct 4, 2010
I should create a program for a Pocket PC that reads & writes data from an MSAccess database located on a desktop computer (pocket PC and desktop one are connected through a Wi-Fi connection).Is that possible?
View 3 Replies
May 9, 2010
A function of my app is to encrypt a file with TripleDES. The problem is that when the app reads the data, encrypts it, and writes it back, the new data is appended. I need it to overwrite the original contents.Here is the code:
Dim
DES As
New
System.Security.Cryptography.TripleDESCryptoServiceProvider[code]............
View 2 Replies
Feb 3, 2012
My application writes to the event log if there is an error or other status updates.
The application checks to see if there is an event source named "applicationName"and if not, it creates the source (see code below).
This works fine if the user is an administrator.
If the user is not an administrator, an error is thrown when SourceExists is called:
{"The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security."}
In my environment, the typical user is NOT an admin. Therefore, I cannot use the event log in my application.
Is there a way around this, or is the event log effectively useless for distributed applications?
View 9 Replies
Jan 28, 2009
I have a hardware which sends out packets containing 17 bytes to the comport in bursts of 3. the little test VB that I have written receives and displays the bytes in a line of 17 bytes long and works fine until it gets to around 170th packet, then it starts to mix up (looks like shifting the data left) the bytes shift mostly by one digit sometimes by two. then it will continue to give almost a packet correct and a packet shifted for about 50 packets. Then it will correct itself for a long while, but then the speed at which it receives drops. All the packets are sent 3 times, and before things go wrong (within the first 170 packets) the packet counter shows that it receives 3 packet each time but after the problem it goes to 2 packet per burst and then to one.
If i close my VB monitoring program say at packet 165 and immediately open it again, it wont go wrong for another 170 packets, this points the finger at VB. I have check my hardware, there is no problem with that.The program reads port - waits for 17 bytes - once 17 has been received it will go and buffer the packet in an array. In fact they are 2 arrays but printing fro either results in the same problem.I have tried whatever i could think of but to no avail, i am wondering if some kind of house keeping needs to be done to clear something... I am sorry the program is a bit messy but I have been making many changes to find out what the problem is - my code below:[code]
View 11 Replies
Feb 20, 2009
I've had a search through a number of extremely useful articles on the forums, however rather than reinvent the wheel I thought I would ask if anyone already had what I am looking for..A simply little VB app that opens a session to a specific IP port and then writes to a test file everything it receives. If the connection drops, simply re-stablish it and keep listening for text to write to the file.
View 1 Replies
Oct 30, 2009
I have a small console application that writes the [TARGETDIR] from my msi installer to a text file.If I choose C:Program Files as the installation folder, it only writes out C:Program..What would you use so that it doesn't stop writing when there's a space? [code]
View 3 Replies
Feb 17, 2009
Basically, i have to write a small application that just writes in certain cells of a set page of an excel sheet, the sheet will always be the same layout.
View 2 Replies
Jun 24, 2010
I've got an application that reads a XML file via a stream reader. The problem is I can't edit my XML file and save it when others are using the application that is using the XML file at the time. how can i get around this?
View 1 Replies
Apr 3, 2011
I need to create an application that reads numbers from a file. it then should display the total of the numbers, display the average of the numbers, display the highest number in the file and display the lowest number in the file. We are using visual basic 2008. I am new to this and stuck . How do I begin. I included the number set that we are supposed to read from.
Attached File(s) NumberSet.txt (990bytes)Number of downloads: 80
View 14 Replies
Jul 15, 2010
My application reads information from an Excel spreadsheet into a DataSet (ds1) which is then filtered into another DataSet (ds2) based on user-specified criteria. The information is basically telephone call logs that reflects when a phone call was made,what extension it was made one, how long the call was, what number was called, etc.When the user's "search" criteria is matched in ds1 above, the application adds the number called to a ListBox on the form. When the ListBox Item is selected, additional information (call duration and such) is displayed to the right of the ListBox. My problem is that a single phone number could have been called multiple times on an extension within the date range the user specifies and for each occurrence of that number in the ListBox, the "expanded" info only reflects the information for the 1st call to that number listed in the DataSet.
The only unique identifier I have is the DateTime field for the row (as this goes up to the second). I thought about putting it into the ListBox item, but I'd prefer that this date not be visible until the user selects the ListBox item to view the details for that call. [code]
View 7 Replies
Aug 14, 2009
I want to develop a small application that reads in scanned barcodes into a database table - Would a vb.net form based application that connects to the database be best approach? What I'm think is each time the user scans in the barcode - a message appears on the form saying the barcode that has been scanned.
1.Would I need to program anything within the program to check whether the barcode scanner is connected (or is this not necessary since it works like a keyboard device?)
2. How could I automate the scanning in without requiring any user intervention like a button which saves it to the database - so basically as soon as a barcode is scanned in - it is saved to the database and the next barcode can be scanned in etc.
View 1 Replies
Apr 4, 2011
I am using VS2008(VB.NET) and SQL Server2000. I want to make an application which reads files and Insert Data into SQL. If first file has some error. Write into log and Move Next file for Proceed. How can I do that.
View 3 Replies
Apr 23, 2010
I am developing an application that reads an MDI applications child window and grabs the information from a control such as a textbox or listbox. I have tried to use Findwindow in order to accomplish this. I have gotten all the way to the control, but once I get there it returns blank. Can anyone point me in the right direction to accomplish this.I am able to read the window title and get the control title but when I send a message to the window it returns 0. Now I am just experimenting so I have no concrete code, but here is a snippet. [code]
View 1 Replies
Dec 2, 2011
I want to get every single registry Name and value, which lies in HKEY_CURRENT_USER....Run(for getting and THEN deleting them to prevent run those programs at windows start). This is just for getting names.
Imports Microsoft.Win32
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click[code].....
Well, this isnt working, when i run it in the vb and click button, it says system missing member exception: IWshShell3 hasnt been found.
View 1 Replies
Oct 16, 2009
Let me explain the functions and what they do first.This function writes a key to a specified file:
Public Shared Sub WriteDatabaseKey(ByVal section As String, ByVal keyname As String, ByVal entrystring As String, ByVal filename As String, ByVal filepath As String)
[code]...
View 1 Replies
Jan 7, 2011
I am using:
VB
My.Computer.FileSystem.WriteAllText("J: est.txt", "Text here", True)
to write text files and such. How would I do quotations in that text..say if I wanted to put in
Text Text "More Text" Text.for it to write.
View 4 Replies
Feb 21, 2009
Im trying to buffer data being written to a device on a com port. The equipment attached to it does not use any form of flow contol and if you write to much information to quickly it falls over. So I have had the following thoughts.
I would create a list of strings and when I wanted to write data to the com Port I would just add the string to the list. I would then have a Sub running its own thread to step through the list, write the string to the com port ,pause a fixed amount of time, remove string from list and repeat until the list is empty. Then keep looping the above.
Code I have so far is below
Private MsgList as new List (of string)
Private sub MsgPump ()
Do
[Code]....
THis does work but If I add strings to MsgList to quickly it throws an exception.
View 3 Replies
Oct 30, 2011
I want to create a tiny program that writes itself. VB.
Basically, I start it off with the smallest coding possible. Then, I want it to be able to automatically generate buttons, forms, labels by itself. I want it to compile another version of itself, and to test if it worked. I want it to in someway to be able to ask the new application if it works, and if it does to close both and to run the newer variation, then to repeat this process. I guess this is kind of like a self-manifesting application that keeps growing; an AI perhaps. Is this possible?
View 2 Replies
Sep 30, 2009
I am needing to write to a "rtf" file, and always insert my text on line 3 of either a new or an existing rtf document.I'm familiar with vb, but have not done much with the system.io functions. I have been testing several examples from the internet using the streamreader and streamwriter but still having issues finding a way to "insert text" on a specified line number. My questions:
1)I will always need to write on line #3, do I need to read all lines as this example shows "lines.AddRange(System.IO.File.ReadAllLines("C :/test/myrtffile.rtf"))"
[code]....
View 4 Replies
Mar 19, 2012
i have this message program that writes text to a .txt file when i push a button and a filesystemwatcher that checks for when that file is changed and when it is it set the text of another textbox in my program to the text of the file. in the text i transport over there are usernames, i want the program to check to see if textbox contains that text then i want it to highlight or color or change the font of that text, or username. but i want it to just change the username's attributes not the whole text box,
View 6 Replies
Sep 22, 2011
trying to write to c:windowssystem32 on a windows 7 x64 machine, but the application keeps writing to c:windowssyswow64 instead. I have heard of windows interpreting commands and modifying them to be what microsoft "thinks" you are trying to do.when dealing with 32 bit apps running on a 64 bit os.the line of code im using is:
System.IO.File.WriteAllBytes("C:WindowsSystem32dbcon9x64TEST.dll", My.Resources.dbcon9X64)
the issue is I need to write files to both c:windowssystem32 and c:windowssyswow64 ....the files need to have the same name.
View 4 Replies
Sep 13, 2011
I want to develop a text editor for writes articles and I want that the user can add hyperlink on any text. How can I do this?
View 20 Replies
Mar 23, 2010
Im currently looking fora solution to load/delete/write to a csv file. I tried to save my .txt into .csv but when its loaded into excel it writes everything in column
A1: John Freeman,Apartment 1 Street 2,New York with commas...
I want to put it in column A1: John Freeman B1: Apartment 1 Street 2 C1: New York
What am I missing? This cvs seems like the thing i want to work with.I testet it with writing my user registration form to .csv and its writing it perfectly into excel when i use & vbCrLf & between the text inputs, but will be listing them vertical and not horizontal as i want them to be.Also i don't know how to clear my csv document now and how to call the csv file to a table or a textbox like i did with my .txt file.
[code]...
readalltext can't read .csv so the code should be like?
View 8 Replies
May 25, 2007
I have a program that currently takes data and writes it to a MS Excel spreadsheet. (automatically opens the program, creates the cells, and fills them with data)
I would like to add an additional feature to my program that offers support for OpenOffice.org's 'Calc' spreadsheet program. (so users without MS Excel can use the application) So I am basically asking if anyone knows how to automate OpenOffice 'Calc' from VB.net. (I am using Visual Studio 2005)
I have searched on the OpenOffice forums but no one seems to know the vb.net code for this. So I was wondering if anyone here has done this, or would know how to do this.
View 3 Replies
Jul 4, 2010
how can I let VB.Net writes an excel 2007 file? For example, the data in a TextBox will be written to the excel file every 30 seconds.The enviroment is VS2008, .Net 3.5.I've just started VB for one month, so please give me a piece of code to help me understand. I tried to find the solution on the Internet, but none of the codes worked for me, some people mentioned import "Microsoft.Office.Interop" in the code, but if do that in my code, VS said that "Namespace or type in the Imports 'Microsoft.Office.Interop' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases."
View 1 Replies
Oct 21, 2010
I have a program which records the phone numbers I dial into one program into its own textbox. But whenever I use numlock to type the phone numbers in, it appears as "abc, etc" in the recording program.
View 1 Replies