Page 1 of 1

Icon/Bitmap background

Posted: Thu Jan 16, 2020 8:27 am
by omni
Roger.

A while back you gave me a method to have the clients icon as the background for our application..works great for them.
They all connect via remote access, same screen sizes,etc.

We have found in testing centering it is difficult for different work station set ups For example, for my work station 1920x1080 with 150% it is perfectly centered. Next work station in old win7 with 125% it is way left of center.
Users can have any display settings, although most would be close to the standard.
Any method to handle this? The centering is a var based on icon size,etc that is set in an ini file (ie, bitmap name, and two locations qqbitn1 and 2)
I doubt it but thought I would ask.

@ -5,50 DCSTATIC TYPE XBPSTATIC_TYPE_BITMAP SIZE qqbitn1,qqbitn2 OBJECT oStatic ;
RESIZE DCGUI_RESIZE_RESIZEONLY COLOR nil, GRA_CLR_WHITE ;
CAPTION qqbitmap2 ;
PREEVAL {|o|o:options := XBPSTATIC_BITMAP_SCALED}


Fred
Omni

Re: Icon/Bitmap background

Posted: Thu Jan 16, 2020 8:51 am
by rdonnay
Try this:

DCREAD GUI EVAL {||DC_CenterObject(oStatic)}

Re: Icon/Bitmap background

Posted: Thu Jan 16, 2020 9:31 am
by omni
How would I put it in that guiread I have..tried various different replacement methods but it would not compile.

Fred

Re: Icon/Bitmap background

Posted: Thu Jan 16, 2020 9:31 am
by omni
Hmmm. said invalid var ostatic...will keep trying..

Appears to work..had to put after the eval for maximizing the app. Will try some different settings.


As always, thanks much

Fred

Re: Icon/Bitmap background

Posted: Thu Jan 16, 2020 9:50 am
by rdonnay
I will need to see more of your code.

Re: Icon/Bitmap background

Posted: Thu Jan 23, 2020 9:50 am
by omni
What you suggested worked perfect..sorry if my response was confusing...

Fred