control Navision Title Bar or Status Bar

darrencdarrenc Member Posts: 16
edited 2010-08-20 in NAV Tips & Tricks
Does anyone know a way to control what is displayed on the Navision title bar or status bar? We used to display the server, database, and user id you were logged in with on the main form in 3.7, but that form is no longer used in 4.0. It’s was a handy way to check to make sure you are in the test database you thought you were in before making code changes.

Thanks

Comments

  • Captain_DX4Captain_DX4 Member Posts: 230
    darrenc wrote:
    Does anyone know a way to control what is displayed on the Navision title bar or status bar? We used to display the server, database, and user id you were logged in with on the main form in 3.7, but that form is no longer used in 4.0. It’s was a handy way to check to make sure you are in the test database you thought you were in before making code changes.

    Thanks

    Not that I've heard of. One of the best usage practices I've seen for using test-databases is to rename the companies to include "TESTING" or the like in the description. Beyond that, I've always found a good rule of thumb is to look at the Database Information screen before proceeding with code and data changes.
    Kristopher Webb
    Microsoft Dynamics NAV Developer
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    If you want your userers to be aware that they are in a live or test db, you can put a message in codeunit 1, LogInStart()

    The user will get a message when he logs in.

    You can also delete all menusuites and put form 330 etc, back in :D

    Sorry, its the best you can do at this time.
  • darrencdarrenc Member Posts: 16
    Thanks for the suggestions. I think what we are going to do is start a maximized form on startup (from codeunit 1) that displays our logo as well as the database/server you are logged into. The form’s caption is set to the database/server name so that any developer can quickly check which database he/she is in by clicking the window menu button – this “splash screen” will always be the 1st window open (assuming you haven’t closed it) so it will always be at the top of the list. Not perfect, but its all I can come up with and I think it’s as good as our old method of displaying the login info on the main form 330.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    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:
    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".
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • janpieterjanpieter Member Posts: 298
    Hey if you now visual basic you could probably make your MDI background verry verry red ... that sure wouldn't get unnoticed ...

    :mrgreen:
    In a world without Borders or Fences, who needs Windows and Gates?
  • ajhvdbajhvdb Member Posts: 672
    Actually, there IS a way to change the Navision Title Bar caption, but it's a dirty hack ;-)

    Thx for the run example.
  • madshmadsh Member Posts: 16
    [/quote]We used to display the server, database, and user id you were logged in with on the main form in 3.7[/quote]

    How did you get the name of the server? I tried with a variable with dataType Record and Subtype Server. Then I got access to a function called Server Name. The problem is I then get a list of all my servers, how do I find the one I’m using right now?

    I can see the information about the server in the Database Information but how do I get my hand in this info?

    Thanks
  • madshmadsh Member Posts: 16
    Thx Mr Brummel

    Contexturl solved my problem \:D/
  • WaldoWaldo Member Posts: 3,412
    We created a form that we can customize per company. I mean title and color. The result is something like this:

    http://www.waldo.be/images/TestDB.jpg

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Looks great. Is this started by Codeunit 1?
  • WaldoWaldo Member Posts: 3,412
    Yep ... comes with a setup screen and everything :wink: .

    It's something we deliver for free for each new customer. Makes our life simpler, and avoids many mistakes.

    But before you ask ... I can't deliver you the objects (policy), just the ideas :wink: .

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from Navision forum to Navision Tips & Tricks forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • WaldoWaldo Member Posts: 3,412
    FYI,

    I worked this out in my blog.

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • vikram7_dabasvikram7_dabas Member Posts: 611
    The link which u gave for exe, this is no such exe
    Vikram Dabas
    Navision Technical Consultant
  • garakgarak Member Posts: 3,263
    The link which u gave for exe, this is no such exe

    Do you mean the new link doesn't work?
    Do you make it right, it works too!
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    The link which u gave for exe, this is no such exe
    What link are you referring to?
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • jubeljoyjubeljoy Member Posts: 154
    Good Information..
  • WaldoWaldo Member Posts: 3,412
    I only see a link to that "cmdow" tool ... but that seems to work :|

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • pvarpvar Member Posts: 157
    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:

    I was managed to get this working and it looked great. But as soon as you open a form the title bar changes back to the default title. Is there any way to have the custom title stay in place all the time?
Sign In or Register to comment.