Need dynamic loading was in the hospital beds in our software, implementation is used in pb9 OpenUserObjectWithParm dynamically created some picturebutton, statictext, about the appearance of SanSiShiGe, circulation read from a database, and dynamically create picturebutton, statictext, and dynamic specified position, to st text load value, run under the pb environment will soon be able to open the interface, but the compiled and run this code will be more than ten seconds to show interface, why?? What's the solution??
CodePudding user response:
Haven't metSuggest writing log function is added to the code in, by reading log to check where is the slow line of code, consider improved
CodePudding user response:
Tracking code, found that is dynamically created controls the most time, speed bottleneck is here, the database read quicklyCodePudding user response:
That's another way to display the beds, abandoning the dynamic object creation way,CodePudding user response:
System, there are a lot of this method of dynamic loading, to change may not be for a fellow got, or want to find out the reason, I run very fast, more strange is pb environment compiled not runningCodePudding user response:
End of the first setredraw (false) again setredraw (true)CodePudding user response:
If they were going to drag your beds function, drag the bed after the position of the object information is saved to the database table, and then next time data window initialization, need to map the location of each control, if this could be the time-consuming, you can write a function to create the data window directly syntax, then create data directly by string data window window,CodePudding user response:
This thing out before, should be OpenUserObjectWithParm caused by text messages within the station for you, help you see in the QQCodePudding user response:
Be less than end not dynamic