# Monday, 23 October 2006

When I was still a kid I enjoyed creating stuff from paper or carton. A bit of glue and scissors and lots of fun. Also origami was something I enjoyed and it wouldn't be the first time I folded a Crane.

I stumbled upon this site today but I did find a great resource of paper models and origami that you can print out and fold. Boy, why didn't this stuff exist 20 years ago?

Well, here's the link to the good stuff: http://cp.c-ij.com/english/3D-papercraft/.

If someone knows where I can find a tutorial on creating a paper/carton clock please tell me.

Update: Malcolm Metzler emailed me with this link: http://www.yamaha-motor.co.jp/global/entertainment/papercraft/index.html. Looks great.

Grz, Kris.

Monday, 23 October 2006 15:46:20 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

Setting the Width property of a control in ASP.NET is mostly done in the properties pane or by declaratively setting it in the markup. However sometimes you want to set it in code. This can be done by using the Unit structure.

I crafted some small example that you can run to play around with the different UnitType enumerations. Possible choises are:

Cm Measurement is in centimeters. 
Em Measurement is relative to the height of the parent element's font. 
Ex Measurement is relative to the height of the lowercase letter x of the parent element's font. 
Inch Measurement is in inches. 
Mm Measurement is in millimeters. 
Percentage Measurement is a percentage relative to the parent element. 
Pica Measurement is in picas. A pica represents 12 points. 
Pixel Measurement is in pixels. 
Point Measurement is in points. A point represents 1/72 of an inch. 

The sample provided here loops over the possible unit types and fills up the dropdownlist. The second textbox is used to fill in an amount to set the Width of the first textbox control to. If you don't fill in an amount it automatically defaults to 30.

    1 <%@ Page Language="C#" %>


    3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    5 <script runat="server">


    7     protected void Page_Load(object sender, EventArgs e)

    8     {

    9         if (!Page.IsPostBack)

   10         {

   11             // Set the original width to 300 pixels

   12             TextBox1.Width = new Unit(300);


   14             // Loop over the possible unit types

   15             foreach (string s in Enum.GetNames(typeof(UnitType)))

   16                 DropDownListSelectUnitType.Items.Add(Enum.Format(typeof(UnitType), Enum.Parse(typeof(UnitType), s), "G"));

   17         }

   18     }


   20     protected void Button1_Click(object sender, EventArgs e)

   21     {

   22         // Obtain the chosen width, if it's not filled it default to 30

   23         int width = !String.IsNullOrEmpty(TextBoxSetWidth.Text) ? Convert.ToInt32(TextBoxSetWidth.Text) : 30;


   25         // Obtain the chosen unit type

   26         UnitType type = (UnitType)Enum.Parse(typeof(UnitType), DropDownListSelectUnitType.SelectedItem.Text, true);


   28         // Use the Unit structure to set the width of the textbox

   29         TextBox1.Width = new Unit(width, type);

   30     }

   31 </script>


   33 <html xmlns="http://www.w3.org/1999/xhtml" >

   34 <head runat="server">

   35     <title>Untitled Page</title>

   36 </head>

   37 <body>

   38     <form id="form1" runat="server">

   39     <div>

   40         <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />

   41         <br />

   42         <br />

   43         Width: <asp:TextBox ID="TextBoxSetWidth" runat="server" Width="40px"></asp:TextBox><br />

   44         Type: <asp:DropDownList ID="DropDownListSelectUnitType" runat="server">

   45         </asp:DropDownList><br />

   46         <asp:Button ID="Button1" runat="server" Text="Set Textboxes width" OnClick="Button1_Click" />

   47     </div>

   48     </form>

   49 </body>

   50 </html>

Grz, Kris.

Monday, 23 October 2006 11:05:53 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

I installed IE7 last week and really enjoy it. This morning I took a look at the on10 site of Microsoft and saw the video about addons for IE. I like the inline search capability of FireFox and when I saw there's an addon for IE available I immediately installed it. It's a bit of a shame that it isn't the default search functionality in IE but the addon does the work :-).

Taken from the website: Inline Search is an extremely useful free add-on for Internet Explorer that mimics Firefox's search behavior, it turns searching into a Web page into a non modal research experience coupled with a search as you type facility. It integrates flawlessly into IE (version 5.5 or above), giving it that little extra that makes you a lot more efficient when you are looking for a specific piece of information.

You can download the addon here.

Grz, Kris.

IE | Tools
Monday, 23 October 2006 09:40:02 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Sunday, 22 October 2006

I develop on several different pc's like the one that's provided by the customer, my laptop, ... I'm one of those people that likes their custom added keyboard shortcuts, custom color markup in the code. Loosing these settings, or having to set them all again when changing to another computer, would be cumbersome and a waste of time. Luckely for us Visual Studio 2005 provides the ability to export these settings and import them on another computer.


Go to Tools | Import and Export Settings... and the following screen will appear (Figure 1):

Figure 1: Import and Export Settings Wizard

Choose Next and the following screen will be displayed:

Figure 2: Select the settings to export

Check all the settings you want to export and choose Next. In the next step you can provide the location and name for the exported settings:

Figure 3: Specify a name for the exported settings and a location

Choose Finish the wizard will export all your settings. Now you just copy the generated file to your other pc and follow the Importing steps.


Go to Tools | Import and Export Settings... The screen of Figure 1 will display. Choose Import selected environment settings and click Next. You get another possibility to first backup the current settings of the new computer. If it's your computer you can decide to not backup the current settings but if it's a pc that's also used by others its a wise precaution to backup first!

Figure 4: Possibility to backup the current settings before importing new settings. 

Then you select the settings you want. In this example I chose the exported settings:

Figure 5: Select the settings to import

Figure 6: Select settings to import

After that you choose Finish and let Visual Studio 2005 import the settings.

Grz, Kris.

kick it on DotNetKicks.com

Sunday, 22 October 2006 15:05:16 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

I was unaware of this at first, which gave me some frowns on my face when I found out the hard way, but results in SQL Server Management studio are truncated to a certain amount of characters. Normally you won't notice this but when a certain line exceeds that amount you'll notice the truncated text. I experienced it while concatenating several columns casted as varchars.

By default the maximum amount of characters is 256 but you can easily edit this setting by going to Tools | Options. There you set a higher number of maximum displayed characters in the right lower corner of the screen when you navigate to Query results |SQL Server | Results to Text (or to Grid):


Grz, Kris.Recenet

kick it on DotNetKicks.com

Sunday, 22 October 2006 14:22:30 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, 19 October 2006

I've been using IE7 since the betas and really liked the new version. Especially the tabbed pages and the overview that you can take of all open windows on 1 page is a great experience. I don't really use the built in RSS capabilities at the moment as I use GreatNews to read my subscribed feeds. The integrated search and the possibility to select a different search engine is something I was fond of when using FireFox. Now it's also integrated in IE.

You can download IE7 or take a tour of the features here: http://www.microsoft.com/windows/ie/default.mspx.

Grz, Kris.

IE | Windows
Thursday, 19 October 2006 08:34:56 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, 11 October 2006

Just noticed on the blog of Microsoft watch that there's a a comparison made, by Microsoft, for their own Visual Studio to Dreamweaver (former Macromedia, currently Adobe).

The comparison page can be found here.

Grz, Kris.

Wednesday, 11 October 2006 08:01:31 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, 02 October 2006

Just saw on the Belgian MSDN site that Kurt Claeys, a member of VISUG like me, wrote an article about State machine workflows in Windows Workflow Foundation. Last week we both attended the .NET 3.0 Framework Development event.

Nice to see that he describes the state machine side of WF. Ingo Rammer did a great explanation about creating workflows on the event but didn't show state machines during his speech.

Grz, Kris.

kick it on DotNetKicks.com

.NET 3.0 | WF
Monday, 02 October 2006 20:44:12 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 

Currently I drive an Audi A4 and am very satisfied of that car. Luckely because I drive about 1000 - 1200 km / week for my work.

Well, I just found out about this new Audi R8 thanks to Coolz0r's blog. Man does this car look hot or what? I would certainly like to testdrive this one myself.

Grz, Kris.

Monday, 02 October 2006 19:37:38 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [3]  | 
# Friday, 29 September 2006

Hmm, I hope the marketing guys of Microsoft aren't going to keep renaming Atlas. I already found it hard enough to not speak about Atlas anymore but of Microsoft AJAX. Seems it's renamed again. Read my former post about the renaming of Atlas.

Here's the new naming for the moment:

  • Microsoft AJAX Library:  The client-side Javascript library (i.e., all the .js files) that works with any browser and also supports any server-side framework, not just ASP.NET.
  • ASP.NET 2.0 AJAX Extensions: The server-side functionality that seamlessly integrates with ASP.NET and uses the same programming model familiar to existing ASP.NET developers.
  • ASP.NET AJAX Control Toolkit: The set of free, shared source controls and components that currently form the "Atlas" Control Toolkit community project hosted on CodePlex.
  • ASP.NET AJAX = Microsoft AJAX Library + ASP.NET 2.0 AJAX Extensions.

    Grz, Kris.

  • Friday, 29 September 2006 07:09:46 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  |