Problem: Error C016: Method "Controls.SetPosition" takes 4 param(s) : 1 specified
Solution: This error message may appear when compiling an application using Satellite Forms 7, even if the same application compiled okay under Satellite Forms 6. The problem stems from a conflict between an extension that includes a SetPosition method and the new .SetPosition method for standard form controls introduced with SatForms 7.
The Slider and Color Slider controls included with Satellite Forms include SetPosition and GetPosition control methods. We have modified the extension INF files for Slider and Color Slider to rename those methods with SatForms 7. They have been renamed SldSetPosition and SldGetPosition, and the SetMinMax function was renamed to SldSetMinMax as well. If your application uses the Slider or Color Slider controls, you will need to perform a find and replace operation on your script code, to use the updated extension function names. That will eliminate the compiler error as described above.
All instances of SetPosition in your script code will be replaced with SldSetPosition.
You should now be able to compile your application that uses the Slider or Color Slider control, without generating the compiler error complaining about the SetPosition taking a different number of parameters.
Attention LSListBox Control Users
The LSListBox custom control from PalmDataPro also includes a function named SetPosition, and will therefore generate the same error when you compile that application that uses LSListBox under Satellite Forms 7. To solve this problem you must modify both the extension INF file and update your script code. Perform the following steps to make the changes so that the application compiles under SatForms 7 with the LSListBox control.
You should now be able to compile your application that uses the LSListBox control in Satellite Forms 7.
Note that if your application uses both the Slider/Color Slider control and the LSListBox control, you should use the Replace button in the Find & Replace dialog, instead of Replace All. That will enable you to search through your code and replace the Slider calls with SldSetPosition, and skip the LSListBox calls. You can then go back and run the replace operation again replacing the LSListBox SetPosition calls with LSLSetPosition. Note that with LSListBox V2.2 and higher the necessary changes have been made to the INF file.
Keywords: error, C016, SetPosition, GetPosition, Slider, LSListBox
KB ID: 10040
Updated: 2007-07-11
Satellite Forms KnowledgeBase Online