Topic: Windows 11 and Appgraphics

Hi,

I have had a problem with my visualization code which uses Appgraphics since switching some systems to Windows 11. I lived with this on other systems for a while be since switching my main workstation to Win11 it has become really annoying. Aside from placement of text in the window, when selecting a check box to force the program to plot circles for particle sizes, the execution of the plotting loop grinds to a very slow pace. In addition, my mouse action on the desktop becomes erratic when this happens. I then have to basically shutdown the program for the mouse to behave properly. Now, I have not touched this code in over a year and it is the poster child for spaghetti code so i am not looking forward to a debugging session because I not sure what is going but the mouse action away from window being erratic is some sort of clue.

I have updated my SF to the latest this afternoon and the problem still exists. Is there anything new in Appgraphics calls that might be causing this?

Oh, one more thing, the program works fine in Windows 10, no change in behavior!

Thanks in advance.

Rod

Re: Windows 11 and Appgraphics

Rod,

I wasn't aware of any issue, and it does seem strange that it only occurs on Windows 11, not Windows 10.  My initial guess is that an infinite loop (in a manner of speeaking) is triggered on the graphics thread due to messages indicating that the checkbox value has changed.  I'll try to see if I can reproduce the behavior.

Jeff Armstrong
Approximatrix, LLC

3 (edited by grogley 2026-03-17 17:57:05)

Re: Windows 11 and Appgraphics

Thanks Jeff,

Oh, one other piece of information is that if the check box to do this behavior is checked and the scale is not appropriate for plotting sizes, then there is no problem. In this case the program continues to plot single pixels for the particle. However, when checked and zooming the scale smaller, eventually, the scale gets to where circle is supposed to be drawn and then the erratic and slow plotting happens.

Also, now testing my code the new compile with SF build 4438, many of the spacing's for text on the plotting windows has changed.
I am not sure if that is intended. I can send some screen caps to show differences. This only seems to break with the new SF version. In Win11 with the old SF 3.X build, there is no change in the positioning of the text.

It will be hard to check in for a while, so there is no real hurry.

Here is a link to a normal opening screen for the code with previous SF version: https://www.flickr.com/gp/grogley/yvb28t3AbC

The same for the the new build:https://www.flickr.com/gp/grogley/9S9u89H25e

Here is another sample for the density view in the old SF: https://www.flickr.com/gp/grogley/1N5o8t08f9

And the same with the new SF: https://www.flickr.com/gp/grogley/220Q573tun

Thank again.
Rod

Re: Windows 11 and Appgraphics

Windows 11 is a royal pain.  I installed (and eventually purchased) advchange.exe from wintools.info .  This allows to easily modify fonts, sizes, etc...  I was having problems as well coming from Windows 10 where certain GUI applications would lose text on screen, and this helped.  It's free for 30 days to try. I'm not affiliated with the site but changing the windows 11 defaults using the simple tool helped.  Under $10 for a year, I believe.  I ended up also getting startevery.exe  which is great and I also fun Win11Debloat to make windows 11 as much like windows 10 as possible.  What I really miss is windows XP 64 bit.  Best version of windows ever.

Re: Windows 11 and Appgraphics

Jeff,  there was anything discovered about plotting circles for data points?

Thanks TRUEPRECISIONNC,
I don't think the font is changing, I think the relative positioning is different for the plot window text. The check boxes and text boxes are positioned as before but in some cases (not all) the descriptive text plotted next to them has a changed position. It is like the origin of the plot area has changed.

Rod

Re: Windows 11 and Appgraphics

Rod,

I hadn't checked on the feasibility of adding that style, but, on further reflection, it should be possible.  I'll need to look further into the other issues, though.

Jeff Armstrong
Approximatrix, LLC

Re: Windows 11 and Appgraphics

Any update on the original problem?

Re: Windows 11 and Appgraphics

Rod,

I've tried working with some checkboxes on Windows 11, and I'm not seeing any problem in my simple examples.  A possible source, though, of your issues might be doing any sort of significant work in the checkbox callback.  Do you have a subroutine that is called when the checkbox is clicked?  Does it do anything?

The font change you shared is quite puzzling.  It seems rather erratic as well; some labels appear to be aligned properly still.  I noticed that some checkboxes are misaligned. Specifically, I'm interested in the checkboxes with labels to the right: Plot Density, Plot Profiles, Plot Phase Space, etc.  Are you drawing the text yourself or are you using the label field in createcheckbox?

I'll look at the font handling specifically today.  My guess is something has changed the font baseline definition.

Jeff Armstrong
Approximatrix, LLC

9

Re: Windows 11 and Appgraphics

Hi Jeff,

Sorry about the late reply.
Here is how the check box is created:
!*** Create Check Box to control plotting softening size
    icboxSz=createcheckbox(iptx+25+2+170,iCKBxYpos,15,15,'',cboxSz)

and here is the subroutine that is called. Nearly all of these subroutine are identical and oly set an action flag.

!****************************************************************************************
    Subroutine cboxSz()
       integer::mcntrl(10),ibutwinsiz,iwinx,mCtlSum,iact
       common / control / mcntrl, iwinx,ibutwinsiz,mCtlSum
       iact=14
       mCtlSum=mCtlSum+1
       if(mCtlSum.gt.10)mCtlSum=10
       mcntrl(mCtlSum)=iact 
    end subroutine cboxSz

Also, there is a label field in the createcheckbox???? Ugh! No I write all the labels manually. So dumb!

As for text alignment, I noticed that to but forgot to mention it. I will look to see if there is a place where it might break in the code.


Thanks,
Rod

10 (edited by grogley Today 15:04:03)

Re: Windows 11 and Appgraphics

Jeff,

So, I am finally looking at this code more carefully, text is created with outtext command with specific X,Y positions. The first three are the Plot Scale, File Number and File Increment and they are all positioned correctly. The next outtext call (about 44 lines of code later) is for the "Plot-CM" and it is now shifted upwards and all text after is shifted upward. I have looked at the code in between but don't see any obvious issues. I have included the code between these screen writes below.

Also the information viewport below the control viewport is shifted too somehow as the top line of information is now missing. I didn't notice that before. There should be room for 3 information lines of text, there still is but the first one is missing... perhaps underneath the control view port?

Here is the promised code:

    call outtextxy(10,57,inctext)
    call settextjustify(RIGHT_TEXT,CENTER_TEXT)
! Create scale text box and set contents 
    isclbox = createtextbox(80, 5, 60, 20)
    call settextboxcontents(isclbox, scalenumber)
! Create file number text box and set contents
    ifilebox = createtextbox(80, 30, 60, 20)
    call settextboxcontents(ifilebox,filenumber)
! Create file increment text box and set contents   
    incbox = createtextbox(80, 55, 60, 20)
    call settextboxcontents(incbox, trim(fileinc))
   
     ibtoffy=(ibutton-8)/2
     
! Create x-offset text box and initialize its contents   
    ixosbox=createtextbox(iptx-25,30,50,15)
    write(xostext,'(f7.1)')xos
    call settextboxcontents(ixosbox,xostext)
! Create y-offset text box and initialize its contents     
    iyosbox=createtextbox(iptx-25,45,50,15)
    write(yostext,'(f7.1)')yos
    call settextboxcontents(iyosbox,yostext)
! Create z-offset text box and initialize its contents     
    izosbox=createtextbox(iptx-25,60,50,15)
    write(zostext,'(f7.1)')zos
    call settextboxcontents(izosbox,zostext)
! Build C-M Object Check box and text box   
!Check C-M Plot box is first   
    icbox1=createcheckbox(295,47,15,15,'',cboxone)
! Create PPV check box
    iPPVChkBx=createcheckbox(295,62,15,15,'',cboxPPV)
! create first object text box
    ipart1box=createtextbox(280,5,40,20)
    call setcolor(mDrkGrn)
    write(ipart1text,'(i5)')ipart1
    call settextboxcontents(ipart1box,ipart1text)
! create second object text box   
    ipart2box=createtextbox(280,25,40,20)
    call setcolor(mRed)   
    write(ipart2text,'(i5)')ipart2
    call settextboxcontents(ipart2box,ipart2text)
! Write text out to the viewport for text box descriptions 
    call settextjustify(LEFT_TEXT,CENTER_TEXT) 
    call setcolor(mBlack)
    call outtextxy(240,47,'Plot C-M')