fredycc Posted April 26, 2012 Posted April 26, 2012 Hi, I want to know the correct way in uniGUI to check if a form already exist before I dynamically create it. I use the next code to create a new form: procedure TMainForm.UniButton1Click(Sender: TObject); var AppForm: TAppUniForm; begin AppForm:= TAppUniForm.Create(uniApplication); AppForm.Show; end; Thanks. Regards
Administrators Farshad Mohajeri Posted April 26, 2012 Administrators Posted April 26, 2012 Hi, I want to know the correct way in uniGUI to check if a form already exist before I dynamically create it. I use the next code to create a new form: procedure TMainForm.UniButton1Click(Sender: TObject); var AppForm: TAppUniForm; begin AppForm:= TAppUniForm.Create(uniApplication); AppForm.Show; end; Thanks. Regards You should keep track of Form instances in MainForm or MainModule.
fredycc Posted April 26, 2012 Author Posted April 26, 2012 You should keep track of Form instances in MainForm or MainModule. Thanks Farshad. Regards
chajaluis Posted November 21, 2012 Posted November 21, 2012 Thanks Farshad. Regards Dear, I'm trying to follow the costumnre destruri created and the form of the application. In Win 32 I have it clear but not so much understand uniGui to create I do: procedure TMainForm.UniButton1Click(Sender: TObject); var AppForm: TAppUniForm; begin AppForm:= TAppUniForm.Create(uniApplication); <-- Checa el Owner AppForm.Show; end; and then destroyed. While the subject is as if there is no instance in memory form when I call back. On win32 after closing the form reasiganaba the variable to nil to avoid variable error I have created. As with unigui resolves? Thank
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now