Announcement

Collapse
No announcement yet.

show dialog and hide page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • show dialog and hide page

    Hi!
    is it possible to show dialog and hide page from where it was started
    and close dialog to show back the page?

  • #2
    Try this:

    Button On Click:
    Code:
    Window.Hide(Application.GetWndHandle());
    DialogEx.Show("Dialog1");
    DialogEx On Close:
    Code:
    Window.Show(Application.GetWndHandle());

    Comment


    • #3
      thank you!

      Comment


      • #4
        Or, if dealing with plain Dialog.Message (as opposed to DialogEx),
        then like this:
        Code:
        Window.Hide(Application.GetWndHandle());
        nRet = Dialog.Message("Notice", "Your message here.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
        
        if nRet == IDOK then
            Window.Show(Application.GetWndHandle());
        end

        Comment


        • #5
          Come to think of it (given the way control is passed between parent/child window), it's not actually even necessary to split code between events.

          It can all just go on the one trigger event, like this:
          Code:
          [B]-- DialogEx:[/B]
          Window.Hide(Application.GetWndHandle());
          DialogEx.Show("Dialog1");
          Window.Show(Application.GetWndHandle());
          Code:
          [B]-- Dialog Message:[/B]
          Window.Hide(Application.GetWndHandle());
          Dialog.Message("Notice", "Your message here.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
          Window.Show(Application.GetWndHandle());

          Comment


          • #6
            thanks but fist worked fine

            Comment


            • #7
              what and where i need to add so the project will delete temp files after it finished?
              it's leaving
              ir_ext_temp_0
              ir_ext_temp_1
              ir_ext_temp_2.
              .

              Comment


              • #8
                Compiled projects by default use the Temp folder during runtime but any .tmp files should disappear after application exit. If there's something going on in your project (maybe a fonts issue? Or whatever?) that's leaving stuff behind, you can use the File.Delete command from the On Shutdown event (located under Actions).

                The 'correct' way to do it, would be to first create a table of the files to be deleted, and then loop thru that table to:
                i) check if each of the files exists
                ii) and if so, delete each file.

                Note:
                - Use full filenames (with their extensions, if they have one)
                - And use the relative path to the temp folder. (ie. _TempFolder)

                Like this:

                On Shutdown:
                Code:
                tFiles = {
                    "ir_ext_temp_0.tmp",
                    "ir_ext_temp_1.tmp",
                    "ir_ext_temp_2.tmp",
                };
                
                for k,v in pairs (tFiles) do
                    if File.DoesExist(_TempFolder.."\\"..v) then
                        File.Delete(_TempFolder.."\\"..v, false, false, true, nil);
                    end
                end

                Comment


                • #9
                  @Delta,

                  Just an afterthought. Your referencing of those particular filenames:

                  - ir_ext_temp_0
                  - ir_ext_temp_1

                  ... actually brings to mind an old thread regarding application-security. Please see the following post (#21) within that thread, which discusses the significance of these particular files. Some salient points are discussed there, which are worth understanding: https://forums.indigorose.com/forum/...798#post203798

                  Comment


                  • #10
                    howe to make folder address for copying if you only know part of folder's name?
                    for example:
                    default.***
                    ***.default
                    tmp.***
                    program-*** (some time programs adding "-free" "-trial" or edition name without asking users)

                    Comment

                    Working...
                    X