Page 1 of 2 12 LastLast
Results 1 to 40 of 54

Thread: Survey

  1. #1
    Guest

    Talking

    What is the longest variable name you ever used?
    And what's the largest amount of APIs you ever used in a project?

    My largest API count is about 20.
    I used strSubjectOfNewUserMessage as a var.

  2. #2
    Guest
    I try to keep my variables short and descriptive, however believe I went as far as 15-20 in some Apps.

    Regarding API's, I've developed Apps using pure API but I can't really remember how much. I will try to find the project and get back to you soon.

  3. #3
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    I don't count the number of characters in my variables
    Largest name of API function ever used: GetWindowThreadProcessID

    Largest API count: Who knows. Too much to count!
    (Was a hell of a program, too! Moral: Use API excessively, quickly and rapidly)
    Must have been about 300 declares, about 20 types and many many constants.

  4. #4
    Lively Member
    Join Date
    Jan 2000
    Posts
    95
    Long time no see Yonaton!!

  5. #5
    Guest
    I have used about 60 API declares in one program.
    and I had about 30 constants,
    and about 5 types...
    it was on my HDD before I reformatted, it was used to manipulate windows and stuff....

    Yonaton, what kind of program did you make that had that many declares and stuff

  6. #6
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    It was something that had an RTF box and two ListViews.
    All three were created by pure API (CreateWindowEx).
    Also, all the menus were API-created and owner drawn.
    No OCX controls were included.
    Nuff said?

  7. #7
    Guest
    not really

    I know that takes alot of code, but 300 declares? for 3 controls??
    BTW if you could send me the project, or any documentation you have on creating controls from scratch, I would appreciate that...
    because I am learning C++ and if you dont want to use MFC you kinda have to use API...
    thanks!

    Dennis

  8. #8
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    No, you can't have the source, I lost the source code in a recent nuclear war.

    Actually I don't have the source code anymore for a different reason: I sold it and its copyrights for Microsoft for $2 million. Umm, actually it didn't have any copyrights, but I did sell it to Microsoft for $2 million. Well, I didn't sell it per se, but they really begged me to sell it to them for $2 million. Hmm, they didn't really want to give me money, but they really begged me for the program. Come to think of it, they didn't beg in actuality, they just asked for it several times. Oh, now I that remember more clearly, they sent only one E-Mail. Well, basically, they didn't send it, but they put it in their "Send Later" list and forgot. Actually, they didn't write it, but they put my E-Mail in their address book and decided to think about it. Well, perhaps you wouldn't count it, because it was not a computerized address book, it was a "real" address book with pages and all. Umm, actually it wasn't even an address book, it was just a note on Bill Gates' desk. Actually it wasn't on Bill Gates' desk per se, it was on one of his assistants' desk. Hmm, the assistant didn't intend to E-Mail me in actuality, he just had my address because he is my mother's second-cousin's husband.

    OK actually you can't have the code because I don't have it anymore. It was because my friend was doing a project, so he sent me and asked me to help him make the ListViews, RTF box and menus API-created and also to make the menus owner-drawn. I sent him the tweaked version (tweaked from 30-40 APIs straight to about 300) and then I didn't need it anymore so I just sort of deleted it.

    If you've never done that sort of thing and actually want to, look out. It's highly explosive (crashes) while the code-building is in progress. (Ever tried subclassing a form and clicking the End button on the IDE? Not fun.)

    P.S.
    Yes, my mom's second-cousin's husband's boss is Bill Gates.
    Wow, I'm special, NOT!
    That sounds like something from the movie Spaceballs, doesn't it?

  9. #9
    Guest
    Actually I don't have the source code anymore for a different reason: I sold it and its copyrights for Microsoft for $2 million. Umm, actually it didn't have any copyrights, but I did sell it to Microsoft for $2 million. Well, I didn't sell it per se, but they really begged me to sell it to them for $2 million. Hmm, they didn't really want to give me money, but they really begged me for the program. Come to think of it, they didn't beg in actuality, they just asked for it several times. Oh, now I that remember more clearly, they sent only one E-Mail. Well, basically, they didn't send it, but they put it in their "Send Later" list and forgot. Actually, they didn't write it, but they put my E-Mail in their address book and decided to think about it. Well, perhaps you wouldn't count it, because it was not a computerized address book, it was a "real" address book with pages and all. Umm, actually it wasn't even an address book, it was just a note on Bill Gates' desk. Actually it wasn't on Bill Gates' desk per se, it was on one of his assistants' desk. Hmm, the assistant didn't intend to E-Mail me in actuality, he just had my address because he is my mother's second-cousin's husband.
    LOL

    beleive me I know about crashes when you are subclassing,
    I still suck at it, but when I was just starting out, it took me about 3 crashes before I figured out I had to hit the X in the top right corner of the form....



  10. #10
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I have all declares in the whole Win32API.txt+some others i have in a project, and the only thing it does is nothing, but i guess that's how far you can get with api's
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  11. #11
    Guest
    Dennis, you can create windows from scratch using CreateWindowEx
    Code:
    Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle _
    As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle _
    As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight _
    As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Const WS_CHILD = &H40000000
    
    Private Sub Form_Load()
        retval = CreateWindowEx(0&, "Button", "Button1", WS_CHILD, 32, 32, 64, 64, Me.hwnd, 0, App.hInstance, ByVal 0&)
        ShowWindow retval, 1
    End Sub

  12. #12
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    I've used 34 API Declares, 10 API Types and 39 API Consts in my project which creates its own (Tahoma) toolbar, which (like MS apps) an edge is drawn aroung the caption when the mouse goes over it, and if it is clicked, it shows an owner-drawn menu. It's my most advanced project to date. (Just to tell you how bad I am )

    I love owner-drawing 'stuff'. It makes you feel in control.

    Members of VB-World: Not this crap again?
    Courgettes.

  13. #13
    Guest
    For some reason the class of VB buttons is not "Button".

  14. #14
    Guest
    Button is the standard Windows (C++) ClassName for a Button. In VB, the classname is ThunderCommandbutton.

  15. #15
    Guest
    I am no expert at this, but wouldnt you have to subclass so you could add a click event etc to it?

  16. #16
    Guest
    Yes, here's an example. Put he following in a Module
    Code:
    Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
    Declare Function SetWindowLong& Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long)
    Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    Const GWL_WNDPROC = (-4)
    Const WM_COMMAND = &H111
    Public RETVAL As Long
    Global WndProcOld As Long
    
    Public Function WindProc(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    
        If wMsg = WM_COMMAND Then
            If lParam = RETVAL Then
                MsgBox ("You clicked the Button")
            End If
        End If
        
        WindProc = CallWindowProc(WndProcOld&, hwnd&, wMsg&, wParam&, lParam&)
        
    End Function
    
    Sub SubClassWnd(hwnd As Long)
        WndProcOld& = SetWindowLong(hwnd, GWL_WNDPROC, AddressOf WindProc)
    End Sub
    
    Sub UnSubclassWnd(hwnd As Long)
        SetWindowLong hwnd, GWL_WNDPROC, WndProcOld&
        WndProcOld& = 0
    End Sub
    Put this in a Form
    Code:
    Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle _
    As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle _
    As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight _
    As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Const WS_CHILD = &H40000000
    
    Private Sub Form_Load()
        RETVAL = CreateWindowEx(0&, "Button", "Button1", WS_CHILD, 32, 32, 64, 64, Me.hwnd, 0, App.hInstance, ByVal 0&)
        ShowWindow RETVAL, 1
        SubClassWnd Me.hwnd
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
        UnSubclassWnd Me.hwnd
    End Sub

  17. #17
    New Member
    Join Date
    Aug 2000
    Posts
    12

    variable

    I've not actually programmed this one myself, but I have run acrossa source using a varaible called:
    L_nobntrazndrknkrdbepbkn

  18. #18
    Guest
    Hehehehe...
    Code:
    Const THAT_NUMBER_THAT_GETS_USED_ALL_THE_TIME_IN_MATHEMATICS_AND_PHYSICS_BUT_I_CANT_REMEMBER_ITS_NAME = 3.1415927

  19. #19
    Guest
    I cant tell if your kidding or not, but its called Pi

  20. #20
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    Code:
     Const THE_PERSON_WHO_SEES_SOMEONE_POST_A_JOKE_WHICH_WAS_REALLY_FUNNY_BY_THE_WAY_YOU_CAN_TELL_BECAUSE_IM_COPYING_IT_SLIGHTLY_AND_MAKING_MY_OWN_JOKE_OUT_OF_IT_YOU_CANT_PUT_PUNCTUATION_IN_VARIABLE_NAMES_ANYWAY_THIS_CONSTANT_IS_THE_NAME_OF_THE_PERSON_WHO_SEES_SOMEONE_POST_A_JOKE_AND_DOESNT_REALISE_THAT_ITS_A_JOKE_SO_POSTS_THE_ANSWER_TO_THE_QUESTION_THAT_WAS_IMPLIED_IN_THE_JOKE_BUT_DIDNT_NEED_AN_ANSWER_MY_SHIF_HOLDING_DOWN_FINGER_IS_TIRED_NOW_SO_ILL_JUST_GIVE_YOU_THE_PERSONS_NAME_AND_STOP_TYPING As String = "denniswrenn"


  21. #21
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    Sam Finch: Your code doesn't work.
    I got a compiler error, "Identifier too long." (What a surprise!)

  22. #22
    Guest
    I was pretty sure it was a joke..... I just didnt know

    Code:
    Const SAMANTHA_FINCH_SHOULD_NOT_HAVE_USED_HER_SHIFT_KEY_TO_MAKE_A_VARIABLE_NAME_THAT_IS_OBVIOUSLY_ALL_CAPS_SHE_SHOULD_HAVE_USED_CAPS_LOCK_BUT_THATS_OK_BECAUSE_SHE_IS_PROBABLY_TOO_DRUNK_TOO_UNDERSTAND_ME_ANYWAY = "HEHEHEHEHE"

  23. #23
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    This must be officially the widest thread ever!

    BTW: I don't use Declares.....I use a Type Library.
    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

  24. #24
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    denniswrenn

    Code:
    Const IM_NOT_EVEN_GOING_TO_DIGNIFY_THAT_WITH_A_PARTICULARALY_LONG_CONSTANT As String = "Because If I used caps lock I would have had to press the shift key for every _ rather than just hold it down"
    parksie

    I think there's been wider ones from people who comment extensivley on the same line as a long bit of code. If you reply and scroll along there are 2 verticle blue bars that show the page is too wide, I've seen 3, maybe even 4.

  25. #25
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    FOUR?!?!?!?!?!?!

    Who writes that much code on ONE LINE?????
    (okay, so I do...but that's not the point )
    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

  26. #26
    Lively Member
    Join Date
    Jan 2000
    Posts
    95

    Angry Too much

    okay guys, this is really getting lame now .

  27. #27
    Guest
    Code:
    Const = JUST_WEDGE_SOMETHING_BETWEEN_THE_CONTROL_KEY_AND_THE_SHIFT_KEY_THEN_YOU_DONT_HAVE_TO_HOLD_ANY_THING_AT_ALL_AND_YOU_DONT_HAVE_TO_KEEP_PRESSING_THE_SHIFT_KEY_HAHAHAHAHAHA = "I have also seen 3,4, maybe even 5 backgrounds long when people write code"

  28. #28
    Guest
    perhaps this should have gone in the chit-chat forum?

  29. #29
    Lively Member
    Join Date
    Jan 2000
    Posts
    95

    Red face huh

    And you guys expect to get guru like this?????? ya right!

    [Edited by Zej on 08-18-2000 at 04:59 PM]

  30. #30
    Guest
    Wow!

    This thread is waaaay out of context

  31. #31
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Code:
    Text1 = "Const = " & UCase(replace(Text1, " ", "_")) & " = " & Val(text2)
    ah, were's the submit reply button now?!?!
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  32. #32
    Member
    Join Date
    Aug 2000
    Location
    London, ON
    Posts
    40

    Thumbs down Was Never Funny And Still Not:

    CONST WE_HAVE_THE_MATURITY_OF_FOUR_YEAR_OLDS_AND_YET_WE_THINK_WE_ARE_ALL_THAT_BECAUSE_WE_HAVE_LEARNED_TO_U SE_THE_SHIFT_KEY_SO_THAT_WE_CAN_IMPRESS_OUR_FELLOW_VB_PROGRAMMING_COMRADES_ON_A_BILLBOARD_BUT_WHY_DO _WE_HAVE_THE_MATURITY_OF_FOUR_YEAR_OLDS_AND_YET_WE_THINK_WE_ARE_ALL_THAT_BECAUSE_WE_HAVE_LEARNED_TO_ USE_THE_SHIFT_KEY_SO_THAT_WE_CAN_IMPRESS_OUR_FELLOW_VB_PROGRAMMING_COMRADES_ON_A_BILLBOARD_BUT_WHY_D O_WE_HAVE_THE_MATURITY_OF_FOUR_YEAR_OLDS_AND_YET_WE_THINK_WE_ARE_ALL_THAT_BECAUSE_WE_HAVE_LEARNED_TO _USE_THE_SHIFT_KEY_SO_THAT_WE_CAN_IMPRESS_OUR_FELLOW_VB_PROGRAMMING_COMRADES_ON_A_BILLBOARD_BUT_WHY_ DO_WE_HAVE_THE_MATURITY_OF_FOUR_YEAR_OLDS_AND_YET_WE_THINK_WE_ARE_ALL_THAT_BECAUSE_WE_HAVE_LEARNED_T O_USE_THE_SHIFT_KEY_SO_THAT_WE_CAN_IMPRESS_OUR_FELLOW_VB_PROGRAMMING_COMRADES_ON_A_BILLBOARD_HEHEHE_ I_THINK_I_WILL_WHEN_NOW = "We are retards!"

    PS should have used capslock and just pasted (CRTL + V) for the underscores _
    Visual Basic 6 Professional Edition
    Captain Pinko

    also:
    Turbo Pascal, Turing, QBasic

  33. #33
    Guest
    you are right, we all have the maturity of 4 year olds, and we are proud of it... well I am

    damnit Where is the submit button?

    it took me a while to find the text area box too.. hehe

  34. #34
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    This is OUTTA CONTROL !!

    Now...who's going to take it to 5 backgrounds long...
    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

  35. #35
    Guest
    Captain Pinky, it was funny the first time I did it, and when sam did it, because it poked fun at denniswrenn for being very naive, "Pi" indeed, who in their right mind would call a number "Pi"! I dont think so.

  36. #36
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    3.14159 is in fact called pi.

    It's because pi was discovered by the greeks, who found out the significance of this number and needed a name for it, this was thousands of years ago and world records hadn't yet achieved the high standards they have now, and by great coincedence the world pie eating record was exactly 3.14159.

    Pies were named after the greek letter P because they were vary diaretic at the time(which is why the world record was so low) the e was removed when performance enhancing drugs were made illegal in world records.

  37. #37
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169

    Hehe



    Maybe Sam should'nt be Guru after all...how about "Humour Guru"? ...it's definitely unique...
    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

  38. #38
    Guest
    What's unique is that the sum of the IQs of all of us equals Pi.

  39. #39
    Addicted Member hypnos's Avatar
    Join Date
    Aug 2000
    Location
    UK
    Posts
    183
    Code:
    Dim strThisIsTheLargestVariableThatIHaveEverDeclared As String

  40. #40
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    Code:
    Const Repressed_site_of_the_year_award As String = "http://www.vbworld.com"
    
    Const Lamest_Jokes_Ever_Award As String = "http://www.vbworld.com"
    
    Const Have_You_all_Lost_Your_Diginty As Boolean = True
    
    Const When_Was_The_Last_Time_You_Went_Out As Date = 5/9/78
    
    Private Sub Life_Start (Cesarian As Boolean)
    Dim Looks As Ineger, Intelligence As Integer, Personality As Integer, Health As Integer
    Dim Points As Integer 
    Points = 100
    Randomize Timer
    
    Looks = Points - Int(Rnd * 100)
    Points = Looks
    Intelligence = Points + Int(Rnd * 20)
    Points = Intelligence
    Personality = Points + Int(Rnd * 100) - 50
    Points = Personality
    Health = Points - Int(Rnd * 100)
    
    End Sub
    
    
    Sub Life_Terminate(Cause As vbDeathConstants, Haunt As vbHauntType)
    If Cause = StabbedInBackByBestFriend Then
        Haunt.Start = True
        Haunt.Person = BestFriend
        Haunt.Variety = Poltergeist
    End If
    End Sub
    Oh no! I've turned into one of you

    Members of VB-World: Whose to say we didn't turn into you?

    Anybody know the name of a good emotional-psychological-counciller? (I need help bad)

    Where the hell is the submit reply butto... Oh, there
    Courgettes.

Page 1 of 2 12 LastLast

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