What I am trying to do is serialize an object map and store it in My.Settings. There appears to be no data type that can be used in My.Settings that would hold a byte array other than a string. Therefore, I encoded the byte array from the serialization and turned it into an ASCII string, but it wasn't a true representation of the bytes, and the deserialization failed. Converting the bytes to an ASCII string apparently chops some of the bytes down to 7 bits, which hoses the conversion.
Before I get into anything too bizarre, I figured I might as well put the question here: Is there a way to stuff a byte array into My.Settings?
im trying to save a encrypted password to a application settings which is a byte array but didn;t find any easy way to do so. i did try to convert the byte array to string adn read the string back as a byte array but the problem was the bytearray lenght increases when i read it back.
I just wondered if you can or can't save arrays using the settings system object. There seems to be no way of entering it at designtime. It seems implied you cannot create new user settings.subobjects at runtime. I'm looking to find the easiest way to save a populated array of PictureBox's. If the only way is a self/custom made/managed .ini file then I need to know so i can start on that but I was hoping to use some of all this phaff in the new frameworks usefully.
i have created a user setting named 'setmeup' as string, scope = user, value = "magical meow meow!".in my code i access it and assign it a new value like this...my.settings.setmeup = "howdy cowboy!"my.settings.save()application.restart()when the application restarts, i expect the my.settings.setmeup = "howdy cowboy!" but when i check its contents its still "magical meow meow!".but when i use application.exit() instead of application.restart() and manually restart the program, my.settings.setmeup = "howdy cowboy!" which is correct.what must i do? i want to use application.restart() because i don't want the users to double-click the icon again to start the program. i want the program to restart automatically.
I set up some application settings for checkboxes on an app and then decided to remove them. When I set the Application Settings to (none) in the designer and restarted the app, the checkbox constantly checks and unchecks itself. I completely remade the app and removed the file that is used to store my.settings in the Local folder of the user's appdata profile. I also made sure to uncheck the "save my.settings" on shutdown.
I'm trying to save a collection of key/value settings in my application's "user settings" (they're column widths), but while I see no errors, when I run the code (in the IDE) my collection in "My.Settings" is always nothing at startup. I do a "My.Settings.Save" when the application exits, and barring the "serializers not found" errors in the IDE, no other errors occur. When I run my application as an exe, it behaves the same way..
Now i have some images and i have a database (MS Access)i need to convert all images to !one byte array!(couse i have 1 column for images) and i save this array. Then when i need a picture i should take some pic on this byte array.umm i think i cant explain my status :)
i need to cut this byte array like split function. so then i can choose image whatever i want
I have a byte array of a file and I need to save it into my database in a field that has been set aside of type image.
However I have a problem my data access class takes a sql string and commits it to the database for example.
"EXECUTE stored proc @parm1, @parm2, @parm3"
However the problem is I cannot figure out how to transfer the byte array to string so that I can add it as an argument.
I hope this make sense.
I also understand that I can build parameters in com objects but I do not want to do this as it will disrupt my whole data access class and I am not prepared to do this at the moment.
I have this code which saves an "Image" to a SQL Server database:
vb.net
'You have the images in the PictureBoxes, now you need to store it as a Reference Image 'if the user has selected that option Dim ms2 As New MemoryStream()
[Code].....
I am working on a PHP site at the moment that is having trouble reading that data to display the image, so I am attempting to not only save it to the DB, but also save it as a bitmap or other file type to the actual server.
How can I create an image file (not really picky on which file type) from the "arrImage()" data above?
I have a device with upon serial communication, it send the data as HEX values, (e.g., C020042ABD0F91A103E400F929EBC). I use the following code to get data from the serial port.
Dim fStream As New FileStream(sFileName, FileMode.CreateNew) ' creates new file Dim bw As New BinaryWriter(fStream) System.Threading.Thread.Sleep(1500) ComTd.Read(data, 1, bCount) Dim bCount As Integer = 4119 ' it is the size of the chunk not block size Dim data(bCount) As Byte [Code] .....
It's just a login form that is supposed to save your connection settings, but it won't save my values; they revert to the previous values every time I run the program. Does the IDE just not save your settings, or am I doing something wrong?
Public Class frmLogin Private Sub cmdSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSubmit.Click
It saves the settings to the registry, loads the preset settings, and if you want to uninstall the app, you can use the delete settings, which deletes the registry folder for you app.
Here's how: create a form, 1 textbox, 2 check boxes, 3 buttons named as (setbtn, getbtn, delbtn) '1 textbox, 2 check boxes, 3 buttons as setbtn, getbtn, delbtn Imports Microsoft.Win32 Public Class Form1 Dim reg As RegistryKey = Registry.LocalMachine.CreateSubKey("SoftwareMyApp", RegistryKeyPermissionCheck.ReadWriteSubTree) [Code] .....
I am trying to save a path to my settings, it just dont want to work.
Private Sub BulletPathButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BulletPathButton.Click Dim OpenFileDialog As New OpenFileDialog If OpenFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
Apparently the system.collection.arraylist does not work since it is more of a list than anything else. Is there some sort of collection that will save my array as is so that it can be retained latter on application load?
I use a textbox AutoCompleteCustomSource to save recent entries within a textbox and obviously, then autocomplete them when the user enters a matching value. When the application is closed then re-opened these values are lost.
I believe I can save the values using My.Settings but I haven't been able to get it to work.
I created a setting 'AutoCompleteList' of type System.Windows.Forms.AutoCompleteStringCollection in the Project properties > Settings area.[code]...
i know about the My.Settings but i need to know how to save all the settings in a .ini Text file for example I GOT A SOURCE :: BUT THE GET SETTINGS DOESN'T WORK || Save settings DOES work
lets say i have a checkedlistbox in my program and i want to save everything that is checked in an xml file so it will be checked again when i start up the program the next time, how can i do this ?
I want to save settings in my program as follows. I have an import button to open files. How can I make it so when I start up my program next time, they are already "imported" as a setting or something? *Note - I have not tryed anything as I do not have the slightest clue how.
I am working on a file explorer, and I want to save the view settings of each folder, like the icon size, font size, ect.. I was thinking of using an xml file to save these settings.