You might run into this problem:
When you try to make an Open/SaveFileDialog on in a WPF program, you might see that the dialog is displayed with the old graphics:

*yuk*
This seems to be caused by a detection inconsistency somewhere inside the Microsoft.Win32.
To solve the problem you could manually add a Reference to System.Windows.Forms, and use the System.Windows.Forms.OpenFileDialog or the System.Windows.Forms.SaveFileDialog.
This will display the beautiful Open/SaveFileDialog on Vista 64-bit.
Good luck
3 Comments »
struct MyStruct
{
public int X { get; set; }
public int Y { get; set; }
public MyStruct(int x, int y)
{
this.X = x;
this.Y = y;
}
}
Will trigger an error on line 8:
The ‘this’ object cannot be used before all of its fields are assigned to
So I thought I might fix it by assigning a value to the fields. Since we have automatic properties, let’s convert them to normal properties:
struct MyStruct
{
private int _x = 0;
public int X
{
get
{
return _x;
}
set
{
_x = value;
}
}
private int _y = 0;
public int Y
{
get
{
return _y;
}
set
{
_y = value;
}
}
public MyStruct(int x, int y)
{
this.X = x;
this.Y = y;
}
}
Let’s press F5. Oeh noes, another error:
‘MyStruct._x’ cannot have its instance field initializers in structs
So you can’t do field initialization in a struct (apart from in a function / constructor / getter / setter).
Let’s go back to the first piece of code and make it work by adding 7 characters:
struct MyStruct
{
public int X { get; set; }
public int Y { get; set; }
public MyStruct(int x, int y) : this()
{
this.X = x;
this.Y = y;
}
}
The this() initializes the struct, and in the constructor itself the struct’s vars & properties are set to their default values. It’s weird though that an int needs initialization…
1 Comment »
And I like it
The weather is warming up, slow but steady. Yesterday it was actually 25 degrees Fahrenheit, which was pretty cold. Today it is around 55, with a bit of wind. The wind is the coldest over here, but I think when it gets 70+ the wind is quite pleasant
I really love my internship, great colleagues (thanks!). The classes them self are nice too, and very interesting too.
There is definitely a big difference in teaching in Belgium and over here.
The consequence of the teaching over here is that you DO a lot more out of class, not necessarily learning, but doing homework. But they are quite interesting
No Comments »
Posted by Kristof in Various
Just a thought: Apple promotes iPhone with an OS which is a subset of Mac OS X. Why then is Apple allowed sell the iPhone WITH Safari, and why does nobody makes a big deal out of it? While Microsoft has to change their OS for these European laws!
With Windows you are allowed to install another browser, you aren’t even allowed to do this with the iPhone?
Europe, go attack Apple…
1 Comment »
A while ago I wrote about me having a 64-bit system with SQL Server 2008 Express edition 64-bit and Visual Studio 2008 SP1 not beeing able to create a service based database because of some wrong registry keys. Installing a 32-bit version of the database should have solved the problem but that didn’t work for me. So I reverted to Sql Server 2005 Express Edition.
The problem is described on the Microsoft connect page.
Now Microsoft has released a hotfix for this. To get the hotfix you need to create a support case online (99$, which should be refunded) or use an MSDN support case voucher. Or you can use Google as I did and find the direct link to the hotfix
I AM NOT RESPONSIBLE FOR INSTALLING THIS HOTFIX, IT WORKED FOR ME, BUT IT MIGHT NOT FOR YOU. THERE IS A REASON WHY MICROSOFT DOES NOT MAKES THIS HOTFIX PUBLIC. USE WITH CARE.
No Comments »
Since I installed an update to my Live Messenger I cannot send any more files to people who use an older version of Live Messenger.
Why?
It costs them more money to remove the code than just leave it in?
Quite useless, now everybody is forced to upgrade to the new version… and how many people know how to do that? …
2 Comments »
Yes I’ve got it!! My Social Security Number, which means I can be employed on campus over here and get payed!
I can use the extra cash

(the white bars are the number and my signature, of course I cut those out
).
No Comments »
(which was a test
).
So apparently each Monday they test the alarm of the tornado warning at noon.
It was a very loud sound, so if we here it when its NOT noon we have to go to a shelter. What if a tornado strikes at noon? How do we distinguish a test out of a real thread?
No Comments »
They still have Dr. Pepper!!!!!!!!!!!!!!!!! (that itself is worth a whole blog post!).
And Coca Cola Cherry, and Pepsi Cherry, Diet Pepsi Cherrie, Mountain Dew with Cherry (Code Red). Heck, they probably have Cherry flavored cherry…
1 Comment »
While reading on PHP security here on my internship I stumbled on this article on PHP.net: www.php.net/magic_quotes .
They finally decided to remove this features. This will break A lot of websites though when they update to this version.
That’s sad about PHP, they hacked it together but there was no straight line in the development.
Though PHP has some good Frameworks right now, and some great development tools.
A framework I really like is Zend Framework.
And as IDE I use Visual Studio with VS.PHP
I dislike Zend Studio because it’s built on Eclipse, and thus Java.
1 Comment »