How to make an app - Andromo App Maker

Announcement

Collapse
No announcement yet.

Closing the DialogEx window when clicking outside it's windows

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

  • Closing the DialogEx window when clicking outside it's windows

    Right I know I have done this a few times in the past but I have 100% gone choco brain, Closing the DialogEx window when clicking outside it's windows, I know I done it before, but not in the life in me how I did it or what projects I used it on.

    Let me just clear this up, I want to click on the dialogex window without a problem and when I click back at the app I want it to close
    BunnyHop CDD Obscurer Download No Longer Supported
    Plugins or Sources MokoX

  • #2
    I think the key is when you click outside the dialog , an error should return. I tried error 1303 (Error, cannot navigate pages while a dialog is visible."
    but it didnt work, i tried it on page and on dialog but nothing happened .

    I tired this code but i failed:

    Code:
    result = Application.GetLastError();
    if (result == 1303) then
    Close_dialog = DialogEx.Close(0);
    end
    Another approach is to compare the mouse positions with the dialog width i high , so if x or y are less or greater than the dialog width and high then it closes the dialog, but also didn't work because the moment u click outside the dialog it stops recording the position of the mouse, it workes inside the dialog but not outside it.

    hope u remember how u did it before

    Comment


    • #3
      Originally posted by sameer valva View Post
      I think the key is when you click outside the dialog , an error should return. I tried error 1303 (Error, cannot navigate pages while a dialog is visible."
      but it didnt work, i tried it on page and on dialog but nothing happened .

      I tired this code but i failed:

      Code:
      result = Application.GetLastError();
      if (result == 1303) then
      Close_dialog = DialogEx.Close(0);
      end
      Another approach is to compare the mouse positions with the dialog width i high , so if x or y are less or greater than the dialog width and high then it closes the dialog, but also didn't work because the moment u click outside the dialog it stops recording the position of the mouse, it workes inside the dialog but not outside it.

      hope u remember how u did it before
      I might of done it with the x/y of the mouse but I not sure I did, but I sure it will come back to me if not I will have to just start testing new ways to detect it, I sure I did have a easy way to do it before, thanks for your input tho.
      BunnyHop CDD Obscurer Download No Longer Supported
      Plugins or Sources MokoX

      Comment


      • #4
        I tried the mouse idea but soon as the mouse leaves the dialogex it no longer registers the the mouse click or any away from dialogex action ... hmm
        BunnyHop CDD Obscurer Download No Longer Supported
        Plugins or Sources MokoX

        Comment


        • #5
          WinApi Plugin DialogClose.apz

          Comment


          • #6
            how can we get the plugin ? is it available ?

            Comment


            • #7
              Originally posted by theskull View Post
              WinApi Plugin [ATTACH]n300639[/ATTACH]
              Not the way I would of done it in the past but I do have WinApi plugin and that does work like a dream thanks.

              I will try and find the way I did it in the past but this will do my needs also.
              BunnyHop CDD Obscurer Download No Longer Supported
              Plugins or Sources MokoX

              Comment


              • #8
                any Chance to get the plugin ?

                Comment


                • #9
                  Originally posted by kingzooly View Post
                  Not the way I would of done it in the past.



                  if you want to have fun playing with the coordinates of the mouse use mouse.dll or mousehelper.dll


                  regards

                  Comment


                  • #10
                    Originally posted by sameer valva View Post
                    any Chance to get the plugin ?

                    WinApi.zip

                    Comment


                    • #11
                      Thank you so much , and as Kingzooly said "it does work like a dream".

                      Comment


                      • #12
                        Originally posted by theskull View Post




                        if you want to have fun playing with the coordinates of the mouse use mouse.dll or mousehelper.dll


                        regards
                        Do you have them, is one by worm, I think I might of used a mouse dll I am not sure,
                        BunnyHop CDD Obscurer Download No Longer Supported
                        Plugins or Sources MokoX

                        Comment


                        • #13
                          Here U go Rex Mouse.zip

                          Comment


                          • #14
                            Originally posted by colc View Post
                            Here U go Rex [ATTACH]n300649[/ATTACH]
                            Where has colc been hiding, lets see if this was it, thanks calc



                            Edit
                            No there not them but they kinda still work on windows 10, well don Riz on a good dll.
                            BunnyHop CDD Obscurer Download No Longer Supported
                            Plugins or Sources MokoX

                            Comment


                            • #15
                              You don't need any plugins or DLLs for this.
                              4 lines of code will do the job. See attached.

                              Nb. Ditto with tracking mouse-movement. You can track movement outside the DialogEx window with native functions - see 2nd attachment - but this won't help with passing control back to the window once it's lost focus. Stick with the 1st example attached - it's much simpler.
                              Attached Files

                              Comment

                              Working...
                              X