Click here to Skip to main content
15,891,033 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
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 
I figured out a solution:

dim i as integer

Private Sub ComboBox1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ComboBox1.MouseWheel
        Try
            If ComboBox1.SelectedIndex = ComboBox1.Items.Count - 1 And e.Delta = -120 Then
                i = ComboBox1.SelectedIndex
                ComboBox1.SelectedIndex = 0
            Else
                Me.OnMouseWheel(e)
            End If
        Catch ex As Exception
            ComboBox1.SelectedIndex = 0
        End Try

    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If i = ComboBox1.Items.Count - 1 And ComboBox1.SelectedIndex = 1 Then
            ComboBox1.SelectedIndex = 0
            i = 0
        End If
    End Sub


It's funny though, how that mouse wheel event only lets you perform actions in between turns (so to speak).

My advice is free, and you may get what you paid for.

modified on Thursday, April 23, 2009 3:22 AM

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 
GeneralRe: Macro for retrieving word template password Pin
Jaison Peter22-Apr-09 5:05
Jaison Peter22-Apr-09 5:05 
GeneralRe: Macro for retrieving word template password Pin
Eddy Vluggen22-Apr-09 6:21
professionalEddy Vluggen22-Apr-09 6:21 
Questioncall a procedure in a textbox Pin
Qendro21-Apr-09 23:40
Qendro21-Apr-09 23:40 

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.