I've been looking back at code snippits to do funny tricks to users, like changing the Current Windows Title bar to a joke, etc. Lets list our favorites here. Maybe we will all learn some new ones!!!
Printable View
I've been looking back at code snippits to do funny tricks to users, like changing the Current Windows Title bar to a joke, etc. Lets list our favorites here. Maybe we will all learn some new ones!!!
This is probably the most used Api by everyone. I sure like it. It gets me through life :).
And I like the showWindow as well for hiding or showing things.Code:Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Code:Declare Function ShowWindow Lib "User32" (ByVal Hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0
'Private Const SW_NORMAL = 1
Private Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOW = 5
Private Const SW_MINIMIZE = 6
Private Const SW_MAXIMIZE = 3
Private Const SW_SHOWMINNOACTIVE = 7
Private Const SW_SHOWNA = 8
Private Const SW_RESTORE = 9
Private Const SW_SHOWDEFAULT = 10
The most useful would probably be CreateWindowEx. Without this, you cannot create any objects.
My favourite is gluNurbsSurface, for creating lovely wibbly 3D surfaces with ease.
I know, without FindWindow(Ex), this would be nothing, but has anybody seen these?Great for making two-paned MDI forms and stuff.Code:Declare Function GetParent Lib "user32" (ByVal hWnd As Long) As Long
Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
My favourite:
It makes stuff look really professional and snazzy.Code:Public Declare Function DrawEdge Lib "user32" Alias "DrawEdge" _
(ByVal hdc As Long, qrc As RECT, ByVal edge As Long, ByVal grfFlags As Long) As Long
My favourites used to be StretcbBlt, PlgBlt and BitBlt, but now it's pretty safe to say that my favourite and most often used is SendMessage and PostMessage. I also like SelectObject, DestroyObject, and CreateSolidBrush.
(I love graphics)
Shows by your signature!!!Quote:
(I Love Graphics)
You misquoted me! I said:
(I love graphics), and
(I Love Graphics)
is what you quoted me on!
I don't really care, though. :)
Does anyone? :rolleyes:
I do.
But the one api that i find very useful and interesting is the "Sendmessage" ,"Findwindow" , "CloseWindow"
Even though i barely know how to use them ..the times i have used em have been cool.
I made a app that uses the findwindow and destroy window for ICQ for a friend of mine for him to use on his online girlfriend...haha and it worked great..everytime she tryed to start ICQ CloseWindow would stop it.
But stupid me..i didnt bother too copy the code down cause i thought "Ill figure it out" ..heh Now i cant, damn..lol
Dont you just hate it when that happens?
And i started to make a app that closes those stupid AOL advertising windows (grrrrrr) But i just cant get it right now..i am just gonna take a break and figure it out later i hope.