win32 API dll’lerinden biri olan user32.dll programlarımızın windows ile etkileşimli çalışabilmesinde en büyük rolleri üstlenmiştir | Klavye – mouse – ekran kartı eylemlerine direk ulaşabilen bu dll sayesinde bugun cok büyük dertlerden kurtuldum. remote control kadar becerikli bir program cıkıyordu ortaya nerdeyse (: açıkçası pek kaynak bulamadım user32.dll için. bu kategoride artık user32.dll içindeki fonksiyonları ve kullanım örneklerini yazacağım.

ilk önce user32.dll içindeki fonksiyonları listelemek istiyorum açıklamaları yazdıkça da linkleri düzenleyeceğim.

ActivateKeyboardLayout
AdjustWindowRect
AdjustWindowRectEx
AnyPopup
AppendMenu
ArrangeIconicWindows
AttachThreadInput
BeginDeferWindowPos
BeginPaint
BringWindowToTop
BroadcastSystemMessage
CallMsgFilter
CallNextHookEx
CallWindowProc
CascadeWindows
ChangeClipboardChain
ChangeDisplaySettings
ChangeMenu
CharLower
CharLowerBuff
CharNext
CharPrev
CharToOem
CharToOemBuff
CharUpper
CharUpperBuff
CheckDlgButton
CheckMenuItem
CheckMenuRadioItem
CheckRadioButton
ChildWindowFromPoint
ChildWindowFromPointEx
ClientToScreen
ClipCursor
CloseClipboard
CloseDesktop
CloseWindow
CloseWindowStation
CopyAcceleratorTable
CopyCursor
CopyIcon
CopyImage
CopyRect
CountClipboardFormats
CreateAcceleratorTable
CreateCaret
CreateCursor
CreateDesktop
CreateDialogIndirectParam
CreateDialogParam
CreateIcon
CreateIconFromResource
CreateIconIndirect
CreateMDIWindow
CreateMenu
CreatePopupMenu
CreateWindowEx
DdeAbandonTransaction
DdeAccessData
DdeAddData
DdeClientTransaction
DdeCmpStringHandles
DdeConnect
DdeConnectList
DdeCreateDataHandle
DdeCreateStringHandle
DdeDisconnect
DdeDisconnectList
DdeEnableCallback
DdeFreeDataHandle
DdeFreeStringHandle
DdeGetData
DdeGetLastError
DdeImpersonateClient
DdeInitialize
DdeKeepStringHandle
DdeNameService
DdePostAdvise
DdeQueryConvInfo
DdeQueryNextServer
DdeQueryString
DdeReconnect
DdeSetQualityOfService
DdeSetUserHandle
DdeUnaccessData
DdeUninitialize
DefDlgProc
DeferWindowPos
DefFrameProc
DefMDIChildProc
DefWindowProc
DeleteMenu
DestroyAcceleratorTable
DestroyCaret
DestroyCursor
DestroyIcon
DestroyMenu
DestroyWindow
DialogBoxIndirectParam
DispatchMessage
DragDetect
DragObject
DrawAnimatedRects
DrawCaption
DrawEdge
DrawFocusRect
DrawFrameControl
DrawIcon
DrawIconEx
DrawMenuBar
DrawState
DrawText
DrawTextEx
EmptyClipboard
EnableMenuItem
EnableScrollBar
EnableWindow
EndDeferWindowPos
EndDialog
EndPaint
EnumChildWindows
EnumClipboardFormats
EnumDesktops
EnumDesktopWindows
EnumDisplaySettings
EnumProps
EnumPropsEx
EnumThreadWindows
EnumWindows
EnumWindowStations
EqualRect
ExcludeUpdateRgn
ExitWindows
ExitWindowsEx
FillRect
FindWindow
FindWindowEx
FlashWindow
FrameRect
FreeDDElParam
GetActiveWindow
GetAsyncKeyState
GetCapture
GetCaretBlinkTime
GetCaretPos
GetClassInfo
GetClassInfoEx
GetClassLong
GetClassName
GetClassWord
GetClientRect
GetClipboardData
GetClipboardFormatName
GetClipboardOwner
GetClipboardViewer
GetClipCursor
GetCursor
GetCursorPos
GetDC
GetDCEx
GetDesktopWindow
GetDialogBaseUnits
GetDlgCtrlID
GetDlgItem
GetDlgItemInt
GetDlgItemText
GetDoubleClickTime
GetFocus
GetForegroundWindow
GetIconInfo
GetInputState
GetKBCodePage
GetKeyboardLayout
GetKeyboardLayoutList
GetKeyboardLayoutName
GetKeyboardState
GetKeyboardType
GetKeyNameText
GetKeyState
GetLastActivePopup
GetMenu
GetMenuCheckMarkDimensions
GetMenuContextHelpId
GetMenuDefaultItem
GetMenuItemCount
GetMenuItemID
GetMenuItemInfo
GetMenuItemRect
GetMenuState
GetMenuString
GetMessage
GetMessageExtraInfo
GetMessagePos
GetMessageTime
GetNextDlgGroupItem
GetNextDlgTabItem
GetNextWindow
GetOpenClipboardWindow
GetParent
GetPriorityClipboardFormat
GetProcessWindowStation
GetProp
GetQueueStatus
GetScrollInfo
GetScrollPos
GetScrollRange
GetSubMenu
GetSysColor
GetSysColorBrush
GetSystemMenu
GetSystemMetrics
GetTabbedTextExtent
GetThreadDesktop
GetTopWindow
GetUpdateRect
GetUpdateRgn
GetUserObjectInformation
GetUserObjectSecurity
GetWindow
GetWindowContextHelpId
GetWindowDC
GetWindowLong
GetWindowPlacement
GetWindowRect
GetWindowRgn
GetWindowText
GetWindowTextLength
GetWindowThreadProcessId
GetWindowWord
GrayString
HideCaret
HiliteMenuItem
ImpersonateDdeClientWindow
InflateRect
InSendMessage
InsertMenu
InsertMenuItem
IntersectRect
InvalidateRect
InvalidateRgn
InvertRect
IsCharAlpha
IsCharAlphaNumeric
IsCharLower
IsCharUpper
IsChild
IsClipboardFormatAvailable
IsDialogMessage
IsDlgButtonChecked
IsIconic
IsMenu
IsRectEmpty
IsWindow
IsWindowEnabled
IsWindowUnicode
IsWindowVisible
IsZoomed
keybd_event
KillTimer
LoadAccelerators
LoadBitmap
LoadCursor
LoadCursorFromFile
LoadIcon
LoadImage
LoadKeyboardLayout
LoadMenu
LoadMenuIndirect
LoadString
LockWindowUpdate
LockWorkStation
LookupIconIdFromDirectory
LookupIconIdFromDirectoryEx
MapDialogRect
MapVirtualKey
MapVirtualKeyEx
MapWindowPoints
Menu
MenuItemFromPoint
MessageBeep
MessageBox
MessageBoxEx
MessageBoxIndirect
ModifyMenu
mouse_event
MoveWindow
MsgWaitForMultipleObjects
OemKeyScan
OemToChar
OemToCharBuff
OffsetRect
OpenClipboard
OpenDesktop
OpenIcon
OpenInputDesktop
OpenWindowStation
PackDDElParam
PaintDesktop
PeekMessage
PostMessage
PostQuitMessage
PostThreadMessage
PtInRect
RedrawWindow
RegisterClass
RegisterClassEx
RegisterClipboardFormat
RegisterHotKey
RegisterWindowMessage
ReleaseCapture
ReleaseDC
RemoveMenu
RemoveProp
ReplyMessage
ReuseDDElParam
ScreenToClient
ScrollDC
ScrollWindow
ScrollWindowEx
SendDlgItemMessage
SendInput
SendMessage
SendMessageCallback
SendMessageTimeout
SendNotifyMessage
SetActiveWindow
SetCapture
SetCaretBlinkTime
SetCaretPos
SetClassLong
SetClassWord
SetClipboardData
SetClipboardViewer
SetCursor
SetCursorPos
SetDebugErrorLevel
SetDlgItemInt
SetDlgItemText
SetDoubleClickTime
SetFocus
SetForegroundWindow
SetKeyboardState
SetLastErrorEx
SetMenu
SetMenuContextHelpId
SetMenuDefaultItem
SetMenuItemBitmaps
SetMenuItemInfo
SetMessageExtraInfo
SetMessageQueue
SetParent
SetProcessWindowStation
SetProp
SetRect
SetRectEmpty
SetScrollInfo
SetScrollPos
SetScrollRange
SetSysColors
SetSystemCursor
SetThreadDesktop
SetTimer
SetUserObjectInformation
SetUserObjectSecurity
SetWindowContextHelpId
SetWindowLong
SetWindowPlacement
SetWindowPos
SetWindowRgn
SetWindowsHook
SetWindowsHookEx
SetWindowText
SetWindowWord
ShowCaret
ShowCursor
ShowOwnedPopups
ShowScrollBar
ShowWindow
ShowWindowAsync
SubtractRect
SwapMouseButton
SwitchDesktop
SystemParametersInfo
TabbedTextOut
TileWindows
ToAscii
ToAsciiEx
ToUnicode
TrackPopupMenu
TrackPopupMenuEx
tractRect
TranslateAccelerator
TranslateMDISysAccel
TranslateMessage
UnhookWindowsHook
UnhookWindowsHookEx
UnionRect
UnloadKeyboardLayout
UnpackDDElParam
UnregisterClass
UnregisterHotKey
UpdateWindow
ValidateRect
ValidateRgn
VkKeyScan
VkKeyScanEx
WaitForInputIdle
WaitMessage
WindowFromDC
WindowFromPoint
WinHelp

yeni başladığım bir projede düşündüğüm bi kaç yönetim metodu için ihtiyacım olan ekran goruntusu almayı Grapich sınıfı ile çözebildim. ekran görüntüsünü bitmap formatında veren fonksiyonu vermek istiyorum

0
1
2
3
4
5
6
7
        private Bitmap goruntuAl(int X, int Y, int Width, int Height)
        {
            Bitmap bmp = new Bitmap(Width, Height);
            Graphics grafik;
            grafik = Graphics.FromImage(bmp);
            grafik.CopyFromScreen(X, Y, 0, 0, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
            return bmp;
        }

C# ile yazdığım Regexper exemi daha önce regexp konusunu analtırken yayınlamıştm şimdi  biraz daha renklendirdim. katarlar seçilince eşlerini otomatik göstermek gibi özellikler ekledim. ekran görüntüsü :

Regular Expression

indirmek için : http://www.tufyta.com/wp-content/uploads/2009/12/Regexper.zip

C# da yine regexp konusunda en yetenekli dillerden birisi   elesmeler içinde gruplar olarak dönderebiliyor. php deki preg_match_all gibi çalışıyor.

C# da regex kullanabilmek için System.Text.RegularExpressions paketini import etmeliyiz.
using bloguna using System.Text.RegularExpressions; ekleyerek yapabiliriz bunu

0
1
2
// Regex Türünde bir pattern adında değişkenimiz ve eşleşenleri dolduracağımız bir MatchCollection var.
Regex pattern=new Regex('(tufyta)\.(com)');
MatchCollection:eslesenler;
0
1
// eslesenler değişkenimizi dolduralım
eslesenler=pattern.Matches("http://www.tufyta.com www.tufyta.com");
0
1
2
3
4
5
eslesenler.count        // Görüntüye uyan Katar sayısı
eslesenler[x]           // Eşlesen katarlardan bitanesi
eslesenler[x].Groups    // Katrı oluşturan gruplar (MatchCollection tipinde)
eslesenler[x].Groups[y] // Gruplardan birtanesi.
 
// katarları bir döngüye yine içindeki grupları ayrı bi döngüye alıp istediğimiz yere bunları yazdırabilirz;

Örnek C# Uygulaması :
Regexper idirmek için tıklayın  

© 2012 Tufan Suffusion theme by Sayontan Sinha