اسکرول بار

Collapse
X
 
  • زمان
  • نمایش
حذف همه
new posts
  • میثم مقدم نیا

    • 2017/03/23
    • 558
    • 41.00

    پرسش اسکرول بار

    سلام خدمت اساتید عزیز
    من در فایل پیوست با یک مشکل مواجه شدم که هربار فایلم را اجرا میکنم با پیغام خطا در خط فرمان زیر روبرو میشم

    کد PHP:
    Sub HookListBoxScroll(frm As Objectctl As MSForms.Control)
    Dim lngAppInst As Long
    Dim hwndUnderCursor 
    As Long
    Dim tPT 
    As POINTAPI
         GetCursorPos tPT
         hwndUnderCursor 
    WindowFromPoint(tPT.XtPT.Y)
         If 
    Not frm.ActiveControl Is ctl Then
                 ctl
    .SetFocus
         End 
    If
         If 
    mListBoxHwnd <> hwndUnderCursor Then
                 UnhookListBoxScroll
                 Set mCtl 
    ctl
                 mListBoxHwnd 
    hwndUnderCursor
                 lngAppInst 
    GetWindowLong(mListBoxHwndGWL_HINSTANCE)
                            If 
    Not mbHook Then
                         mLngMouseHook 
    SetWindowsHookEx_
                                                         WH_MOUSE_LL
    AddressOf MouseProclngAppInst0)
                         
    mbHook mLngMouseHook <> 0
                 End 
    If
         
    End If
    End Sub 
    Click image for larger version

Name:	tled.png
Views:	1
Size:	18.7 کیلو بایت
ID:	148011
    لطفا راهنماییم کنید
    فایل های پیوست شده
    [HR][SIZE=5][COLOR="#0000FF"][FONT=Times New Roman][B] در سرزمینی کہ نتوان مردانہ زیست ، مردانہ مردن بهتر از این زندگیست [/B][/FONT][/COLOR][/SIZE][/HR]
  • ali.b

    • 2014/01/12
    • 798

    #2
    نوشته اصلی توسط mmn1000
    سلام خدمت اساتید عزیز
    من در فایل پیوست با یک مشکل مواجه شدم که هربار فایلم را اجرا میکنم با پیغام خطا در خط فرمان زیر روبرو میشم

    کد PHP:
    Sub HookListBoxScroll(frm As Objectctl As MSForms.Control)
    Dim lngAppInst As Long
    Dim hwndUnderCursor 
    As Long
    Dim tPT 
    As POINTAPI
         GetCursorPos tPT
         hwndUnderCursor 
    WindowFromPoint(tPT.XtPT.Y)
         If 
    Not frm.ActiveControl Is ctl Then
                 ctl
    .SetFocus
         End 
    If
         If 
    mListBoxHwnd <> hwndUnderCursor Then
                 UnhookListBoxScroll
                 Set mCtl 
    ctl
                 mListBoxHwnd 
    hwndUnderCursor
                 lngAppInst 
    GetWindowLong(mListBoxHwndGWL_HINSTANCE)
                            If 
    Not mbHook Then
                         mLngMouseHook 
    SetWindowsHookEx_
                                                         WH_MOUSE_LL
    AddressOf MouseProclngAppInst0)
                         
    mbHook mLngMouseHook <> 0
                 End 
    If
         
    End If
    End Sub 
    [ATTACH=CONFIG]19946[/ATTACH]
    لطفا راهنماییم کنید
    سلام زیر این کد اضافه کن ببین درست میشه
    کد:
    [COLOR=#0000BB][FONT=monospace]Sub HookListBoxScroll[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]frm [/FONT][/COLOR][COLOR=#007700][FONT=monospace]As [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]Object[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]ctl [/FONT][/COLOR][COLOR=#007700][FONT=monospace]As [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]MSForms[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]Control[/FONT][/COLOR][COLOR=#007700][FONT=monospace])[/FONT][/COLOR]
    من با اینکد کار کردم تو بعضی از سیستم ها این ارور رو میداد
    کد:
    on error resume next
    [CENTER]
    [/CENTER]

    کامنت

    • میثم مقدم نیا

      • 2017/03/23
      • 558
      • 41.00

      #3
      نوشته اصلی توسط ali.b
      سلام زیر این کد اضافه کن ببین درست میشه
      کد:
      [COLOR=#0000BB][FONT=monospace]Sub HookListBoxScroll[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]frm [/FONT][/COLOR][COLOR=#007700][FONT=monospace]As [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]Object[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]ctl [/FONT][/COLOR][COLOR=#007700][FONT=monospace]As [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]MSForms[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]Control[/FONT][/COLOR][COLOR=#007700][FONT=monospace])[/FONT][/COLOR]
      من با اینکد کار کردم تو بعضی از سیستم ها این ارور رو میداد
      کد:
      on error resume next
      ممنون ولی جواب نداد
      [HR][SIZE=5][COLOR="#0000FF"][FONT=Times New Roman][B] در سرزمینی کہ نتوان مردانہ زیست ، مردانہ مردن بهتر از این زندگیست [/B][/FONT][/COLOR][/SIZE][/HR]

      کامنت

      • میثم مقدم نیا

        • 2017/03/23
        • 558
        • 41.00

        #4
        سلام مجدد
        اساتید عزیز کسی نبود کمکی برسونه
        [HR][SIZE=5][COLOR="#0000FF"][FONT=Times New Roman][B] در سرزمینی کہ نتوان مردانہ زیست ، مردانہ مردن بهتر از این زندگیست [/B][/FONT][/COLOR][/SIZE][/HR]

        کامنت

        • Amir Ghasemiyan

          • 2013/09/20
          • 4598
          • 100.00

          #5
          سلام دوست عزيز
          كاربرد اين كد چيه؟ چكار ميكنه؟

          من كه فرم رو اجرا كردم بدون مشكل ران شد و هيچ خطايي نداد. هيچ اتفاق خاصي هم نيفتاد

          کامنت

          • میثم مقدم نیا

            • 2017/03/23
            • 558
            • 41.00

            #6
            نوشته اصلی توسط Amir Ghasemiyan
            سلام دوست عزيز
            كاربرد اين كد چيه؟ چكار ميكنه؟

            من كه فرم رو اجرا كردم بدون مشكل ران شد و هيچ خطايي نداد. هيچ اتفاق خاصي هم نيفتاد
            سلام
            کارای این کد اینکه میتونید اسکرول بار داخل فرم را با قلتک موس بالا و پایین میکنیم
            [HR][SIZE=5][COLOR="#0000FF"][FONT=Times New Roman][B] در سرزمینی کہ نتوان مردانہ زیست ، مردانہ مردن بهتر از این زندگیست [/B][/FONT][/COLOR][/SIZE][/HR]

            کامنت

            چند لحظه..