Best Way To Maintain An Autocomplete / Suggest List Across Sessions

Apr 7, 2009

I would like to maintain a list of all of the strings entered into a ComboBox across all uses of an application on a given PC, for use as the AutoCompleteSource for that ComboBox, i.e., I enter in "Fred" in the ComboBox, commit the data, close the application, reopen the application, reopen the ComboBox, type "F", receive the suggestion "Fred".Assuming I already have in place code to create and maintain such a list in memory and add new elements to it as they are entered into the ComboBox, etc., what do you suggest as the best way to save/load this data in between sessions?Possible complicating factors: This application will be deployed via OneClick deployment, and will search for updates online every time the application starts. I would prefer that if the application updates, the list still exists after the update has completed.

View 2 Replies


ADVERTISEMENT

Globally Declared Collection (List Of) Not Maintain Values Across App

Mar 10, 2012

I've been building a simple card game in VB using VB 2010 express. I've built a simple Card class, as follows:
Public Class Card
Public Property Number As Integer
Public Property Suit As String
Public Property Image As String
End Class

I setup a base deck to create the unique, individual cards, which will then be used in multi-deck games. I have a game table form where the cards will be displayed. I declared this base deck inside the game table form and built it during the form's load event:
Public Class Main_Table
Public baseDeck As List(Of Card) = New List(Of Card)
Private Sub Main_Table_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim myCard As Card = New Card()
[Code] .....

Everything runs fine up until the end of Main_Table_Load. I've inspected the baseDeck values and they are correct. But when the Build_Deck_Click sub is invoked, the baseDeck collection's values become all the same, specifically it becomes composed of copies of the last card I built. I've stepped through the code and expanded baseDeck to confirm that all Cards become the same. I've tried moving the Public baseDeck As List(Of Card) = New List(Of Card) to a different module, with the same results. Since I will be using the baseDeck list through the app, I can't declare it privately inside the form_load event, as I'd have to re-create it every time I need to use it.

View 2 Replies

C# - Dynamically Changing Textbox AutoComplete List?

Jan 8, 2012

My client wanted to have a textbox in the Customer form of the application, which offers the applicable endings to a started street name. He starts to type a street name and the textbox offers a list of streets which start with the char sequence he typed into the textbox. Textboxes have the AutoCompleteCustomSource property and even though a list of common street names will be longer than it could be pre-filled on start, I could just hit a database with a query, populate an AutoCompleteStringCollection and show that to the user.

Now here's the thing: If I make the list populate on every keypress/keydown whatever, the program crashes and throws an AccessViolationException. I've found out that that's because: The control is in the middle of showing the AutoComplete list when at the same time it is being modified, resulting in the crash. When you refresh the Autocomplete List, the control is recreated with new pointers. Keyboard and mouse events (KeyPress, MouseOver, MouseLeave, MouseHover) attempt to reference the old control's pointers which are now invalid in memory causing a memory access violation to occur.

The underlying AutoComplete implementation does not allow for changing the AutoComplete candidate list object once it has been set on a window. To allow changing the list, WinForms destroys the Edit control or ComboBox and recreates it. This causes an exception if the underlying control is destroyed while the AutoComplete window is still use it. I read about this on MSDN, their resolution: Do not modify the AutoComplete candidate list dynamically during key events. I know that you can do this by creating a custom control and such, but can it be done with just pure coding wizardry?

View 1 Replies

Autocomplete In Textbox For List Of Names Separated By Semicolon?

Apr 4, 2011

What I am trying to do is allow the user to enter a list of authors in a textbox separated by semi colons. After each author is entered, followed by a semicolon, I would like the autocomplete to work on the next name and so on (e.g., Smith, John; Eastwood, Clint...). I can get the autocomplete to work in a textbox with one name, but cannot seem to figure out how to get it to work on a list of names in a text box.

View 8 Replies

Autocomplete List Does Not Show All Possible Completions With BindingSource.Item

Mar 7, 2011

I've got a BindingSource for a DataSet. I'm fairly new to this whole binding business and databases, and it took me hours to figure out how to use BindingSource to get to an item, because the Row method was not included in the autocomplete. Not to confuse anyone, here's some sample code:[code]The code runs perfectly and does exactly what I want. My problem is the following: When I've typed in source.Item(0)., autocomplete does not display Row in the list. Is this perhaps not the best way to do what I'm doing? Is there a reason it's hidden? Is this a good coding practice to do so? The fact that is wasn't there took me lots of time Googling, so I'm trying to figure out whether it's a Visual Studio glitch or my own.

View 1 Replies

Make A Combobox Only List Based On User's Input Via Autocomplete?

Aug 3, 2010

How to make a combobox only list based on user's input via autocomplete?For example, if user input "A" the combobox only lists all names start letter "A".If user input "AM" the combobox only lists all names start first two letter as "AM" and so on.

View 6 Replies

How To Suggest A Number

Sep 23, 2009

I am connecting to a database and would like to autosuggest the next message code in a text box

View 1 Replies

Run Search Suggest And Populate?

Aug 15, 2011

I am using the following to auto search db
Dim connString As String = My.Settings.strConn
Dim conn As New SqlConnection(connString)

[code].....

I want the text boxes to populate when a result is clicked from the drop list of the combo box at the moment you start typing in the combo box and it starts to populate with first names then you pick one of the names from the list which is displayed in the drop down box you then have to click the box to get it to populate the text boxes.

View 9 Replies

Suggest And Append In TextBox?

Jan 30, 2012

i am using this code for updating autocompletestringcolllection in vb while run time

[code]...

View 5 Replies

Auto-suggest Values In Textbox?

Apr 2, 2009

I am not sure but i am looking for some help regarding values to be autosuggested from database when a user types in a textbox and the values should be a drop down list. I am using VB Net and it is something like the Autocomplete feature except that the values should be from database. I have not seen any links to this type of material but i just wanna know if it is possible. Infact i have found this type of stuff working with a combobox but havent found any for textbox.

View 1 Replies

Forms :: Make An Auto Suggest Combobox?

Dec 9, 2009

i have a combo box with data from database,it can already show all the data in the list when you click the list down,what i want to do is when i type on the combo box it can show me all the available items based on the text that i type, is it possible?

View 3 Replies

Textbox Auto-Complete/Suggest Error?

Mar 15, 2012

why is it sometimes i get an error? it doesn't highlight the error

CODE
Dim SqlQuery As String = "Select UserName from Login"
Dim SqlAdapter As New MySqlDataAdapter

[code].....

View 3 Replies

Text Getting Selected When Don't Want It - Auto-complete = Suggest With Custom Source?

Apr 28, 2010

txtBox has key up event that fires, if txBox.length = 2, a sql select to dataset for custom source of autocomplete.when user types in 2 letters it selects the 2 letters and when 3rd character is typed of course it erases the first 2 if you dont unselect..

Private Sub txtBox_KeyUp(sender, e ) Handles txtBox.Keyup
If txtCriteria_Lanemgr.TextLength = 2 Then
Dim strSQL As String

[code]....

View 2 Replies

Access Sessions In Asp.net Handler ?

Apr 13, 2012

I am trying to upload images using generic handler as shown below and I have a normal aspx page where I am showing all the uploaded images after uploading.Everything is working fine.

CODE:

Now I want to add a session variable by generating a random string and add the uploaded images to the newly created random string.

1.I have seen this Question on SO to use System.Web.SessionState.IRequiresSessionState for sessions and how do I create a folder with that and add my images to that folder after doing that how do I access this session variable in my normal aspx page.

2.(Or) the better way is create session variable in aspx page and pass that to handler?If so how can I do that?

3 .I am trying to find the control from my handler.Is that possible?If anyone knows how to get this then also my problem will get resolved so that I am trying to create a session from m aspx page.

View 1 Replies

Secure User Sessions In ASP .net Using VB?

Oct 5, 2009

procedure to create multiple secure user sessions in ASP.net.

View 1 Replies

Shared Methods In ASP.NET Sessions

Feb 25, 2011

As a followup to the previous question I have asked "ASP.Net Architecture Specific to Shared/Static functions" I am still struggling to understand the implications of using shared methods in ASP.NET.

So for example let us take the following code.[code...]

View 3 Replies

Enable Multiple Sessions For WebBrowser?

Dec 6, 2011

Even after numerous attempts, im unable to set different sessions for multiple webbrowsers (in tabs ) hosted on the same windows form.

So far, i have tried the following methods (and failed)Created a new form for each session (The WebBrowsers share the session)Used HttpWebRequest,HttpWebResponse to get and set separate sessions for each webbrowser ( Couldn't implement this properly)Could someone please point me out to a proper channel on how to implement this ?

View 6 Replies

IDE :: Keep The Size Of The Properties Window Across Sessions?

Apr 10, 2009

When I start working on a Project I like to change the size of the Properties Window. (I like to make it taller than it is by default). But each time I start a new Project the Properties Window goes back to the original shape/location. Is there a way that I can customize the layout of that window so that the shape is retained across sessions?

View 6 Replies

VS 2008 Multiple Sessions - Different Web Browsers

Sep 10, 2009

I've thought long and hard on how to do this. Since I'm posting here, you see I haven't figured it out. I've found out how to login to a website with GetElementById, but I have another problem. I need to login with multiple web browsers. But when I login on the second, I can't because the session/cookie is already there. I thought usnig a proxy would work, but that just applies to both web browsers. Using the example below, would it be possible to apply this to only one web browser? Or make separate sessions for each web browser control?

[Code]...

View 2 Replies

VS 2010 Different Applications Share Same Sessions?

Oct 19, 2010

just wanted to ask if it is possible to have different applications sharing the same session (i.e. database session)... i'm planning on creating a web-based application and a form-based application using asp.net for web and vb.net for forms but i need to have them share sessions since some global variables will be session based and also authentication to one application should also authenticate on the other.

View 2 Replies

VS 2010 Passing Objects And Sessions?

Aug 21, 2011

I was wondering if someone could tell me if this is "bad practice" or is a perfectly acceptable way to pass an object to another form.I've cut out a lot of the code to summarise what im asking.

[Code]...

Dim myRetrievedObject as myObject = Module1.returnSavedObject()Is this a acceptable way of passing an object between forms or is it a completely bad idea?Ideally i would like to be able to "add" further objects to the initially created object in Form1 but then on reloading of Form1 , retrieve the new version of myObject with the newly added objects within the myObject class.My initial thinking is this creates an almost session like state for the initial object. So you can use the same object over all 3 forms or more and just simply add to it like a shopping cart type of functionality.

View 10 Replies

Allow Multiple IE Browser Clients With Unique Sessions In IIS 6.0?

Mar 2, 2011

I have a ASP.Net VB.Net application, which I developed an deployed in about 2004. I have just upgraded it to a new server and IIS 6.0. The application requires users to login from IE it and maintains their State using sessions on the server. I would like the users to be able to have multiple browsers open, each running with unique data on their client system. Is this possible, if so, what do I need to do?

View 4 Replies

IDE :: WebBrowser Control - Navigate To Page That Uses Sessions

Apr 5, 2010

I'm using a webbrowser control in my program and I navigate to a page that uses sessions. I need to delete them somehow and I tried to close IE and enter it again and it worked, the sessions were deleted. But I've done it manually, and I need to do it through my program, so is there a way to imitate the closing and reopening of my webbrowser control?

View 3 Replies

Prevent Multiple Sessions Of A Program From Starting Up?

Nov 17, 2009

I have built and deployed an application in VB2008. If I start the program from the start menu a new session will start and there 'll be multiple sessions of the same programming running. I dont want this behaviour! I want the program to start only when no other session of the same program is running. How can I do that in VB2008?

View 9 Replies

Using Specific Sessions Calls In *.aspx Pages?

Apr 22, 2009

I am using specific sessions calls in my *.aspx pages and i have 2 questions related to this:

1-Is there a difference between using this type of session declaration in your aspx age?

HttpContext.Current.Session.Item("Whatever") VS Session("Whatever")Would this give the same information for a specific user?

2-Is using Session really User Specific data? I know you can share information using cache but is there possibilities that we have 2 different users (different browsers) that would share information threw sessions. Keep in mind that i am using SQLStateServer for my sessions

View 4 Replies

VS 2005 AxMSMAPI.AxMAPIMessages / Sessions Is Not Defined?

Nov 2, 2009

Some of you may remember threads I posted a couple of weeks ago about a VB.NET application I've built where I want to have a form open that allows the user to create and send emails. So the form works absolutely awesome on my PC. Day before I went off on vacation, I installed it on my co-worker's laptop and ... it didn't work. The utility starts, but the Email form doesn't work. In the Unhandled Exception error message, AxInterop.MSMAPI Assembly Version 1.1.0.0 is listed as installed; however, when I run the application through Visual Studio2005, I'm getting the two following messages:

Type 'AxMSMAPI.AxMAPIMessages' is not defined
Type 'AxMSMAPI.AxMAPISeession' is not defined

I've gone into the References but the MAPI Reference is not available (which is probably because the assembly is loaded).

View 4 Replies

WebBrowser Control - Navigate To Page That Uses Sessions?

Apr 5, 2010

I'm using a webbrowser control in my program and I navigate to a page that uses sessions. I need to delete them somehow and I tried to close IE and enter it again and it worked, the sessions were deleted. But I've done it manually, and I need to do it through my program, so is there a way to imitate the closing and reopening of my webbrowser control?

View 10 Replies

Ajax File Upload Unusual Behaviour When Using Sessions

Jan 30, 2011

I have just implemented an Ajax File Upload control that uses a progress bar. I am a little confused. When i use the control on pages that dont use sessions, the progress bar with no problems will show the user the actual progress of the file being uploaded from 0%,1%,2%,3%.......% to 100%. Now when i move this control onto a web page that uses a session, this session stores the user information such as screenname, email, etc... the file uploads with no problems but the problem is that the progress bar does allow the user to see the progress until the file is finised uploading and the progress bar jumps straight from 0% to 100% uploaded and doenst really show the full progress of the file whilst being uploaded.

Why is this behaviour occuring when i use sessions? where the progress of the file being uploaded isn't being shown to the user until the file uploads.

View 1 Replies

Modern Software Development = Series Missing Sessions 10-15

Jun 7, 2010

Links are broken for webcast series "Modern Software Development in Visual Basic .NET" for sessions 10-15 located at URL

[Code]...

View 2 Replies

User Login System Using SQL Express And Storing Sessions?

Aug 9, 2009

I am trying to create a system for users to login and have assigned roles ie user, manager, admin etc. but i cant seem to find a way to do it my code for login is below

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login_btn_OK.Click
Dim conn As New SqlClient.SqlConnection
Dim command As New SqlClient.SqlCommand

[code]....

Just after a way to recall user credentials to display appropriate content depending on their role?

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved