Windows settings – Anvil of Time https://anvil-of-time.com Nature Forges Everything on the Anvil of Time Thu, 11 Mar 2021 17:34:46 +0000 en-US hourly 1 Windows 7 ‘Gotcha’ – PowerBuilder Application Control Fonts Too Large https://anvil-of-time.com/powerbuilder/windows-7-gotcha-powerbuilder-application-control-fonts-too-large/ Thu, 21 Feb 2013 12:17:44 +0000 http://anvil-of-time.com/wordpress/?p=1553 So I finally got my computer upgraded to Windows 7 at work.  I was very happy to have it since XP was really starting to annoy me and I couldn’t really do some of the development tasks I needed to get done.

After a week or so I started looking through the applications I work on and found some issues with some of the fonts; they were too big in Windows 7.  Now, if you went through a Windows upgrade before this may come a no surprise; I remember some issues going from Win95 to Win 2000 to Win XP back in the day.  Here is an example of what I’m talking about.

win7_fonttoobig

 

Now these buttons had MS Sans Serif font sized at 9 point.

So I tasked myself with going through each window/visual object in the application libraries to check for this.  The last thing I want to have  happen is my apps to go to customers looking like crap.

Lo and behold you don’t need to do this.  The answer is a setting in Windows.

Right Click on the desktop:

Rt Click on Desktop

Choose ‘Personalize’

win7_screensettingdisplayChoose ‘Display’

win7_screensettingdefaultMake sure you are using the default setting.

 

Now things are fine:

win7_normalfont

Now this seemed to only be an issue with MS Sans Serif  so I’m not sure if there are other fonts to be concerned with or not.

]]>
PowerBuilder ‘Gotcha’ – SyntaxFromSql and System Fonts https://anvil-of-time.com/powerbuilder/powerbuilder-gotcha-syntaxfromsql-and-system-fonts/ Thu, 12 Jul 2012 22:56:26 +0000 http://anvil-of-time.com/wordpress/?p=1437 So a user of an application I work on is getting an error when opening a window which contains a dynamic datawindow. The open process reads a table and then dynamically creates a grid datawindowobject with the same number of columns as the data which is retrieved from the table. The process itself uses the datawindow syntax created from a SQL string and a presentation string via a SyntaxFromSql call and then a DW.Create call. In this one users case the process is returning a cryptic “datawindow release number is incorrect” message from the create.

Ah Ha! The user is running a Windows 7 workstation.
Ah Ha! The user doesn’t have the correct SQL Server native driver.
Ah Ha! The user has older PB runtime DLLs.

Nope, another Windows 7 workstation runs fine.
Nope, the driver is the same.
Nope, the runtimes are correct.

After setting up the window to create a text file containing the specific strings used to create the datawindow I see that a replace I am doing after it is generated by the SyntaxFromSql but prior to the Create is jumbling up the string. Now the reason it is jumbling it up is I assumed the value I was looking for was a static value and since the Pos method couldn’t find the proper place it came back with zero which tells the replace to start at the beginning of the string and screwed up the Release number.

I noticed a number of positional/size parameters were different in the two sets of files as well.

In Windows XP:

 release 12.5;
 datawindow(units=1 timer_interval=0 color=16777215
 processing=1 print.margin.bottom=24 print.margin.left=24
 print.margin.right=24 print.margin.top=24...

In Windows 7:

 release 12.5;
 datawindow(units=1 timer_interval=0 color=16777215
 processing=1 print.margin.bottom=30 print.margin.left=30
 print.margin.right=30 print.margin.top=30...

Notice the difference in the print.margin settings.

The datawindow presentation style is:

 "style( type=Grid              &
       Horizontal_spread = 25 )      &
       datawindow( units=1           &
       Color= 16777215)              &
       column( Font.Face='Arial'     &
           Font.Height=-9            &
           Font.Weight=400)          &
           text(   Font.Face='Arial' &
           Font.Height=-9            &
           Font.Weight=400           &
               Border=6)"

Which got me thinking about the font on the individual machines.

A post to the Sybase Powerbuilder Datawindow forum gave me the following:

Hi Matt;

I suspect you are correct when you say that the fonts are different.

The reason I say that is because the DWO settings for size &
displacement are set by the DW Painter. The DW Painter gets these at
regeneration / save time by using the IDE’s font settings. These in turn
are governed by the O/S’s “Default Printer”.

So, unless the XP and W7 PC are using the same default printer (and I am
talking about pointing to the exact network printer instance ) and have
the same recent printer font definitions installed (aka print driver
version) – then these type of minor variations would surface.

Now, when your PB application uses a SyntaxFromSQL () command, the same
default printer and font criteria is in play as if you were using the DW
Painter inside the IDE.

HTH


Regards … Chris
President: OSUG / STD Inc.
Vice President: ISUG
Blog: http://chrispollach.blogspot.com
SourceForge: http://sourceforge.net/projects/stdfndclass
PBDJ: http://chrispollach.sys-con.com

Thanks to Chris Pollach.

The ‘moral’ to this is you should explicitly set the various properties of the datawindow object after the create if you need to ensure a specific positional value is required to account for differences in user environments.

]]>
Windows Installer Error – “Installshield error 1500” https://anvil-of-time.com/installshield/windows-installer-error-installshield-error-1500/ Mon, 20 Feb 2012 13:02:14 +0000 http://anvil-of-time.com/wordpress/?p=1184 So I finally upgraded my laptop to Windows 7 from (shudder) Vista. Not a big deal, just pop in a new hard drive (four times larger than old one). Boot from the install CD and go to town. After the os install, now all the other Microsoft products (Visual Studio, SQL Server, Service Packs, etc.).

Now the issue hits. Something goes wrong and now I am getting the message that an install is in progress and I can’t install anything else. The infamous “Installshield error 1500: Another installation is in progress”.

The fix is fairly simple, at least on Windows 7. Run ‘Regedit’ to edit the registry. Find the Key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress” and delete it (don’t just remove the current value but delete the entire key value). Check to see if the msiserver process is running (in the Task Manager) – it it is kill it. Check to see if the msiserver service is running (Control Panel – Administrative Tools – Services) and stop it if it is.

Now you can install whatever it is you were attempting to when you got the error.

]]>
PowerBuilder ‘Gotcha’ – Tab Label Disappears https://anvil-of-time.com/powerbuilder/powerbuilder-gotcha-tab-label-disappears/ Wed, 25 Jan 2012 22:54:09 +0000 http://anvil-of-time.com/wordpress/?p=1068 You get a call from customer support regarding a client who is reporting that the tab labels are all ‘grayed out’ on a particular window. You get a screen shot and see that, yes, they are. These tabs have been disabled within the application by various other processes.

Furthermore you find out the client is running the application in a Citrix session; Aha! that’s the culprit. Well, not really.

You can reproduce this on a Windows XP workstation (running PB11.5 code) by bringing up your desktop properties – appearance tab – windows and buttons dropdown and choosing ‘Windows Classic’.

Changing this to Windows XP will correct the issue.

As a side note for Citrix this is controlled by the ‘Desktop Experience’ feature installed on the server. Windows Classic is a default (and the only option) if this is not installed.

]]>