التنبيهات التالية ظهرت :
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 864 errorHandler->error



تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] RegisterHotKey With Notepad
#1
هل يمكن تشغيل RegisterHotKey مع Notepad بعنه عند الكتابة فى Notepad و تم الضغط على مفتاح معين يظهر رسلة ان تم الضغط على هذا الزر
هذا هو الكود الذى استخدمة 
كود :
   Public Shared MOD_SHIFT As Integer = &H4
   Public Const WM_HOTKEY As Integer = &H312
   Public Declare Function RegisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer, ByVal fsModifiers As Integer, ByVal vk As Integer) As Integer
   Public Declare Function UnregisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer) As Integer
   Dim Handlex As IntPtr = Process.GetProcessById(3736).MainWindowHandle
   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       Call RegisterHotKey(Handlex.ToInt32(), 9, 0, MOD_SHIFT)
   End Sub

   Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
       If m.Msg = WM_HOTKEY Then
           MessageBox.Show("Key are pressed.")
           Me.Show()
       End If
       MyBase.WndProc(m)
   End Sub

   Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
       Call UnregisterHotKey(Handlex.ToInt32(), 9)
   End Sub
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RegisterHotKey With Notepad - بواسطة أسامة - 24-12-15, 01:04 AM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  When opening a file in Notepad Basil Abdallah 0 673 23-09-21, 04:09 AM
آخر رد: Basil Abdallah
  [كود] مطلوب كود يقوم بحفظ محتوى textbox فى ملف notepad elgokr 7 4,557 13-09-18, 06:27 PM
آخر رد: YousefOkasha
  الكتابة فى notepad مبتدئ 1 1,443 30-06-13, 08:16 AM
آخر رد: SaLoOoMX

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم