Can someone give me a hand here? I am writing a program which is, in its basic form, is a very simple front end. What I want to do is for it to detect when a DLL has been placed into the same directory and add it too a drop down menu.
I have added all the functions declared within the DLL(s) into the main program. I have also made the menu items invisible which call the DLL once it is found (when the DLL is detected, its menu item is turned on and vise versa).
In my FormCreate method I have done a:
TipOfTheDay.Visible := FileExists('TOTD.DLL') ;
(One example) to enable or disable that menu item when ever that DLL is detected.
However, when I compile the program, it tells me that the DLL cant be found - which is true - I havent copied it into to the correct location yet.
I copied the DLL into the correct directory, and it compiles and runs perfectly. However, if I run the program again without the DLL, I get a message "a required DLL file, TOTD.DLL, was not found" error.
Can some one tell me how I can let the program run without these DLLs being present, and detect when the DLLs are present???
Thanks for your help.