Results 1 to 4 of 4

Thread: Moduels

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Talking

    I was wondering....if i made a program that had all the code inside each control on a form..i guess like a calculator program...would that make the program run faster? or would it be faster too put all the fuctions in a moduel? also one more quick question....is a moduel considered a dll file? are they one in the same?..
    Thanks.

  2. #2
    Guest

    a modULE is nothing like a dll really

    A dll is a file that you compile externally, irrespective of your project, you then declare in code that you want to use it (or add a reference at design time), and then set up an instance of the DLL's class then you use its functions.

    a module is compiled into the project and does not need declarations to access its functionality, it is merely a place to stuff a load of code that would clutter a form or similar. Modules rarely do much more than that, but thats just a vague example.




  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    No your module is compiled within your exe, and your code will run faster if you put it in the form, but the difference is tiny. So unless you don't have a really frequent loop of code you would have any speed gain
    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.

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    As far as having code on each button's click event or to have a generic routine that has that functionality......the answer is use a generic function and call the function from each button's click event, passing appropriate parameters. This will make your EXE a lot smaller.

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