<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Virtual Machine &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/virtual-machine/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Mon, 18 Oct 2021 14:54:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Shrink Linux VM Disk Files in VMware Fusion</title>
		<link>https://blog.xojo.com/2021/10/20/shrink-linux-vm-disk-files-in-vmware-fusion/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Wed, 20 Oct 2021 13:00:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[SSD]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=9430</guid>

					<description><![CDATA[Like many Xojo developers, I often use virtual machines for testing. Over time the virtual machine disk files can get pretty large, even if you&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Like many Xojo developers, I often use virtual machines for testing. Over time the virtual machine disk files can get pretty large, even if you delete stuff from within the VM regularly.</p>



<div class="wp-block-image"><figure class="alignright size-large is-resized"><img fetchpriority="high" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.30.06@2x-1024x673.png" alt="" class="wp-image-9431" width="402" height="264" srcset="https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.30.06@2x-1024x673.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.30.06@2x-300x197.png 300w, https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.30.06@2x-768x505.png 768w, https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.30.06@2x.png 1504w" sizes="(max-width: 402px) 100vw, 402px" /></figure></div>



<p>I primarily use VMware Fusion, which lets you shrink the VM disk files if you have a Windows VM. Do this by going to the VM&#8217;s General settings in Fusion and click <strong>Clean Up Virtual Machine</strong>. This will shrink the size of the VM to the actual amount of disk spaces being used by removing the space marked as Reclaimable.</p>



<p>This is useful and I do it regularly for VMs that are on my SSD where space is precious.</p>



<p>However, I also happen to use a lot of Linux VMs, where the option to “Clean Up” is not available to shrink disk size.</p>



<p>Fortunately, you can accomplish the same thing from the Terminal inside the Linux VM.</p>



<p>In my case I am using Linux Mint 20. Here are the steps:</p>



<ol class="wp-block-list"><li>Open a Terminal window.</li><li>Type this command:<ul><li>sudo vmware-toolbox-cmd disk shrink /</li></ul></li><li><a href="https://youtu.be/2iyMf3tlKpU">There is no step 3</a>.</li></ol>



<p>Now you just wait. When it finishes you may want to restart the VM, but that does not appear to be a requirement.</p>



<p>In my case, my Mint VM went from 110GB down to 58GB, a savings of 52GB (!) which is not insignificant on most SSDs. The <a href="https://www.vmware.com/pdf/vmware-tools-cli.pdf">VMware Tools Configuration Utility Guide</a> has more details on what other commands are available. </p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.34.51@2x-1024x742.png" alt="" class="wp-image-9432" width="487" height="353" srcset="https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.34.51@2x-1024x742.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.34.51@2x-300x217.png 300w, https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.34.51@2x-768x557.png 768w, https://blog.xojo.com/wp-content/uploads/2021/10/CleanShot-2021-10-14-at-09.34.51@2x.png 1504w" sizes="(max-width: 487px) 100vw, 487px" /></figure></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Improve Your Project&#8217;s Look &#8211; Windows UI Tips</title>
		<link>https://blog.xojo.com/2018/04/18/improve-your-projects-look-windows-ui-tips/</link>
					<comments>https://blog.xojo.com/2018/04/18/improve-your-projects-look-windows-ui-tips/#comments</comments>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Wed, 18 Apr 2018 10:00:29 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=4126</guid>

					<description><![CDATA[Here are some tips that will help ensure your Windows apps look and feel their best, with Xojo 2018 Release 1 now that Windows apps now have a more stable and flicker-free UI than ever before.]]></description>
										<content:encoded><![CDATA[<p>With Xojo 2018 Release 1 now available, Windows apps now have a more stable and flicker-free UI than ever before. In order to provide these improvements, Xojo and your apps do ask a bit more from Windows. Here are some tips that will help ensure your Windows apps look and feel their best.</p>
<h2>Set Transparent Property for Controls to False</h2>
<p>UI controls now have a Transparent property which determines whether the control is transparent on Microsoft Windows. The default is False for new controls added to layouts. For existing projects and controls, this property is set to True for maximum compatibility.<br />However, controls that have Transparent set to True require more drawing, use more memory and are thus slower. For best results you should set the Transparent property to False for as many controls as possible.</p>
<h2>Consider ContainerControl DoubleBuffer Property</h2>
<p>Set this property to True to reduce flicker on Microsoft Windows when the ContainerControl is scrolled. Otherwise you can leave this to False.</p>
<h2>Avoid Overlapping Controls</h2>
<p>The easiest thing you can do to prevent flickering is to not overlap any controls. Overlapped controls result in more requests to redraw the controls which can result in flickering and slower performance.</p>
<h2>Use a Canvas</h2>
<p>For best results, display any graphics using the Paint event of a Canvas control. Stay away from using the Window Backdrop property, the Window Paint event, the Canvas.Backdrop property or the ImageWell control. Although those techniques work fine in certain situations, they often lead to flickering in more complex window layouts.</p>
<p><del>On the Canvas, the first thing you want to do is turn off the EraseBackground property. The EraseBackground property prevents the Canvas from being erased (and showing as a white rectangle) before it is redrawn, which is another common source of flicker</del>. (<a href="https://documentation.xojo.com/api/deprecated/canvas.html.EraseBackground">Deprecated</a> in Xojo 2019r2) You should also check your usage of the DoubleBuffer property. In many cases you will find you can leave it set to off (False) for best performance.</p>
<p>With these tweaks, you can do all your drawing in the Paint event using the supplied graphics object parameter: g.</p>
<p><strong>Note: Do not do any drawing directly to the Canvas.Graphics property.</strong> This ability was deprecated in 2011 and is strongly discouraged. Drawing in this manner will likely increase flickering and will definitely slow down graphics updates.</p>
<p>You can have separate methods that update the graphics, but they need to be called from the Paint event with the graphics object supplied to the methods as a parameter. Another technique is to have a Picture property that you use to draw you graphics to and then in the Paint event handler you draw the Picture to the Canvas to display it.</p>
<p>When you want the Canvas to update itself, redrawing any changes to your graphics, you call the Invalidate method:</p>
<pre>Canvas1.Invalidate(False)</pre>
<p>You can also call the Refresh method:</p>
<pre>Canvas1.Refresh(False)</pre>
<p>The difference is that Invalidate tells the Canvas to update itself when it gets a redraw request from the operating system. The Refresh method tells the Canvas to update itself immediately. Normally you want to use Invalidate as it results in fewer draw requests, improving performance and reducing flicker.</p>
<p>To reduce flicker, both of the above commands pass False for the EraseBackground parameter (which defaults to True) so that the Canvas is not erased before its updated contents are drawn.</p>
<h2>Remove or Update Older Code</h2>
<p>If you previously had specialized code in your app to help minimize Windows flicker, you should consider removing it as the code may prove to be unnecessary and cause worse performance.</p>
<h2>A Note About Virtual Machines</h2>
<p>Many people run Windows in Virtual Machines. If you do so you&#8217;ll want to ensure that you have the best performance possible. Xojo apps use Direct2D for all screen drawing and not all VM software has properly accelerated graphics drivers for this.</p>
<p>In particular, VMware Fusion has rather poor performance when &#8220;Accelerate 3D Graphics&#8221; is enabled in the Display preferences. For best performance you should make sure that option is turned off.</p>
<p>Alternatively, Parallels Desktop and VirtualBox both seem to have better graphics performance with Direct2D and Xojo apps.</p>
<p>For more information:</p>
<ul>
<li><a href="http://developer.xojo.com/windows-ui-guidelines">Windows UI Guidelines</a></li>
</ul>


<p>*Minor update re: deprecation 3/2021</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.xojo.com/2018/04/18/improve-your-projects-look-windows-ui-tips/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Test Your Apps on Windows for Free</title>
		<link>https://blog.xojo.com/2017/05/22/test-your-apps-on-windows-for-free/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Mon, 22 May 2017 08:50:41 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Remote Debugging]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">http://blog.xojo.com/?p=2773</guid>

					<description><![CDATA[If you are a Mac or Linux developer, one of the easiest ways to test your apps on Windows is to use a virtual machine. And you can test Windows in a VM completely for free by using the test VMs provided by Microsoft.]]></description>
										<content:encoded><![CDATA[<p>If you are a Mac or Linux web or cross-platform developer, one of the easiest ways to test your apps on Windows is to use a virtual machine. And you can test Windows in a VM completely for free by using the test VMs provided by Microsoft.</p>
<p><span id="more-2773"></span></p>
<p>First you&#8217;ll need Virtual Machine software. I prefer VMware Fusion, but the free VirtualBox can be used instead. You can download VirtualBox from here:</p>
<p><a href="https://www.virtualbox.org">https://www.virtualbox.org</a></p>
<p>When VirtualBox is installed, you can head on over to the Microsoft site to get a test copy of Windows pre-configured for VirtualBox:</p>
<p><a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/">https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/</a></p>
<p>Microsoft provides versions of Windows 7, 8.1 and 10 that you can use for testing purposes. Simply download the ones you want and add them to VirtualBox.</p>
<p>You can install the <a href="http://developer.xojo.com/userguide/remote-debugging">Xojo Remote Debugger</a> and use these test versions to test your Xojo apps for Windows. Or you can use these to run Windows-specific web browsers for testing your web apps. Keep in mind that these Windows VMs expire after 90 days, so you&#8217;ll have to re-download periodically.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Virtual Machines Save the Day</title>
		<link>https://blog.xojo.com/2015/08/31/virtual-machines-save-the-day/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Mon, 31 Aug 2015 00:00:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<guid isPermaLink="false">http://blogtemp.xojo.com/2015/08/31/virtual-machines-save-the-day/</guid>

					<description><![CDATA[Virtual Machines are an absolute necessity for anyone developing software, if you have not tried using them, I encourage you to take some time and play around with them. You'll be amazed at how useful they are when developing cross-platform software!]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve <a href="http://www.xojo.com/blog/en/2013/12/remote-debugging-and-virtual-machines.php">blogged about Virtual Machines before</a>, but they are so useful with a multi-platform development tool such as Xojo that they are worth mentioning again. Read on to learn more about Virtual Machines, how to use them and your options when choosing one.</p>
<p><span id="more-342"></span></p>
<h2>What is a Virtual Machine?</h2>
<p>You can think of a Virtual Machine as a software-based computer that you run alongside on your primary computer alongside your main operating system.</p>
<p>For example, right now I am running OS X but I also have two Virtual Machines (VMs) currently running, one with Windows 10 and one with Linux Mint 17.2. These VMs are independent of OS X and for all intents and purposes operate almost exactly like two actual physical computers: one running Windows and another running Linux.</p>
<p>It is incredibly convenient to be able to run multiple operating system configurations on a single computer. For starters, you don&#8217;t actually need multiple physical computers. This saves space, power and heat. It&#8217;s a lot easier to just select a window that contains an independent version of Windows 10 then it is to spin your chair over to a second computer display for a computer running Windows.</p>
<p>Even better, you can easily have multiple VM configurations ready to start when needed. For example, I have over 20 VMs consisting of a variety of Windows versions (Vista, 7, 8.1, 10), a variety of Linux distributions (Linux Mint, Ubuntu, Debian, OpenSuse, etc.) and I even have multiple VMs running versions of OS X (10.7, 10.8, 10.9, 10.11). Of course, you&#8217;ll need to have licenses for the operating systems you want to use, but this is only an issue with Windows as Linux distributions are freely available, as are OS X versions (for people using a Mac at least).</p>
<p>You can use these separate VMs for testing your own apps, testing new software in general or even for testing new beta versions of operating systems, such as OS X 10.11 and Windows 10.</p>
<p><img decoding="async" style="display: block; margin-left: auto; margin-right: auto; width: 262px;" src="https://blog.xojo.com/wp-content/uploads/2015/08/VM.pngt1466486449161ampwidth262" sizes="(max-width: 262px) 100vw, 262px" alt="VM" width="262" /></p>
<h2>Virtual Machine Tools</h2>
<p>There are a variety of VM software tools to choose from. They all work similarly, varying by their integrations with the main (or host) OS, ease-of-use, speed and availability of pre-configured VMs. One particularly nice feature that is available with some is the ability to &#8220;snapshot&#8221; a VM so that you can revert to an earlier state should an update or software installation cause problems. Here is a list of a some that I know of with a few notes:</p>
<ul>
<li><a href="https://www.vmware.com/products/fusion">VMware Fusion</a> (OS X): This is the tool I use. It is updated yearly (v8 was just released) and has support for all major versions of Windows, Linux and OS X. Yes, because VMware Fusion runs on a Mac, it can also run OS X in a VM.</li>
<li><a href="http://www.parallels.com/products/desktop/">Parallels Desktop</a> (OS X): Also updated yearly (v11 was just released), this tool is quite similar to VMware Fusion.</li>
<li><a href="https://www.microsoft.com/en-us/download/details.aspx?id=3702">Virtual PC</a> (Windows): It doesn&#8217;t look like this has been updated in a few years and has probably been abandoned. But it appears to be freely available and was reasonably easy to use when I last worked with it.</li>
<li><a href="https://www.virtualbox.org/">Virtual Box</a> (Windows, OS X, Linux): This one is free and works on all platforms. It is not nearly as easy to use as the others, but it gets the job done.</li>
<li><a style="font-size: inherit;" href="https://www.vmware.com/products/player/">VMware Workstation Player</a> (Windows): A bit more expensive than VMware Fusion, but seems roughly equivalent.</li>
<li><a href="https://www.vmware.com/products/workstation/">VMware Workstation</a> (Windows): Full-feature VM software for business.</li>
</ul>
<p>Virtual Machines are an absolute necessity for anyone developing software, if you have not tried using them, I encourage you to take some time and play around with them. You&#8217;ll be amazed at how useful they are when developing cross-platform software!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Computers For Cross-Platform Development</title>
		<link>https://blog.xojo.com/2015/08/25/computers-for-cross-platform-development/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 25 Aug 2015 00:00:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<guid isPermaLink="false">http://blogtemp.xojo.com/2015/08/25/computers-for-cross-platform-development/</guid>

					<description><![CDATA[Get some advice for choosing a computer for cross-platform development.]]></description>
										<content:encoded><![CDATA[<p>Since we make a popular <a href="http://www.xojo.com">cross-platform development tool</a>, I&#8217;m often asked &#8220;what type of computer should I get for cross-platform development&#8221;?</p>
<p>You might think that can be a tricky question to answer because they are so many different types of computers. But there is only one computer that can run the three major operating systems without violating a EULA: a Mac.</p>
<p><span id="more-260"></span></p>
<p>The truth is that if you want to do cross-platform development and you plan to target OS X, then you need a Mac. There is no other supported way to run OS X. Luckily Macs are actually really good computers. A couple years ago, the Macbook was actually named the <a href="http://www.telegraph.co.uk/technology/apple/10018698/Apples-MacBook-is-best-performing-Windows-laptop.html">best performing Windows laptop</a>.</p>
<p>With a single Mac, you can run OS X of course, plus you can easily run Windows and Linux. I&#8217;ve talked about using <a href="/2013/12/05/remote_debugging_and_virtual_machines/">Virtual Machines</a> for this, which I highly recommend. But a Mac also lets you use Boot Camp to allow your Mac to boot directly into Windows and use it at full speed. I personally don&#8217;t use this as I find rebooting to be rather inconvenient, but Boot Camp is free and has recently been <a href="https://support.apple.com/en-us/HT204990">updated to support Windows 10</a>.</p>
<p>Remember, if you already have Windows 7 or newer, you can <a href="../../../com/xojo/blog/windows-10-is-here.html">upgrade to Windows 10 for free</a>. And Microsoft even <a href="http://dev.modern.ie/tools/vms/mac/">provides free VMs for testing Internet Explorer and Edge</a> that work great as a test VM for cross-platform development.</p>
<p>On the Linux side, most distributions are free so it is easy to try them. I have about 20 Linux VMs set up, but personally I like <a href="http://www.linuxmint.com/">Linux Mint</a> because it installs quickly, is fast and easy to understand.</p>
<p>So, on a Mac you can use Virtual Machine software (<a href="http://www.vmware.com/products/fusion">Fusion</a>, <a href="http://www.parallels.com/products/desktop/">Parallels Desktop</a> and <a href="https://www.virtualbox.org/">VirtualBox</a>) to run Windows and/or Linux on top of OS X, giving you easy access to all three major operating systems.</p>
<p>But what if you just don&#8217;t like OS X and don&#8217;t want to use it as your primary computer? In that case, your best option is to get the best computer for your primary OS and then pick up a Mac mini (maybe even a used one) that you can use for OS X testing and <a style="font-size: inherit;" href="http://developer.xojo.com/ios-guide">iOS development</a>. You can still use VM software on Windows to run Linux or run Windows in a VM on Linux. Or you can dual-boot.</p>
<p>It may also be possible to run OS X in a VM with Windows (or Linux) running in Boot Camp, but I haven&#8217;t tried that. It might still be against the OS X EULA, though.</p>
<p><a href="https://system76.com/">System76</a> has some nice computers (laptops and desktops) that are pre-configured for Linux. I&#8217;ve not used them, but I&#8217;ve heard good things about them from people in the Xojo community.</p>
<p>My only Windows computer is an <a href="/2015/02/13/hp_stream_7_and_xojo/">HP Stream 7</a> (not a good development machine), so I&#8217;m not the best person to recommend something for people that prefer Windows. If you have some good suggestions, leave them in the comments.<img decoding="async" style="width: 282px; float: right; margin: 5px 0px 0px 5px;" title="atari st computer" src="https://blog.xojo.com/wp-content/uploads/2015/08/Atari_1040STf.jpg" alt="atari st computer" width="282" align="right" /></p>
<p>Other things to keep in mind when getting a computer for cross-platform development:</p>
<ul>
<li><strong>SSD</strong>! Do not skimp and get a hard drive. An SSD (solid-state drive) is by far the best performance enhancement you can get. If you can&#8217;t afford a new computer, then add an SSD to the one you have.</li>
<li><strong>More RAM</strong>. If you run lots of VMs at once, you&#8217;ll need lots of RAM. Each VM will want at least 1GB, some will need 2GB and others may need more. VMs can quickly eat up RAM.</li>
</ul>
<p>And a few other things to make software development more pleasant:</p>
<ul>
<li><strong>Large screen</strong>. Sure, laptops are popular, but when working at a desk nothing beats having a nice large screen to spread out your apps and windows.</li>
<li><strong>Good speakers</strong>. Doesn&#8217;t everyone <a href="../../../com/xojo/blog/music-while-you-code.html">listen to music while working</a>? I enjoy the <a href="https://www.bose.com/products/speakers/stereo_speakers/companion-20-multimedia-speaker-system.html">Bose Companion 20</a> speakers. They take up little room and sound great for the type of music I listen to.</li>
<li>Comfy chair. I use a <a href="http://www.staples.com/Tempur-Pedic-TP9000-Ergonomic-Mesh-Mid-Back-Task-Chair-Black/product_324021">Tempur-Pedic Office Chair</a>.</li>
<li>No, the <strong>Atari ST</strong> in the picture would not make a good development computer (although it was in its day). You can <a href="http://aranym.sourceforge.net/">emulate it if you want</a>, though.</li>
</ul>
<p>Interested in cross-platform development? Xojo lets you build native apps for Mac, Windows, Linux, the web and iOS. Oh, and Raspberry Pi support is coming in our next release!</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
