Click here to Skip to main content
15,889,034 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reading a Random Access file.. how to parse bytes? Pin
dazinith20-May-03 7:43
dazinith20-May-03 7:43 
GeneralRe: Reading a Random Access file.. how to parse bytes? Pin
dazinith20-May-03 8:26
dazinith20-May-03 8:26 
GeneralRe: Reading a Random Access file.. how to parse bytes? Pin
leppie20-May-03 11:37
leppie20-May-03 11:37 
GeneralRe: Reading a Random Access file.. how to parse bytes? Pin
firat kocak20-May-03 20:42
firat kocak20-May-03 20:42 
AnswerRe: Reading a Random Access file.. how to parse bytes? Pin
Nathan Blomquist21-May-03 1:47
Nathan Blomquist21-May-03 1:47 
GeneralAutocompletion in DropDown ComboBox Pin
Braulio Dez20-May-03 0:22
Braulio Dez20-May-03 0:22 
GeneralRe: Autocompletion in DropDown ComboBox Pin
dazinith20-May-03 5:17
dazinith20-May-03 5:17 
GeneralRe: Autocompletion in DropDown ComboBox Pin
Braulio Dez20-May-03 5:34
Braulio Dez20-May-03 5:34 
Hi,

I've found some interesting code snippet for that autocomplete, but I think it doesn't show the list meanwhile you are typing Frown | :-(

I found this code somewhere.

[code]
Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Me.ComboBox1.Text = ""
Me.ComboBox1.Items.Add("a")
Me.ComboBox1.Items.Add("aaa")
Me.ComboBox1.Items.Add("combo")
Me.ComboBox1.Items.Add("combobox")
Me.ComboBox1.Items.Add("combobox test")
Me.ComboBox1.Items.Add("common")
Me.ComboBox1.Items.Add("common dialog")
End Sub

Private Sub ComboBox1_KeyUp(ByVal sender As Object,
ByVal e As System.Windows.Forms.KeyEventArgs) Handles
ComboBox1.KeyUp
Dim index As Integer
Dim actual As String
Dim found As String

' Do nothing for some keys such as navigation keys.
If ((e.KeyCode = Keys.Back) Or _
(e.KeyCode = Keys.Left) Or _
(e.KeyCode = Keys.Right) Or _
(e.KeyCode = Keys.Up) Or _
(e.KeyCode = Keys.Delete) Or _
(e.KeyCode = Keys.Down) Or _
(e.KeyCode = Keys.PageUp) Or _
(e.KeyCode = Keys.PageDown) Or _
(e.KeyCode = Keys.Home) Or _
(e.KeyCode = Keys.End)) Then

Return
End If

' Store the actual text that has been typed.
actual = Me.ComboBox1.Text

' Find the first match for the typed value.s
index = Me.ComboBox1.FindString(actual)

' Get the text of the first match.
If (index > -1) Then
found = Me.ComboBox1.Items(index).ToString()

' Select this item from the list.
Me.ComboBox1.SelectedIndex = index

' Select the portion of the text that was
automatically
' added so that additional typing will replace
it.
Me.ComboBox1.SelectionStart = actual.Length
Me.ComboBox1.SelectionLength = found.Length
End If

End Sub
[/code]
GeneralRe: Autocompletion in DropDown ComboBox Pin
Braulio Dez20-May-03 5:44
Braulio Dez20-May-03 5:44 
GeneralRe: Autocompletion in DropDown ComboBox Pin
Richard Deeming21-May-03 8:20
mveRichard Deeming21-May-03 8:20 
GeneralRe: Pens & Brushes Pin
Jon Newman20-May-03 4:30
Jon Newman20-May-03 4:30 
GeneralRe: Pens & Brushes Pin
Jon Newman20-May-03 5:41
Jon Newman20-May-03 5:41 
GeneralRe: Pens & Brushes Pin
Arun Bhalla20-May-03 18:58
Arun Bhalla20-May-03 18:58 
GeneralRe: Pens & Brushes Pin
leppie20-May-03 8:08
leppie20-May-03 8:08 
GeneralRe: Pens & Brushes Pin
Marc Clifton21-May-03 4:10
mvaMarc Clifton21-May-03 4:10 
GeneralRe: Pens & Brushes Pin
leppie21-May-03 7:01
leppie21-May-03 7:01 
General[Question] about SNMP Manager Pin
yoonbs19-May-03 23:53
yoonbs19-May-03 23:53 
GeneralRe: [Question] about SNMP Manager Pin
firat kocak20-May-03 6:31
firat kocak20-May-03 6:31 
GeneralRe: [Question] about SNMP Manager Pin
yoonbs20-May-03 13:33
yoonbs20-May-03 13:33 
GeneralRe: [Question] about SNMP Manager Pin
firat kocak20-May-03 23:12
firat kocak20-May-03 23:12 
GeneralRe: [Question] about SNMP Manager Pin
yoonbs22-May-03 16:31
yoonbs22-May-03 16:31 
GeneralRe: [Question] about SNMP Manager Pin
firat kocak22-May-03 19:51
firat kocak22-May-03 19:51 
QuestionAutoUpdate package? Pin
Arun Bhalla19-May-03 20:07
Arun Bhalla19-May-03 20:07 
AnswerRe: AutoUpdate package? Pin
Bo Hunter20-May-03 2:20
Bo Hunter20-May-03 2:20 
GeneralRe: AutoUpdate package? Pin
Arun Bhalla20-May-03 9:04
Arun Bhalla20-May-03 9:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.