Pages

Saturday, August 28, 2010

Windows Registry Modification

Here are some Windows registries that you can do the modification to get a powerful Windows, specially for Security matters.

All you have to do first, it's DO THE BACKUP !!! Run the regedit.exe and click File menu then EXPORT.
And please remember before you do some modifications, do it with your own risk !

Disable / Enable Windows Wallpaper changing
To prevent other users to change the wallpaper, change the Data value to 0 to Enabled or 1 to Disable at
HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop
Value Name : NoChangingWallpaper
Data Type : DWORD Value

Show / Hide Folder Option at Windows Explorer
Note: Some computer viruses cause Folder Option menu at Windows Explorer disabled.
HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value Name : NoFolderOptions
Data Type : DWORD Value
Data : 0 = show, 1 = hide

Show / Hide File menu at Windows Explorer
HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value Name : NoFileMenu
Data type : DWORD Value
Data : 0 = show, 1 = hide

Remove arrow image at Shortcut icon
HKEY_CLASSES_ROOT\piffile
Value Name : IsShortcut
Data Type : String Value
Delete the value

Show / Hide Taskbar and Start Menu
You can use this if you want to make a kiosk PC or something like that.
HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value Name : NoSetTaskbar
Data Type : DWORD Value
Data : 0 = show, 1 = hide

Show / Hide Shutdown Menu
HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
ValueName : NoClose
Data Type : DWORD Value
Data : 0 = show, 1 = hide

Disable / Enable Right Click at desktop
HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value Name : NoViewContextMenu
Data Type : DWORD Value
Data : 0 = Enable, 1 = disable
»»  READMORE...

Thursday, August 26, 2010

Using .NET object in Powerbuilder

For all of you who still using Powerbuilder version 9.0 to above, and want to using .NET object, you can try this trick to do that.

You'll need Microsoft Visual Studio (in this case, I'm using version 2005 with .NET 2.0 framework). And also, you must download Interop Forms Toolkit version 2.1 at Microsoft MSDN site.

The Interop Forms Toolkit 2.1 is a free Visual Studio add-in that simplifies the process of displaying .NET forms and controls in a Visual Basic 6 application. Instead of upgrading the entire code base, these applications can now be extended one form at a time. The goal is a phased upgrade, with production releases at the end of each iteration containing both Visual Basic 6 and Visual Basic .NET forms running in the same Visual Basic 6 process.

Close your VS2005 before you install the Interop Form Toolkit.

Since almost all the objects which made for Visual Basic 6, can used by Powerbuilder application, I'm sure we can use this technique in Powerbuilder too.

Now, here's the steps

Creating .NET Object
  • Open VS, and create new project with Project Type: Windows, and template: VB6 Interop UserControl

  • You'll see like figure above, at the Solution Explorer windows.

  • Open InteropUserControl.vb and create an application. You can use the third party object too.

  • Save and try to rebuild and run the application by pressing F5 button.
  • That's all for the creating .NET object.

Using .NET Object in Powerbuilder
  • Open your Powerbuilder. I'm using version 6.5 in this example.
  • Create new application, then create new window.
  • Insert OLEObject into the new window. You should see the InteropUserControlLibrary1 object in INSERT CONTROL tab. If you can't see the object, do the registering system.dll step. See at the bottom of this article to do that.

  • Choose the InteropUserControlLibrary1 object and place somewhere inside the window.

  • Save and try to run the application.

  • Now, you have .NET object in your Powerbuilder application.

Registering the system.dll so that it can be used from Powerbuilder
  1. Navigate to Start | Run.
  2. In the Run dialog, enter CMD, and click OK.
  3. Enter cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727.
  4. Enter regasm system.dll.
»»  READMORE...