Tuesday, June 19, 2007

Image.FromFile locks the file

When you use the picturebox to display pictures and fill it by using

Picturebox1.Image = Image.FromFile("somefile"),

You will find that it locks the image file.

There are 2 solutions,

The first is to dispose of the image :

Picturebox1.Image.Dispose()

Wich is ok when you are going to put another picture in the picturebox but can lead to surprising results in other cases.

The second (and advised way) is to use a file stream :

Dim fs As System.IO.FileStream

fs = New System.IO.FileStream("somefile", IO.FileMode.Open, IO.FileAccess.Read)

PictureBox1.Image = System.Drawing.Image.FromStream(fs)

fs.Close()

Wednesday, June 13, 2007

Tuesday, June 5, 2007

Missing CD/DVD rom drives in Windows?

Trying to write a cd,
I noticed my DVD writer was missing,

Looking in device manager i got the following error message :

Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)

very strange, as this device has always worked perfectly before.

After some googleing I tried things to update the drivers, deleting the device from device manager etc.

Finally i found the answer :

Open regedit
Go to key :

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}

Find the "UpperFilters" and "LowerFilters" (and "UpperFilters.bak" "LowerFilters.bak", if they exist) values and delete them.


After that reboot or delete the devices one more time from device manager and voila they were back!

WARNING : some CD / DVD writer programs may have to be reinstalled!!! but that's a small price to pay i find :)

Thursday, May 17, 2007

Adding rows to another table

When you add a row from a datatable to another with

table(0).rows.add(theRow)

you will get the error
This row already belongs to another table

Instead of the table.add(theRow) command, you can use the table.importrow(therow) command

This will preserve the rowstate, so if the row was unchanged in the first datatable,
it will be unchanged in the new table.

this can be usefull for ecample after a select on a datatable

Wednesday, May 9, 2007

Own your very own 128 bit integer for free!

If your a digg user (or slashdot or ... ), you certainly will remember last week's fuzz about a certain 128bit number the movie industry claimed to own
(if not, you can find information here)

Exact details about how the process works and, to claim your own integer (get them while they're free ;-) )
you can find here

Anyway here is mine, all mine :)

1D D4 B6 5B FD 70 31 86 A4 92 F5 2C 04 1F A3 5F



Have fun!

Tuesday, May 8, 2007

Welcome to the family Scooby


Since sunday the family has a new member :
Scooby the Jack Russell Terrier :


Scooby is 2 and a half moths old and joins Louchka the golden retriever and Gizmo (aka Barbecue)  the cat.

More can be seen at the photo site

Friday, May 4, 2007

Kaspersky Internet Security 7.0 Beta 1

Kaspersky has released a new beta version of their antivirus & internet security suite.

I have just updated the virusscanner on my Vista x64 machine and my XP SP2 machine,
and it is working great!

New things are  (this list is for the KIS suite):
what's new from v6:
1. Application GUI has been enhanced.
2. New heuristic analyzer detecting unknown threats has been added.
3. An opportunity for quick application setup with default settings has been added.
4. A new protection component (Parental control) has been added for supervision of user access to Internet resources.
5. Privacy control (Anti-Spy) has been supplemented with a module protecting confidential data and guarding against unauthorized access and transfer of such data.
6. Security wizard has been added for quick correction of problems in the application settings and operation.
7. Delivery of news from Kaspersky Lab via a new component (News Agent) has been implemented.
8. Proactive defense has been enhanced with a mechanism for detection of the newest keyloggers.
9. Protection against new types of leaktests has been added.
10. Extended search for the new generation rootkits has been added.
11. Firewall kernel has been improved and optimized for performance.

You can find the information to the beta FTP server in this forum thread : 
http://forum.kaspersky.com/index.php?showtopic=11188


Be aware that this is an early beta and may contain bugs !