C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » VB.NET Syntax »

intellisense(Auto Completion) in Windows Application


Posted Date: 12 Oct 2009    Resource Type: Code Snippets    Category: VB.NET Syntax
Author: santoshMember Level: Silver    
Rating: 1 out of 5Points: 2 (Rs 2)



Like Web Application it you type a character then all the values will show down of the text box of that particular character.
here i am giving very good example to filter records in windows application.

page load you call the Intellisense method written below.


Imports System.Data

Imports System.Data.SqlClient

Private Sub Intellisense()

Dim con As New SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyPractice;Data Source=IT\SQLEXPRESS")

con.Open()

Dim dsUser As New DataSet

Dim daUser As New SqlDataAdapter

Dim com As New SqlCommand

com.Connection = con

com.CommandText = "SELECT * FROM tbUSERMST"

daUser.SelectCommand = com

daUser.Fill(dsUser)

Dim datacollection As New AutoCompleteStringCollection

For i As Integer = 0 To dsUser.Tables(0).Rows.Count - 1

datacollection.Add(dsUser.Tables(0).Rows(i).Item(1).ToString)

Next

txtUserName.AutoCompleteSource = AutoCompleteSource.CustomSource

txtUserName.AutoCompleteMode = AutoCompleteMode.Suggest

txtUserName.AutoCompleteCustomSource = datacollection

End Sub



Follow Below Two Link to See the OUTPUT.
http://3.bp.blogspot.com/_ypHh6DaBgH8/SsXBACxTKbI/AAAAAAAAAFU/7ARxSzaebGc/s1600-h/Intellisene.jpg
http://1.bp.blogspot.com/_ypHh6DaBgH8/SsXCRxwaRrI/AAAAAAAAAFc/5UrsyeLVKRU/s320/Intellisene1.jpg

For more details, visit http://santoshdotnetarena.blogspot.com/2009/10/in.html



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Intellisense  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Find Driver Details in VB.NET
Previous Resource: Download File using VB code
Return to Discussion Resource Index
Post New Resource
Category: VB.NET Syntax


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use