Feedback Form

Saturday, September 29, 2007

Firefox more than one homepage

I want to make Firefox open for me more than one home page as IE7 do.
How can i do so?
You can have several homepages if you specify them in
Tools > Options > Main - Homepage
separated by "|", e.g. : |


Open all pages that you want as home page in separate tabs, then go to Tools->Options->Main and click "Use current pages", Firefox will add all pages from tabs in "Home page" textbox separated with | .

C# Unsafe code not exist in VB.Net

One of the biggest differences between VB.Net and C# is using the Unsafe code.
In C# we can write unsafe code such as dealing with images in unsafe style:

We can deal with pointers inside this unsafe block which we can't do in VB.Net till now.

What can we do to write an application that must have some unsafe code?
My opinion is don't waste your time and use an external C# dll file contains all the unsafe code and call it from your VB.Net application.
You can use any VB.Net to C# converters, it will convert it for you but when compile you will receive compilation errors in your VB.Net application.

Don't get hung up on 'pure one language application' - that will almost always work out for the worse"

Tuesday, September 25, 2007

Move controls using Arrow keys

I faced a problem today while trying to move a custom control I did on a windows form using keyboard arrow keys, the problem that the KeyDown event don't feel arrow keys, I read about some and found some articles about.
Some articles were not good at all but it may be a very fast solution and may help others but it didn't help me :)
I read for example that you can use the KeyUp event instead; it will work but suppose you need to move an object using KeyUp, ooh, very annoying and not user friendly.
But the best fastest solution I found was the following:

Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
'Returns true if the character was processed by the control;
'otherwise, false.

Dim bHandled As Boolean = False
Select Case keyData
Case Keys.Right
Me.currentControl.Left += 10
bHandled = True
Case Keys.Left
Me.currentControl.Left -= 10
bHandled = True
Case Keys.Up
Me.currentControl.Top -= 10
bHandled = True
Case Keys.Down
Me.currentControl.Top += 10
bHandled = True
End Select
Return bHandled
End Function


kick it on