Results 1 to 12 of 12

Thread: Favorite API Calls

  1. #1

    Thread Starter
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    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!!!
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  2. #2
    Guest
    This is probably the most used Api by everyone. I sure like it. It gets me through life .

    Code:
    Declare Function FindWindow Lib "user32" Alias _
    "FindWindowA" (ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Long
    And I like the showWindow as well for hiding or showing things.

    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

  3. #3
    Guest
    The most useful would probably be CreateWindowEx. Without this, you cannot create any objects.

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    My favourite is gluNurbsSurface, for creating lovely wibbly 3D surfaces with ease.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    I know, without FindWindow(Ex), this would be nothing, but has anybody seen these?
    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
    Great for making two-paned MDI forms and stuff.

  6. #6
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    My favourite:

    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
    It makes stuff look really professional and snazzy.
    Courgettes.

  7. #7
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    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)
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  8. #8

    Thread Starter
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    (I Love Graphics)
    Shows by your signature!!!
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  9. #9
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    You misquoted me! I said:

    (I love graphics), and
    (I Love Graphics)

    is what you quoted me on!

    I don't really care, though.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Does anyone?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Angry

    I do.
    Courgettes.

  12. #12
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Am new to api

    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.





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width