Announcement

Collapse
No announcement yet.

Size of X

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

  • Dave Biggs
    replied
    There may be more than one instance of Edge running, or Google Chrome browsers for that matter

    As it stands the Close command will be sent to the one that the user was last working with.

    How could you know which to close? .. unless you had a hand in launching the target browser?

    Leave a comment:


  • Gary Beene
    replied
    Howdy, Dave!

    Thanks!

    Yes, I used WinSpy and saw several windows with that class name, even in Edge. I was surprised to find a common class between the two browsers.

    But, there were several such windows open at the same time with that class name and I wasn't sure which was the parent, to which I could apply %SC_Close. WIth your code (no caption text), how does it work out that the correct window is closed, such that the app shuts down?

    There are details as to why that works that I don't understand.

    It's certainly more minimal, which you know I like!!

    Leave a comment:


  • Dave Biggs
    replied
    Hi Gary,

    This seems to work ok - even if Edge is not foreground.
    '
    Code:
    Sub CloseBrowser
      Local hWin As Dword
       hWin = FindWindow("Chrome_WidgetWin_1","") ' MSEdge ClassName
       SendMessage hWin, %WM_SysCommand, %SC_Close, 0
    End Sub
    '

    Leave a comment:


  • Gary Beene
    replied
    Here's a "cheat" to the question of making the X bigger. This utility puts an on-top dialog containing a button with a big red X image into the upper right corner of the desktop. Pressing the button detects the Window in the center of the desktop and sends %SC_Close to that window.

    It works in the specific case where the browser is maximized, such that the browser is certain to cover the center point of the dialog. I've tested it on Edge and Chrome.

    Code:
    'Compilable Example:  (Jose Includes)
    #Compiler PBWin 10
    #Compile Exe  "close_browser.exe"
    #Dim All
    %Unicode = 1
    #Include "Win32API.inc"
    
    #Resource Icon logo, "x.ico"
    %AppSize = 64
    
    %IDC_Close = 500
    
    Global hDlg, hWin As Dword, PID As Dword
    
    Function PBMain() As Long
       Local w,h As Long
       Desktop Get Size To w,h
       Dialog New Pixels, 0, "PowerBASIC",w-%AppSize,0,%AppSize,%AppSize, %WS_Popup To hDlg
       Control Add ImgButtonX, hDlg, %IDC_Close,"logo", 0,0,%AppSize,%AppSize
       Dialog Show Modal hDlg Call DlgProc
    End Function
    
    CallBack Function DlgProc() As Long
       Select Case Cb.Msg
          Case %WM_InitDialog
             SetWindowPos(hDlg, %HWND_TOPMOST, 0, 0, 0, 0, %SWP_NOMOVE Or %SWP_NOSIZE)  'on Top
          Case %WM_ContextMenu
             WinBeep(250,300)
             Dialog End hDlg  'right close closes the window
          Case %WM_Command
             Select Case Cb.Ctl
                Case %IDC_Close
                   WinBeep(250,300)
                   CloseBrowser
                   Dialog End hDlg
             End Select
       End Select
    End Function
    
    Sub CloseBrowser
       Local pt As Point, hWin,hDeskTop As Dword
       hDeskTop = GetDesktopWindow
       Desktop Get Client To pt.x, pt.y
       pt.x = pt.x/2
       pt.y = pt.y/2
       hWin = WindowFromPoint(pt)
       hWin = GetParent(hWin)
       SendMessage hWin, %WM_SysCommand, %SC_Close, 0
    End Sub
    A solution that does not depend on the browsers being maximized would be a more generic solution, such as by finding the Chrome/Edge window handles through enumeration but I haven't gotten that far yet.

    Also, even though my tests on Chrome/Edge were successful, I'm not sure that a single call of GetParent() is all that is needed, the thought being that there might be more than 2 levels of windows?

    More testing is appropriate.

    Leave a comment:


  • Patrice Terrier
    replied
    Here is the link to the PowerBASIC 32-bit version
    http://www.objreader.com/index.php?topic=329.0

    It works very well by me, and is very stable and i have never been able to notice the nightly update.

    The System caption emulation i have done, allows you to do what you want for eye disability.

    Of course SDK code, but that is the same than 64-bit.

    Leave a comment:


  • Gary Beene
    replied
    Howdy, Patrice!

    Thanks for the suggestion. Canary is part of a development effort for Edge. Looking at the MS page it notes that the Canary version is updated nightly. Even the Beta Channel is updated every 6 weeks.

    That's not a very stable option to deploy to my users. I'd worry that the next version might undo any options I try to depend on.

    Even so, are you saying that the latest Beta has the ability to customize the non-client area? I'm not seeing where there's a discussion of what you describe. Do you have an additional link that describes it?

    Leave a comment:


  • Patrice Terrier
    replied
    If you use the Edge Canary chromium browser project, then you can customize the non-client area and add extra buttons to navigate to specific URL(s).

    Leave a comment:


  • Gary Beene
    replied
    If it would make the problem easier, I'd settle for just having the Chrome app have a big button. I wonder if an extension could do that?

    Leave a comment:


  • Gary Beene
    replied
    Howdy, Stuart!
    Yes, from various articles I've read Win7 settings could make that happen but changes to Win10 disabled that capability. Not to say the articles covered all the bases. I'm still looking. But what you see in Win7 is exactly what I'd like to see in Win10.

    Howdy, Paul!
    That's a good thought, but the problem then is that the amount of content that can be display in any window is reduced. However, it's a trade off that might be worth considering. I just did a quick test and the X at 800x600 is certainly larger than at 1920x1080. Also, the 3 buttons in the window are spaced farther apart, making a miss-hit less likely. I'll definitely play with that some more. I don't like the extra vertical scrolling involved, but the ability to see the X button on all apps is very important to my low vision users.

    Leave a comment:


  • Stuart McLachlan
    replied
    Originally posted by Gary Beene View Post
    Howdy, Stuart!

    That's the link I posted above in #2. Are you testing my memory?

    No, that does not make the X bigger. I only affects the size of the button surrounding the X.

    I've not experimented with other Registry values under WindowsMetrics to see if one of those can make the X bigger.
    It seems to make the X bigger for me, but maybe that's just in Win 7. Maybe changing the caption font size as well will change them.
    Attached Files

    Leave a comment:


  • Paul Dixon
    replied
    All apps?
    Why not reduce the screen resolution then everything will look bigger.

    Leave a comment:


  • Gary Beene
    replied
    Howdy, Stuart!

    That's the link I posted above in #2. Are you testing my memory?

    No, that does not make the X bigger. I only affects the size of the button surrounding the X.

    I've not experimented with other Registry values under WindowsMetrics to see if one of those can make the X bigger.

    Leave a comment:


  • Stuart McLachlan
    replied
    Does this help?

    https://www.tenforums.com/tutorials/...dows-10-a.html
    In Windows 10, it is possible for you to change the size of caption buttons (minimize, maximize, close) to be smaller or larger.

    It's not just Win 10. It works in Win 7 as well.

    Leave a comment:


  • Gary Beene
    replied
    Howdy, Patrice!
    Thanks for that suggestion. I've not dealt with creating a custom theme before. I'll do some reading on the topic to see how to get started. None of my reading so far has suggested that a theme can affect the size of the X. Not true? If so, it's definitely something I want to know more about. Does you suggestion require one of your tools to make it happen? Or is it something I can do with basic Windows tools?


    And, howdy, Paul!
    Yes, for my own apps I can do that. But I want the effect to apply to all WIndows apps, not just ones I create. For example, I want the Chrome title bar X to be large.

    Leave a comment:


  • Paul Dixon
    replied
    Have you thought of doing away with the title bar completely and using a graphic window on which you draw your own version of a title bar at any size and shape you choose?

    Leave a comment:


  • Patrice Terrier
    replied
    Gary

    What you want, and more, could be easily done with a Skin theme dedicated to eye disability.

    Leave a comment:


  • Gary Beene
    replied
    This page gives Registry info on resizing the title bar, but what it describes does NOT change the icon size.

    https://www.tenforums.com/tutorials/...dows-10-a.html

    Note: the button size of the X is increased, but not the size of the X inside the button.

    I had to reboot to get the Registry changes to take affect.

    Leave a comment:


  • Gary Beene
    started a topic Size of X

    Size of X

    I found a utility "System Font Size Changer" that seems to do a good job of making the font size of the window title bar larger - much easier to read at 16pt instead of the system default of 9pt.

    https://www.wintools.info/index.php/...t-size-changer

    But, it does NOT change the size of the buttons on the right of the title bar. I'd especially like the X button to be much larger - for all windows, not just my PBWin apps.

    I don't want to use the ease-of-use Resize Everything setting. I'm only interested in making the title bar more readable in all applications that I run.
Working...
X