السلام عليكم
كيف حالكم جميعاااا؟؟؟؟
بصراحة مش عرفة فين احط موضوعي بالضبط هنا او في قسم الـ c#
لكن اعتقد هيا لن تفرق هنا او هناك حسب ما رأيت أخيرا .
المهم في الامر اخوتي انه عندي كود مكتوب بلغة الفيجول بيسك ونريد تحويله الى الفيجوال سي شارب
فأرجو مساعدتي لأني محتاجة جدا لهذا الكود وجزاكم الله كل خير .
Imports System.Runtime.InteropServices
Imports Microsoft.Win32
<ComClass(Taskbar.ClassId, Taskbar.InterfaceId, Taskbar.EventsId)> _
Public Class Taskbar
#Region "COM GUIDs"
' These GUIDs provide the COM identity for this class
' and its COM interfaces. If you change them, existing
' clients will no longer be able to access the class.
Public Const ClassId As String = "b08A1707-A153-4D8D-8157-2F95C72034F3"
Public Const InterfaceId As String = "b37950D2-92C6-4DF4-8D67-43C190971843"
Public Const EventsId As String = "b2352A08-DED1-4DA1-866F-5038344F1BD3"
#End Region
Private Const WM_COMMAND As Long = &H111
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function PostMessage( _
ByVal hWnd As IntPtr, _
ByVal Msg As UInteger, _
ByVal wParam As IntPtr, _
ByVal lParam As IntPtr) As Boolean
End Function
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function FindWindow( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As IntPtr
End Function
Public WriteOnly Property LockTaskBar() As Long
Set(ByVal value As Long)
Dim result As Long
result = PostMessage(FindWindow("Shell_TrayWnd", vbNullString), WM_COMMAND, 424, value)
End Set
End Property
End Class
