Tips for Writing Windows 8 apps on a Mac


My current home Windows development set-up is actually a 15” MacBook Pro with Retina display. I use Parallels to run Windows 8.1 as a virtual machine, and keep it on an external WD Passport drive, which is connected over USB3. This is certainly speedy enough for me, and it’s nice to have a complete Windows system on a drive I can carry around with me and use on other computers when I need to. An SSD based external Thunderbolt drive would be even nicer of course, but so far this seems good enough.

 

I prefer not to use Coherence mode, and instead keep the virtual PC in a full-screen window of its own.

After working on a few projects, I’ve a few tips for you if you are considering the same set-up. And if you too have been working on Windows on your own Mac, please feel free to share your experiences! 

Copy and Paste

Remember that Copy and Paste will work between the Windows and PC sides. This means you can keep Safari open to browse MSDN say, and when you find some good sample code, you can copy it, swipe over to the Windows screen and paste it right into your app. I find the three-finger trackpad swipe to swap full-screen views on the Mac a quick way to navigate, and keeping everything separate prevents cluttering by trying to have too much on screen at once.

Sharing 

As mentioned in a previous post, complete file sharing of the desktop between Parallels and Windows can lead to issues with Visual Studio, and where it places its files and where it can run them from. I wouldn’t recommend it. 

Quit it

When developing a Windows app and running the code on the local machine, it can feel a little awkward to try and get back to Visual Studio in order to quit the app and start coding again. In fact, there doesn’t appear to be an ideal way to quit the test app and get immediately back to Visual Studio in one go.

The nearest I get is to press Command and Q, which gets back to the Start screen and then Command and D to return to the desktop and Visual Studio. Sometimes I add a “secret” button to my app called QUIT, and have it do Application.Current.Exit(); when the user clicks on it. Again, this only dumps me back to the Start screen, so if you have a better way, please let me know! 

Keyboard Shortcuts

One thing I like about using Parallels to run Windows is that the keyboard shortcuts are handled in a way which doesn’t make me go completely mad. Command and C (copy on the Mac) also works as Copy in the PC. If I had to keep swapping between Command and Control I think I’d lose it.


The one issue is that as the Command key is mapped to the Windows key, it means you lose the default Windows key shortcuts. Windows and C to bring up the Charms for example, or Windows and Z to bring up the App Bar.

Parallels lets you press alt/option at the same time as Command and a shortcut key to get around this: so to open Charms, hold down alt/option, Command and C. It’s a small price to pay, and when you are using a MacBook lacking a touch screen, these keyboard shortcuts are invaluable.

 

Any other tips for Mac/Window weirdos? 😉

Comments (3)

  1. Alex says:

    I went for the Bootcamp option instead - boots pretty quickly.

  2. At several events I've seen MacBooks exclusively running Windows, so you aren't alone in that!

  3. David Morrison says:

    If there is a difference in boot speed for Boot Camp and Windows in a virtual machine, it's not noticeable.

Skip to main content