RS First Dynamics NAV Blog


...from NAV 3.60 to NAV 2013
Archivio Posts
Anno 2015

Anno 2014

Anno 2013

Anno 2012

Anno 2011

Anno 2010

Anno 2009

Anno 2008

Anno 2007

Navision Title Bar Modification

Actually, there IS a way to change the Navision Title Bar caption, but it's a dirty hack

1. Download the freeware tool cmdow (http://www.commandline.co.uk/cmdow/)
2. Copy this little exe-file in eg. c:\windows\system32 folder on the Client PC's
3. Modify the function CompanyOpen in Codeunit 1:

Code:
Variables
---------
Name        DataType         Subtype                                     Length
ltxtParam   Text                                                         1024
lautWSHOM   Automation       'Windows Script Host Object Model'.WshShell   

CompanyOpen()
//*** 001 BEGIN
ltxtParam := 'c:\windows\system32\cmdow.exe ' +
             '"' + COMPANYNAME + ' - Microsoft Business Solutions-Navision" /ren "' + COMPANYNAME + ' - mibuso.com"';
CREATE(lautWSHOM);
lautWSHOM.Run(ltxtParam);
CLEAR(lautWSHOM);
//*** 001 END

IF GUIALLOWED THEN
  LogInStart;

Now whenever you change the company, the Title Bar will be modified. You can add code to retrieve eg. the databasename/servername and display this as well.

This code works on Navision 3.70/4.0. For 3.60, you have to change "Microsoft Business Solutions - Navision" to "Microsoft Navision Attain".

Other option:

Context := CONTEXTURL;
ServerName := COPYSTR(Context,STRPOS(Context,'servername=')+11); // Delete the "prefix"
ServerName := DELSTR(ServerName,STRPOS(ServerName,'&'));         // Delete trailing p.
DatabaseName := COPYSTR(Context,STRPOS(Context,'database=')+9);  // -do-
DatabaseName := DELSTR(DatabaseName,STRPOS(DatabaseName,'&'));   // -do-

Categoria: Dynamics NAV ALL
giovedì, 03 mag 2007 Ore. 12.16
Statistiche
  • Views Home Page: 468.858
  • Views Posts: 885.702
  • Views Gallerie: 0
  • n° Posts: 343
  • n° Commenti: 0
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003