Posts

What does 'Embargo' mean for IT professionals? - Part I

Image
     I am, like any other Windows based developer, extensively use services and software provided by the U.S. companies. But recently I started to see a strange message stating that the country where I live (Belarus now) is sanctioned by the United States and my IP addresses are blocked. So, we can't use their services any longer. Most probably, and I suspect that such decision was made based on the Russia-Ukraine war. Because earlier this year I could open any page on the web site without any issue. But how we, developers, are related to the war or even politician games?  For example, I see the following text on the Pluralsight.com web site: Because your IP address or billing address is associated with a country that is sanctioned by the United States, by U.S. law we are required to block your access to Pluralsight.com. If you believe you are receiving  this message in error, please contact ...@pluralsight.com The exact picture is shown on ...

Windows Installer: A wrong information is displayed in the Add/Remove programs applet

Image
Some time ago I was asked by the developer: what can be a cause when we see an old information in the Control Panel applet for our application? It can be a wrong description, old build version and etc. Well, it depends... First, I took a look at the  Add/Remove Programs tool displays installed programs incorrectly article. The list of OS is pretty old, so I don't think that you find the real cause there. Then I started looking at the source code. Due to the fact that Windows Installer projects were removed from the list of Visual Studio projects, we use WiX toolset for creating installers to deploy the software on other machines. Didn't find anything strange in the XML markup also, so decided to look at the .MSI file itself. The Orca.exe utility is a great help in such cases. See How to use the Orca database editor to edit Windows Installer files for more information. But there I didn't find any possible cause also. All properties were set according to the source f...

Microsoft Word: How to get a selected word when you do a right click

Image
One of the widely spread tasks in word is to get the current word for processing it further. For example, you typed a single word and what to do some actions against it, or search in the dictionary (database) for such entries. I.e. do whatever you need. When you do the right click on the word you may see the context menu with the Synonyms entry: Do you look for a similar implementation? If so, this article will give you a good start! The Word object model provides the Selection class. Unfortunately it doesn't provide any information about the currently selected word, i.e. where exactly the user did the right click. As one of the possible ways, to get the job done you may use the MoveStart* and MoveEnd* methods of the Selection class. I included asterisks intentionally to draw your attention to the fact that you may find other methods / variations useful. So here I will give you the basics. The MoveStartUntil method of the Selection class moves the start position...

Is it possible to move the Windows Apps installation folder to another drive?

Image
Some time ago I moved my system drive to the SSD rails. But getting updates from Microsoft that can take more than 5 Gb at a time I had to keep an eye how much free space is available. Then I started to think what can be removed or moved to another drives. I noticed that a lot of Windows Store Apps are installed and consume a quite big amount of expensive memory. For example, only one of the Store applications takes more than 1 Gb of space on the drive. So, I decided to change the picture dramatically and change the location of Windows Apps. In general, there are two main ways for getting the job done. 1. Change the value of the PackageRoot key in the windows registry.  You can find it in the following hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx Don't forget to restart the machine to apply the changes. That's it. 2. Move the original folder to a new drive and create a symbolic link instead. As a rule the Windows Apps installation f...

Windows Azure Virtual Machines (VMs)

Image
More and more developers nowadays use virtual machines for testing their software or reproducing the real environment for testing. This year I switched to Windows Azure too. Of course, I installed all the required software including a well-known Microsoft Office suite. To save some money I keep the cloud VM turned off for the weekend and keep it working for the working days. But how surprised I was when I switched the VM off and then, after some days of absence, turned it on. Typically you'll  see a dialog for activation the software anew. But not for Windows, only for Microsoft Office : It's allowed to activate the Microsoft Office anew. So, you can click the Next button to see the following window: You have to repeat these steps each time you want to keep the machine off and turn it on when required. There is a difference between turning the virtual machine off in the VM itself or in the Azure Management portal. The first option keeps the machine running under...

VBScript causing Outlook to crash

VBScript is a quite old thing. But a wide range of developers still use it extensively. It's hard to debug the VBScript code, but it's harder to fix an issue. What if you even can't open the Outlook form to change code, for example,  Custom outlook 2010 form with vbscript, causing outlook to crash. is there a way to edit the code without opening the form? . The answer is simple - just hold the SHIFT key pressed when you open the problematic form with a VBScript code. It will not be launched in that case. Viola! You may find more information about VBScript in the MSDN library, see Using Visual Basic to Customize Outlook Forms . And General information about how to use VBScript with Outlook custom forms .

getSuperTip and getScreenTip callbacks are useless in case of Ribbon labels

Image
I have been asked that some callbacks don't work for the labelContol , from the predefined set of Fluent UI controls. The Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3) article from the MSDN library provides the following attributes for the labelControl : enabled getEnabled getLabel getScreentip getShowLabel getSupertip getVisible id idMso idQ insertAfterMso insertAfterQ insertBeforeMso insertBeforeQ label screentip showLabel supertip tag visible As you may see the getSuperTip and  getScreenTip are included in the list. But they don't play any role in case of labelControl. You will never see a screen tip or super tip even for built-in labels, for example: The "Gridlines" and "Headings"don't show tips at all. That's a good indicator that labels don't display screen or super tips. As a workaround you may use a button control where you can set the enabled attribute set to false to get it dis...