Forum > Windows CE

ShowModal is not working anymore?

(1/2) > >>

ertank:
Hi,

I am not quite sure, but I cannot display a form as modal in WinCE platform. For example, attached program becomes unresponsive (picture 2) after clicking "Modal Show Form2" button (picture 1).

Project has 2 forms total. Only Form1 is auto created. When button clicks, Form2 created and displayed with ShowModal. Unfortunately, code executes it, directly goes to Free section and application become unresponsive.

If I change code to Form2.Show; everything is just fine.

My device is from http://www.dsic.co.kr/ model is DS5 under mobile solutions.

Thanks & regards,
-Ertan

GetMem:

--- Quote ---Project has 2 forms total. Only Form1 is auto created. When button clicks, Form2 created and displayed with ShowModal. Unfortunately, code executes it, directly goes to Free section and application become unresponsive
--- End quote ---
Probably it's a bug! Unfortunately I don't have WinCE to test it.


--- Quote ---If I change code to Form2.Show; everything is just fine.
--- End quote ---
As a  quick workaround(asically you achieve the same thing):
1. Unit1

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses unit2; procedure TForm1.Button1Click(Sender: TObject);begin  Form1.Enabled := False;  Form2 := TForm2.Create(Self);  Form2.Show;end;
2. Unit2
Set Form2 FormStyle to fsStayOnTop/fsSystemStayOnTop

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses unit1; procedure TForm2.FormClose(Sender: TObject; var CloseAction: TCloseAction);begin  CloseAction := caFree;  Form1.Enabled := True;end;    

ertank:
Hi,

Yes, similar thing can be achieved with your sample code. I used to use Modal windows myself. Show one get information from it. Continue with received information kind of coding what I generally do.

This will somehow change my habits, leading me to a bug full of coding  %)

GetMem:

--- Quote ---@ertank
es, similar thing can be achieved with your sample code. I used to use Modal windows myself. Show one get information from it. Continue with received information kind of coding what I generally do.
This will somehow change my habits, leading me to a bug full of coding  %)

--- End quote ---
You can always fill a bug report: http://bugs.freepascal.org/view_all_bug_page.php?project_id=1 . Hopefully somebody will fix the issue.

ertank:

--- Quote from: GetMem on April 13, 2016, 09:25:31 am ---You can always fill a bug report: http://bugs.freepascal.org/view_all_bug_page.php?project_id=1 . Hopefully somebody will fix the issue.

--- End quote ---

Thanks. I already did. Waiting with patience.

Navigation

[0] Message Index

[#] Next page

Go to full version