You are here : Blog
Search_Blog Minimize

KHSW Soft Blog Minimize

This is a question I received a while ago. After an upgrade to Windows XP SP2 the 'My Documents' folder always opened when Windows was started.
I ran msconfig, but couldn't find anything suspicious... After a while I found out there was something wrong with the 'userinit'-key in the registry.

The value of this key (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit) was C:\WINDOWS\system32\userinit.exe,C:\WINDOWS\system32\userinit.exe.
Changing this key to only C:\WINDOWS\system32\userinit.exe solved the problem.

If you have a picture as background of your MDI, that picture is not resized when you resize your form. There seems no easy way (like a property) to accomplish this. So I wrote a little piece of code that will create a new image starting from the original background image, but with the dimensions of the main form. Declare a global variable for your form: Private myBackground As Image Add this code to the Resize-event of your form: If myBackground Is Nothing Then myBackground = Me.BackgroundImage End If If Me.ClientSize.Width = 0 Then Exit Sub 'Remark1 Dim bmp As New Bitmap(Me.ClientSize.Width, Me.ClientSize.Height, Imaging.PixelFormat.Format24bppRgb) 'Remark2 Dim gr As Graphics = Graphics.FromImage(bmp) gr.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic gr.DrawImage(myBackground, 0, 0, bmp.Width, bmp.Height) Me.BackgroundImage = bmp If you have a statusbar (called myStatus in this example) on the bottom of your form, alter the line marked with 'Remark1...

Read More »


Copyright 2007 by KHSW Soft BVBA
Privacy StatementTerms Of Use