When Windows Scroll event is triggered

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Amir Ali

    When Windows Scroll event is triggered

    Dear All,
    How can I come to know that Form's scroll' position is changed
    (eigther by code or user interaction).

    Amir Ali.


    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    Best Usenet Service Providers 2025 ranked by Newsgroup Access Newsservers, Usenet Search, Features & Free Trial. Add VPN for privacy.

  • Herfried K. Wagner [MVP]

    #2
    Re: When Windows Scroll event is triggered

    * amirali000@hotm ail-dot-com.no-spam.invalid (Amir Ali) scripsit:[color=blue]
    > How can I come to know that Form's scroll' position is changed
    > (eigther by code or user interaction).[/color]

    <URL:http://www.google.de/groups?selm=%23 abc%23jnEEHA.19 88%40TK2MSFTNGP 10.phx.gbl>

    --
    Herfried K. Wagner [MVP]
    <URL:http://dotnet.mvps.org/>

    Comment

    • Ken Tucker [MVP]

      #3
      Re: When Windows Scroll event is triggered

      Hi,

      Override the forms wndproc. You will recieve the wm_hscroll and
      wm_vscroll messages.

      Private Const WM_VSCROLL As Integer = &H115
      Private Const WM_HSCROLL As Integer = &H114
      Protected Overrides Sub WndProc(ByRef m As Message)
      ' Listen for operating system messages

      If m.Msg = WM_VSCROLL Then
      ' Vertical scroll
      ElseIf m.Msg = WM_HSCROLL Then
      ' Horizontal scroll
      End If

      MyBase.WndProc( m)
      End Sub

      Ken
      ---------------
      "Amir Ali" <amirali000@hot mail-dot-com.no-spam.invalid> wrote in message
      news:40b2000f$1 _2@Usenet.com.. .[color=blue]
      > Dear All,
      > How can I come to know that Form's scroll' position is changed
      > (eigther by code or user interaction).
      >
      > Amir Ali.
      >
      >
      > Posted Via Usenet.com Premium Usenet Newsgroup Services
      > ----------------------------------------------------------
      > ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
      > ----------------------------------------------------------
      > http://www.usenet.com[/color]


      Comment

      • Amir Ali

        #4
        Stoping form from being scrolled

        Thanks Ken, the code you provided works.

        Now, will you guide me how I can handle form's scroll.

        Means, sometimes ( not always) I want to stop scrolling.

        Is it possible.

        A lot of thanks.

        Amir Ali.


        Posted Via Usenet.com Premium Usenet Newsgroup Services
        ----------------------------------------------------------
        ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
        ----------------------------------------------------------
        Best Usenet Service Providers 2025 ranked by Newsgroup Access Newsservers, Usenet Search, Features & Free Trial. Add VPN for privacy.

        Comment

        • Ken Tucker [MVP]

          #5
          Re: Stoping form from being scrolled

          Hi,

          Just suppress the wm_hscroll or wm_vscroll message by not calling
          mybase.wndproc( m) when you want to stop scrolling.

          Ken
          --------------
          "Amir Ali" <amirali000@hot mail-dot-com.no-spam.invalid> wrote in message
          news:40b43725$1 _2@Usenet.com.. .[color=blue]
          > Thanks Ken, the code you provided works.
          >
          > Now, will you guide me how I can handle form's scroll.
          >
          > Means, sometimes ( not always) I want to stop scrolling.
          >
          > Is it possible.
          >
          > A lot of thanks.
          >
          > Amir Ali.
          >
          >
          > Posted Via Usenet.com Premium Usenet Newsgroup Services
          > ----------------------------------------------------------
          > ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
          > ----------------------------------------------------------
          > http://www.usenet.com[/color]


          Comment

          • Amir Ali

            #6
            Re: Stoping form from being scrolled

            Dear Ken,
            Thanks again for your continuous response. I am just one step
            away from my solution. Please guide me to that destination.

            Now, I just want to know message number (like &h15) of

            (1) when scroll position is changed automatically (without user
            interaction with scroll).
            OR

            (2) Message number of event when some controls location is changed.

            With a lot of thanks. and waiting for response,
            Amir Ali.


            Posted Via Usenet.com Premium Usenet Newsgroup Services
            ----------------------------------------------------------
            ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
            ----------------------------------------------------------
            Best Usenet Service Providers 2025 ranked by Newsgroup Access Newsservers, Usenet Search, Features & Free Trial. Add VPN for privacy.

            Comment

            Working...