Click here to Skip to main content
16,007,126 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to get the diffrence in time. VB.net #8 Pin
Lyndon Schroeder23-Apr-09 9:49
Lyndon Schroeder23-Apr-09 9:49 
AnswerRe: How to get the diffrence in time. VB.net #8 *** Thanks for all your help *** Pin
ormonds23-Apr-09 12:31
ormonds23-Apr-09 12:31 
Questioncombobox last item to first item Pin
johnny196322-Apr-09 1:53
johnny196322-Apr-09 1:53 
AnswerRe: combobox last item to first item Pin
Jay Royall22-Apr-09 2:31
Jay Royall22-Apr-09 2:31 
GeneralRe: combobox last item to first item Pin
johnny196322-Apr-09 4:50
johnny196322-Apr-09 4:50 
GeneralRe: combobox last item to first item Pin
Jay Royall22-Apr-09 5:06
Jay Royall22-Apr-09 5:06 
GeneralRe: combobox last item to first item Pin
johnny196322-Apr-09 5:55
johnny196322-Apr-09 5:55 
GeneralRe: combobox last item to first item [modified] Pin
Jay Royall22-Apr-09 6:21
Jay Royall22-Apr-09 6:21 
Ah, I have just tested and found that after the selected index of the combo box is set, the mouse wheel movement is actioned. That is, if you scroll downwards, then after setting the combobox to index 0, the scroll down is done (but if you scroll upwards then it is fine).

The only way I can think of around this (which isn't very pretty) is to add and event handler after setting the index of the combo box. Something like:
Private Sub ComboBox1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ComboBox1.MouseWheel
    If ComboBox1.selectedindex = 19 then
       AddHandler ComboBox1.SelectedIndexChanged, AddressOf SetIndex
    End If
End Sub

Private Sub SetIndex(ByVal sender As Object, ByVal e As System.EventArgs)
    ComboBox1.SelectedIndex = 0
    RemoveHandler ComboBox1.SelectedIndexChanged, AddressOf test
End Sub

Like I said, not a pretty solution so maybe someone else has other ideas?

modified on Wednesday, April 22, 2009 1:47 PM

GeneralRe: combobox last item to first item Pin
johnny196322-Apr-09 10:16
johnny196322-Apr-09 10:16 
GeneralRe: combobox last item to first item Pin
johnny196322-Apr-09 10:32
johnny196322-Apr-09 10:32 
GeneralRe: combobox last item to first item [modified] Pin
Johan Hakkesteegt22-Apr-09 21:01
Johan Hakkesteegt22-Apr-09 21:01 
GeneralRe: combobox last item to first item Pin
johnny196322-Apr-09 21:37
johnny196322-Apr-09 21:37 
GeneralRe: combobox last item to first item Pin
Johan Hakkesteegt22-Apr-09 21:39
Johan Hakkesteegt22-Apr-09 21:39 
GeneralRe: combobox last item to first item Pin
johnny196322-Apr-09 23:32
johnny196322-Apr-09 23:32 
AnswerRe: combobox last item to first item [modified] Pin
Alan N22-Apr-09 12:18
Alan N22-Apr-09 12:18 
GeneralRe: combobox last item to first item Pin
johnny196322-Apr-09 20:15
johnny196322-Apr-09 20:15 
GeneralRe: combobox last item to first item Pin
Alan N22-Apr-09 22:50
Alan N22-Apr-09 22:50 
GeneralRe: combobox last item to first item Pin
johnny196322-Apr-09 23:36
johnny196322-Apr-09 23:36 
QuestionMacro for retrieving word template password Pin
Jaison Peter22-Apr-09 1:05
Jaison Peter22-Apr-09 1:05 
AnswerRe: Macro for retrieving word template password Pin
Dave Kreskowiak22-Apr-09 1:54
mveDave Kreskowiak22-Apr-09 1:54 
GeneralRe: Macro for retrieving word template password Pin
Jaison Peter22-Apr-09 3:19
Jaison Peter22-Apr-09 3:19 
GeneralRe: Macro for retrieving word template password Pin
Eddy Vluggen22-Apr-09 4:11
professionalEddy Vluggen22-Apr-09 4:11 
GeneralRe: Macro for retrieving word template password Pin
Jaison Peter22-Apr-09 4:38
Jaison Peter22-Apr-09 4:38 
GeneralRe: Macro for retrieving word template password Pin
Eddy Vluggen22-Apr-09 4:52
professionalEddy Vluggen22-Apr-09 4:52 
GeneralRe: Macro for retrieving word template password Pin
Jaison Peter22-Apr-09 5:03
Jaison Peter22-Apr-09 5:03 

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.