ExpressionMaximizer

A bigger expression shape window is a feature that almost always appears on “next version of BizTalk wish lists”.

Every time Microsoft releases a new version of BizTalk we are all very disappointed that they did not make the expression window resizable or at least bigger.

There are rumors that this is done to discourage developers to write a lot of code in those windows and move to external assemblies with helper classes instead.

Although I agree with that I still think it would be very nice to have a bigger window occasionally.

Like the “Orchestration Variable Retriever Functoid” this was on my “experimental things to do list” for a long time. I never had or took the chance to try it until BizTalk king Stephen W. Thomas announced his competition for the best BizTalk tip or trick.

Of course I want to join this competition so I started coding. Now that it is finished I must admit it has become quite a hack but it seems to work :-) .

Anyway the “ExpressionMaximizer” will be my entry for the competition.

A quick walkthrough:

I have an orchestration with an expression shape containing a lot of code:

orchestration

I double click the expression shape to open it (in normal mode):

normal_expressionwindow

With expression window still open I press CTRL+SHIFT+ALT+M (nice key combination :-) ) and ……:

maximized_expressionwindow

I have a big expression window where I can type many long lines of code!!!!

Everything is back to normal when you close the window and open it again.

Note that you first have to open the expression shape before pressing the key combination.

Want to try it yourself?
(description below is based on Visual Studio 2008)

- Download this zip file and extract it somewhere.
- Click ‘Tools’ –> ‘External Tools…’
- Press the ‘Add’ button
- Type a title, e.g. ‘Expression Window Maximizer’
- Fill in the command text box by browsing to the extracted ‘ExpressionMaximizer.exe’

ExternalTools

- Press the ‘OK’ button
- Select ‘Tools’ –> ‘Customize…’
- Press the ‘Keyboard…’ button
- In the ‘Show commands containing:’ text box type ‘Tools.External’
- Select the correct ‘Tools.ExternalCommandX’ from the list. (You need to find out the correct entry by counting the external tools in the Tools menu).
- Click in the text box ‘Press shortcut keys:’ to set the focus to it.
- Press CTRL+ALT+SHIFT+M
- Click the ‘Assign’ button.

Customize

- Press the ‘Ok’ button.
- Press the ‘Close’ button.

I tried this on ‘Windows Server 2008 R2/VS2008′ and ‘Windows Server 2003 R2/VS2005’ without problems but I still take no responsibility for malformed windows or other disasters :-) After all it is a big hack!

If you’re interested you can find the (VS2008) source code here.

4 Responses to “ExpressionMaximizer”

  1. Lucas Vogel says:

    That’s pretty cool! Good work!

  2. Leonid Ganeline says:

    Hi Randal,

    I installed it in WinXP/VS2005/BTS2006 (right, I have to use all this … :( )
    I’m getting the Extended Window but cannot see the OK and Cancel buttons.
    Esc (aka Cancel) works fine.
    But I cannot access the OK button. My feeling is to use some keyboard shortcut to get OK, but cannot find the right one. Could you, please, give me a clue, what keys I can use to access the OK button?

    Thanks!

    • Randal van Splunteren says:

      Hi Leonid,

      I’ve encountered the same on other versions of OS. This probably has to do with you running on WinXP. Can you help me by running a tool SPY++ on your box?
      If used wininspector myself. These tools allow you the see the internal name of the buttons on the expression window. The code in the expression maximizer depends on those names.

      I think the name of the controls you mention are a little different between the different OS versions.

      We might need to change the code in the ‘WindowsEnumProc’ method in program.cs to be able to move buttons on Windows XP.

      Please let me know thanks!

Leave a Reply