Bite my bytes

What I learn by day I blog at night.

  Home :: Contact :: Syndication  
  809 Posts :: 4248 Comments :: 235 Trackbacks

Search

Recent Comments.

Recent Posts

Most popular posts
in last 90 days

Categories

My Projects

Archives

Stuff


Copyright © by David Vidmar
 
Contact me!
 
LinkedIn Profile
 
 

Sunday, November 30, 2008 #

Development

Fun

  • Jon Skeet Facts? - Some developer humor. If you are not programmer, DO NOT CLICK THIS LINK!

Photography

Project management

Software

Software Updates

Sunday, November 30, 2008 11:00 PM, 1 comment(s)

Sunday, November 23, 2008 #

Development

Design

Fun

Photography

Software

Web

  • Cameroid - Use your webcam to take photos online!

Software Updates

Jobs

HiddenNetwork.com Banner

Sunday, November 23, 2008 10:07 PM, 1 comment(s)

Monday, November 17, 2008 #

Design

Graphics

Humor

Software

  • SystemExplorer Homepage - Free system management tool. Process Explorer + AutoRuns + Services + Open Files + ...
  • Balsamiq Mockups Home - Software for designing software mockups. Also available as Jira & Confluence add-ins. Not free.

Webdesign

Software Updates

Jobs

HiddenNetwork.com Banner

Monday, November 17, 2008 11:09 PM, 0 comment(s)

Saturday, November 15, 2008 #

If you get this error when trying to connect to your Home Server using Windows Home Server Console, welcome to the club.

When Googling you’ll find all kinds of advices to reinstall Connector software or even whole server. Luckily, all of those are wrong.

It turns out that all other components, like shared folder and backup connect to server using NETBIOS, but Console is using DNS resolution.

Sometimes (!) that resolves to server.your-isp.net or similar.

Solution? Stick servers IP in hosts, and restart!

Saturday, November 15, 2008 9:42 PM, 0 comment(s)

Sunday, November 09, 2008 #

Development

Shopping

Software

Software Updates

Jobs

HiddenNetwork.com Banner

Sunday, November 09, 2008 9:39 PM, 0 comment(s)

Wednesday, November 05, 2008 #

I can't remember last time I have seen all my emails take care of! I just had to share this with the world...

image

Wednesday, November 05, 2008 11:41 PM, 0 comment(s)

Phew! It's been a while since I posted some code here! Here goes...

I had a modest request from a part-time-UI-designer of application I'm currently working on. He wanted watermarked input boxes as we sometimes see on the web, except that he wanted them in desktop application.

So instead of something like this:

image

We would have this:

 image

Fair enough, I liked it.

I immediately started thinking about Enter and Leave events and overlaying Label control over TextBox control and I had a good starting point with my old LinkTextBox control.

But, man, I'm glad I googled before I started coding. It turns out, the feature is only SendMessage away.

So here are two implementations:

First one is done with subclassing  and creating WatermarkTextBox.

class WatermarkTextBox : TextBox
{
    private const uint ECM_FIRST = 0x1500;
    private const uint EM_SETCUEBANNER = ECM_FIRST + 1;

    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
    static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, uint wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);

    private string watermarkText;
    public string WatermarkText
    {
        get { return watermarkText; }
        set
        {
            watermarkText = value;
            SetWatermark(watermarkText);
        }
    }

    private void SetWatermark(string watermarkText)
    {
        SendMessage(this.Handle, EM_SETCUEBANNER, 0, watermarkText);
    }       

}

Other one is a simple Extension Method.

public static class TextBoxWatermarkExtensionMethod
{
    private const uint ECM_FIRST = 0x1500;
    private const uint EM_SETCUEBANNER = ECM_FIRST + 1;

    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
    private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, uint wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);

    public static void SetWatermark(this TextBox textBox, string watermarkText)
    {
        SendMessage(textBox.Handle, EM_SETCUEBANNER, 0, watermarkText);
    }

}
Wednesday, November 05, 2008 11:36 PM, 0 comment(s)

Tuesday, November 04, 2008 #

While checking news about Live Mesh for Mac I realized that Live Mesh is finally available outside US.

That's great news, but why didn't MS notify me as they promised when I signed up for beta?!

Can't wait to put Live Mesh through some serious testing. This should be a kick as tool!

Tuesday, November 04, 2008 7:46 AM, 0 comment(s)

Monday, November 03, 2008 #

Development

  • SVN-Monitor
  • dbdeploy - Database Change Management Tool
  • Selenium IDE - "... integrated development environment for Selenium tests. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests."

Music

Photography

Software Updates

Jobs

HiddenNetwork.com Banner

Monday, November 03, 2008 6:59 AM, 0 comment(s)

Saturday, November 01, 2008 #

There are lots of instructions out there on how to dual-boot Windows Vista and Windows XP, but if you chose Windows Server 2008 as a OS of choice, things are a bit different. To simplify things for following installations of this kind, here are my notes.

  1. Install Windows Server 2008 and leave some free space for Windows XP partition
    or 
    Make room for Windows XP.
  2. Install Windows XP
  3. Boot into Windows Server 2008 installation DVD
  4. Run command prompt and fix Vista's boot records
    C:
    cd \boot
    bootsect /nt60 c: /force
    bootrec /rebuildbcd

    (trick: "my" copy of Windows Server 2008 64-bit doesn't have bootsect.exe and bootrec.exe in C:\boot, so I had to run above commands from boot folder on DVD!)
  5. Download EaysBCD, add Windows XP, reboot and you're good to go.

Point 4. is where Server 2008 and Vista differ. Painful, but it works.

Saturday, November 01, 2008 8:45 AM, 0 comment(s)

Sunday, October 19, 2008 #

Development

Software

Software Updates

Jobs

HiddenNetwork.com Banner

Sunday, October 19, 2008 9:51 PM, 4 comment(s)

Monday, October 13, 2008 #

image With SQL Server 2008 came new version of MS SQL Server Management Studio that added much anticipated IntelliSense, but even now it's not putting products like SQL Assist or SQL Prompt out of market and it doesn't work with pre-2008 databases even if you use latest Management Studio.

If you would like some more power features in Management Studio, new version of previously mentioned SSMS Tools Pack from Mladen of I want some moore fame is your poison.

My favorite features include:

  • query history,
  • insert statement generation,
  • CRUD statement generation,
  • full database search,
  • running single script on multiple databases,
  • new query template.

But there is more, depending on your needs.

Monday, October 13, 2008 10:04 PM, 3 comment(s)

Sunday, October 12, 2008 #

Development

Cooking

Photography

  • How to Geotag Images - How to automatically geotag images using GPS's track. Hey, big I, give me my GPS back! ;)

Software

System

Software Updates

Jobs

HiddenNetwork.com Banner

Sunday, October 12, 2008 9:49 PM, 1 comment(s)

Sunday, October 05, 2008 #

Development

Games

Kids

  • How to nap - With two kids, we seriously need some sleep management, asap.

Local

  • Meteoalarm - Alerting Europe for extreme Weather

Photography

Software

Webdesign

Software Updates

Jobs

HiddenNetwork.com Banner

Sunday, October 05, 2008 11:47 PM, 2 comment(s)

Friday, October 03, 2008 #

If you get this error while trying to access MSDN subscriptions section you might be victim of a bug of latest update to MSDN site that was done in late September 2008.

The Windows Live Network is unavailable from this site for one of the following reasons:

  • This site may be experiencing a problem
  • The site may not be a member of the Windows Live Network

Clearing cookies and logging in again should fix the situation.

 

image

Friday, October 03, 2008 9:23 AM, 0 comment(s)