I saw that one and also found this article from the same author as well: http://www.knowdotnet.com/articles/serializelistview-listbox.html I can follow the code, but cannot get it working. I was hoping to find a working sample program that uses that or very simialr code to better understand how it works as well.
hkinser9
Posts
-
Listview Data to XML -
Listview Data to XMLCompleted my password storage program and down to the part where I would like to write the listview data to an XML file (for later encryption). Cannot find anything that gives me an nice or usable example on how to do this using the listview control. Does anyone have example code for this or a place I can be directed to for more research? Thanks, everyone. - Harold
-
Listview Search - Partial Search Only NeededUsing the code below, I can only do an EXACT seearch for an item in a listview control; however, I'd also like to do a PARTIAL search as well but can't get that working from what I can find. I know there is a FindNearestItems method, but no luck in getting that to work. Any suggestions on how to code the partial search? Here is my code that works well in a doing an EXACT search: Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged Dim Itm As ListViewItem = lstItems.FindItemWithText(txtSearch.Text, True, 0, False) If Not (Itm Is Nothing) Then lstItems.Items(Itm.Index).Selected = True lstItems.EnsureVisible(Itm.Index) lstItems.Focus() End If End Sub
-
Encrypt File using User Supplied PasswordHello everyone. I've read several articles on the internet in trying to figure this out; however, those article seem a bit over my head apparently and I can't seem to find a code example that is simple and to the point to implement. I'm coding a password manager program in vb 2005. All that is left to do is obtain a password from the user the first time they start the program, and use that password as the encryption key in creating the file that will hold the data from the listview control. For now, the login form is simply taking the password the user enters and encrypting it inside a separate file for now as you will see below - the file itself is not encrypted. I have all the forms complete and the listview data is writing to a currently unencrypted file for now. I just want to make it all one file with the user password being the key to encrypt it all. Here is the login code I'm using if we can somehow modify it to do what I'm looking for: If txtUserPsw.Text = txtPswVerify.Text And Me.txtPswVerify.Text.Length >= 8 Then Try ' Obtain a FileStream object. Dim aFileStream As New FileStream(AppPath(False) & "\passsafe.bin", FileMode.Create) ' Obtain a BinaryWriter object. Dim aBinaryWriter As New BinaryWriter(aFileStream) ' Encrypt the new password and binary write to a binary file. aBinaryWriter.Write(EncryptPassword.EncryptString(Me.txtPswVerify.Text)) ' Close the FileStream and the BinaryWriter objects. aFileStream.Close() aBinaryWriter.Close() ' Message user. MessageBox.Show("Password was encrypted and saved. Don't forget it!") 'Display Main form (Frmlogin) Dim safe As New frmSafe 'Hides login form Me.Visible = False safe.ShowDialog() 'disposes login form on exit of main form 'Application.Exit() Me.Close() Catch ex As Exception ' Message user. MessageBox.Show("Password was not saved. ERROR: " & ex.Message) End Try End If Thanks everyone! Sincerely, Harold
-
Dictionary FileHello, everyone. Happy holidays. I'm just wrapping up an Anagram program to use when I play scrabble. I need all the help I can get when playing against my wife. :-) My question: I'm using an old Dic.txt file I got a couple years ago to reference in my program. Is there a formal site or program that takes a current dictionary and produces an updated text file? Bascially, how do programmers obtain current dictionary files to use in their programs today? I know I've seen some in DB and text file formats, but for now, I'm more interested in keeping in txt format. Any help in locating such a site/program would be greatly appreciated. Thanks! Sincerely, Harold Kinser
-
VB6 Ascii Art Corrupt OutputAll, I've wanted to complete my Ascii Art project in VB6 for my son before I tried to port it over and learn VB.Net in more detail. My son loves the end-result art work you can do by loading an image and having it come out as colored HTML. Instead of buying a program to do it, I wanted the challenge of doing it myself. This program will take an image file (gif, jpg, bmp) and convert it to ASCII and store it in a colored htm file. It uses a loop that replaces a pixel with a letter. I've got the program working in VB6 funtionally; however, the output is not what is expected and after a couple weeks have no idea why. I was hoping I could post the program here or send it to someone who has time to review the programs code. It's approximately 270 lines of code. Small project with one form only. I didn't see where I could attach a file to upload the code here. Suppose I could copy/paste it all here, but wanted to see who was interested first. Plus with the program, I'm sure it will be much easier to troubleshoot. Sincerely, Harold
-
Center Group box on form loadThat did it!! Thank you very much. - Harold
-
Center Group box on form loadAll, I've created a timer program that when it ends, displays a password form (no border) via showdialog that is maximized when displayed. The form contains one group box that holds my text box to enter the psw in and an enter button to confirm. My problem is that I won't know what resolution a person screen may be set to and when the form loads on their PC, I want the group box to be centered in the middle of the form to ensure it will always be visible. I know it sounds simple (probably is), but I can't seem to get the group box to center when I try different resolutions. My fear is that if I don't get it to center, it may very well show too far off to one side on someones computer and they will not be able to do anything but shutdown. Plus centered looks must more professional as well. All help is greatly appreciated! Thanks, everyone. - Harold
-
VB.Net System ModalHello, all. I've been working on a timer program that I can install on my sons computer in order to allow him a specific amount of time in the evenings/weekends. I've got the program all coded except for one feature: 1. When the timer completes it countdown, I'd like for it to take control of the operating system and pop up a password box that, until the correct psw is entered, essentially prevents the computer from being used (or something very close to that). I've searched extensively in many forums but have been unable to find anything that fits what I am looking for. Does anyone have information they can provide in order to code this in vb.net? Sincerely, Harold