It is very simple; just follow the instructions of this article:
But there is a gotcha: if you don't connect your MacBook to the power outlet, you will never be able to use the external display.
To content | To menu | To search
Saturday, May 16 2009
By letiemble on Saturday, May 16 2009, 10:55 - Apple
Thursday, February 1 2007
By letiemble on Thursday, February 1 2007, 16:18 - DotNet
Maybe you have already seen that in some Visual Studio 2005 projects : a item that represents a link to a file (see image below).
It is very handy to reference through a link a file : for example, if you have three projects that uses the same file, just put a link. But when I add item to my project, I cannot see a Link or a similar option. This is because it is a bit after. Here are the steps :
1) Go to the Solution Explorer
2) Select "Add an Existing Item"
3) Select the file to add and click on the arrow at the right of the button "Add", and click on "Add as Link"
4) In Solution Explorer, you see the linked file
Friday, December 8 2006
By letiemble on Friday, December 8 2006, 08:31 - DotNet
A nice feature of Visual Studio 2005 is the ability to group source files by dependencies. This is what Visual Studio 2005 does when it creates a Form class or a visual control : a dependent file named from the class name is created and linked to the primary source file (as shown in the picture below).
Now imagine that you have a very complicated visual control with a lot of properties, methods and events. It would be nice to split all these things in tiny source files, to make the source code browsing easier (as shown in the picture below).
Unfortunately, there is no option do apply the same treatment to arbitrary files in the project. That's why I have created a Visual Studio 2005 Addin to allow dependent files for any arbitrary files. It is quite straightforward, but the result is a cleaner project tree and an ease of code navigation.
Here are the steps :
UserControl1.Properties.cs. I use this convention to mirror what Visual Studio does.Tools/Add Dependent Files menu. Select one or more dependent files.Download the Add Dependent Files Addin.
Tuesday, November 28 2006
By letiemble on Tuesday, November 28 2006, 08:05 - DotNet
If you are developping an application base on the Microsoft RTC API, a big surprise is awaiting you with Windows Vista. The installation of the RTC API miserably failed, because of lack of privileges. The result is that the RTC side-by-side assemblies are not available, thus the application does not want to start. Crawling through the forums doesn't help much. So what can you do to make this application work ? Here is an answer.
The basic idea is that if the RTC side-by-side assemblies cannot be installed, then they have to be deployed within the application, thus making the application isolated. MSDN is a great source of knowledge about isolated applications and side-by-side assemblies. To avoid any problem during the library lookup, the workaround also uses tips about the assembly searching sequence.
To deploy side-by-side assemblies to be used with an isolated application, we must copy them in the same folder that the application exectuable. The naming of the Manifest files is important to enable a proper lookup. The last trick is to force the local resolution of the DLLs, by indicating that no system-wide search is needed. Now that you have the full picture, here are the details.
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Networking.Dxmrtp_6595b64144ccf1df_5.2.1002.3_x-ww_021cfae0\dxmrtp.dll
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Networking.RtcDll_6595b64144ccf1df_5.2.1002.3_x-ww_92561fce\rtcdll.dll
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Networking.RtcRes_6595b64144ccf1df_5.2.1002.3_x-ww_88ef1b2a\rtcres.dll
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Networking.Dxmrtp_6595b64144ccf1df_5.2.1002.3_x-ww_021cfae0.Manifest
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Networking.RtcDll_6595b64144ccf1df_5.2.1002.3_x-ww_92561fce.Manifest
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Networking.RtcRes_6595b64144ccf1df_5.2.1002.3_x-ww_88ef1b2a.Manifest
x86_Microsoft.Windows.Networking.Dxmrtp_6595b64144ccf1df_5.2.1002.3_x-ww_021cfae0.Manifest becomes Microsoft.Windows.Networking.Dxmrtp.Manifest
x86_Microsoft.Windows.Networking.RtcDll_6595b64144ccf1df_5.2.1002.3_x-ww_92561fce.Manifest becomes Microsoft.Windows.Networking.RtcDll.Manifest
x86_Microsoft.Windows.Networking.RtcRes_6595b64144ccf1df_5.2.1002.3_x-ww_88ef1b2a.Manifest becomes Microsoft.Windows.Networking.RtcRes.Manifest
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Networking.RtcDll"
version="5.2.1002.3"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
local extension. If your application executable is WindowsApplication.exe, the empy file should be named WindowsApplication.exe.local.Saturday, November 18 2006
By letiemble on Saturday, November 18 2006, 14:38 - Virtualization
If you already have used VMWare Player, you must have noticed that it is perfect to play existing virtual machine. But if you want to create a new virtual machine from scratch, you have to dig in the vmx file, create a blank virtual hard disk (using QEMU for example) and do various things. But, an easy way to do exists. As VMWare now offers VMWare server for free, the basic idea is to use it and its console to create new virtual machines. The console has a very handy creation wizard that helps a lot. So if you want to create various virtual machine, then VMWare server is a simple and free solution.
Thursday, October 5 2006
By letiemble on Thursday, October 5 2006, 19:04 - DotNet
Maybe you have just spotted the following problem with Visual Studio 2005 : you can create an abstract form, which inherits System.Windows.Forms.Form, and modify it in the visual designer. But if you inherit it, you cannot modify it in the visual designer. You think it is kind of strange, but the explanation is pretty clear. And so is the workaround. You are now armed to modify visual control, even if they inherit from an abstract control.
But the things are slightly different when dealing with generics : you can create a generic form and modify it in the visual designer. But if you create a specialized child of this form, the visual designer refuses to open it. Even with the previous trick, there is nothing to do. After some search and some experiment, I came to the conclusion that the behaviour of the CodeDomDesignerLoader is far away from my understanding. So, are we lost in space when dealing with generic controls ?
No. The workaround to this behaviour is pretty ugly, but it has one huge advantage : it works. So here is an example.
1 using System.Windows.Forms;
2
3 namespace AbstractAndGeneric
4 {
5 public partial class GenericForm<T> : Form
6 {
7 public GenericForm()
8 {
9 InitializeComponent();
10 }
11 }
12 }
1 using System;
2
3 namespace AbstractAndGeneric
4 {
5 public partial class SpecificForm : GenericForm<String>
6 {
7 public SpecificForm()
8 {
9 InitializeComponent();
10 }
11 }
12 }
1 using System;
2
3 namespace AbstractAndGeneric
4 {
5 #if DEBUG
6 public partial class SpecificForm : __SpecificForm
7 #else
8 public partial class SpecificForm : GenericForm<String>
9 #endif
10 {
11 public SpecificForm()
12 {
13 InitializeComponent();
14 }
15 }
16
17 #if DEBUG
18 public partial class __SpecificForm : GenericForm<String>
19 {
20 }
21 #endif
22 }
The explanation is straighforward :
This is the solution I found, but I am looking forward to see an alternative solution, simpler and more elegant.
Wednesday, October 4 2006
By letiemble on Wednesday, October 4 2006, 14:37 - Internet
More and more software are distributed on ISO images and to install them, you must burn CDs, and launch the installation. While it is great if you like to store tons of CDs, or even if you are using a rewritable medium, it is a bit clumsy and totally avoidable. Here is how.
For illustration purpose, I will use the example of the MSDN Library. The library is available for download under three ISO images. Once the three images are downloaded, you have to burn three CDs in order to install the library. Eh, wait a minute !!! Don't do that !!! What about a virtual CD drive ?
In fact, Microsoft has release a small tool called Windows XP Virtual CD Control Panel. This small tool allows to define one or more virtual drive, and to mount ISO, CDFS, Joliet, and UDF images. Once the image is mounted, it appears as a loaded drive that is recognized like any other physical drive.
Let's get back to my example. I create a drive and mount the first image of the install. When the installer requires the second disk, I unmount the first image and mount the second. The image swap last less than ten seconds.
Believe me, it's a valuable trick that can save you a lot of time : no more burning and lengthy disk swapping.
Friday, March 24 2006
By letiemble on Friday, March 24 2006, 08:55 - Java
When dealing with message folder, the temptation is strong to re-invent the wheel when it comes to make a search through its messages. One evident solution is to grab all the messages, test against the criteria, and if the message matches, store it for further need.
Since JavaMail 1.1, a search facility has been provided. It is located in the jaxax.mail.search package. To make a complex search, you just create the needed search terms and compose them with a AND or OR operator. The next step is to call the magic method on the message folder : Folder.search(SearchTerm term) that returns an array of Message instance.
It may be look weird to add such complexity to a simple search in a mail folder, but when it comes to term composition, this solution is the most flexible and above all, when you look at your code, the nicest one.
Friday, January 27 2006
By letiemble on Friday, January 27 2006, 07:30 - DotNet
While coding Windows Forms application with .NET framework 1.1, I wanted to have an icon in the Windows systray. While it seems easy as there is a NotifyIcon class in the framework, it doesn't support the ballon tips. The support was only introduced in the .NET framework 2.0 but if you are stucked with the release 1.1, you have to find another way.
Fortunatly, Hans Blomme has done the job of providing a component that mimics the NotifyIcon class, with a support for balloon tip.
While looking at the code, I saw that the icon displayed in the balloon tip cannot be the application icon. After looking at the MSDN Library for the NOTIFYICONDATA structure, I saw that Windows XP SP2 and later add the ability to display the application icon in the balloon tip. So, if you want to add this capability, just modifiy the Hans Blomme's code as follow :
Once done, you will have an additionnal choice when choosing which icon to display in the balloon tip : the application one.