Recent Posts

Wednesday, June 22, 2011

OO database connection class in PHP

I got good OO database connectivity class for PHP tutorial in the following site:


Enjoy guys


Read more!

Wednesday, June 15, 2011

Blogger Tips And Tricks|Latest Tips For Bloggers: How To Add Google +1(plus) Button With Blogger Sha...

Blogger Tips And Tricks|Latest Tips For Bloggers: How To Add Google +1(plus) Button With Blogger Sha...: "This quick and easy tutorial will explain how to enable Google +1 Button with Blogger Share Buttons. If you are already using Blogger share ..."


Read more!

Wednesday, May 18, 2011

Disable close button in vb.net form without losing icon on the form

In a module write the following code:

'for close button declaration
Private Const MF_BYPOSITION = &H400
Private Const MF_REMOVE = &H1000
Private Const MF_DISABLED = &H2

Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As IntPtr, ByVal nPosition As Integer, ByVal wFlags As Long) As IntPtr
Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As IntPtr, ByVal bRevert As Boolean) As IntPtr
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As IntPtr) As Integer
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As IntPtr) As Boolean

Public Sub DisableCloseButton(ByVal hwnd As IntPtr)
Dim hMenu As IntPtr
Dim menuItemCount As Integer

hMenu = GetSystemMenu(hwnd, False)
menuItemCount = GetMenuItemCount(hMenu)
Call RemoveMenu(hMenu, menuItemCount - 1, MF_DISABLED Or MF_BYPOSITION)
Call RemoveMenu(hMenu, menuItemCount - 2, MF_DISABLED Or MF_BYPOSITION)
Call DrawMenuBar(hwnd)
End Sub


Then in the form.load() where you want to disable the close button just call function as below:

DisableCloseButton(Me.Handle)


Read more!

Sunday, January 23, 2011

How to remove xmlns namespace from xml using vb.net

I was having issues with xmlns in xml file and was creating unnecessary waste of time handling them. But i found below solution to remove xmlns from the xml file so that I can focus on only the required tags.

Private
Function stripDocumentNamespace(oldDom As XmlDocument) As XmlDocument
' Remove all xmlns:* instances from the passed XmlDocument
' to simplify our xpath expressions.
Dim newDom As New XmlDocument()
newDom.LoadXml(System.Text.RegularExpressions.Regex.Replace(oldDom.OuterXml, "(xmlns:?[^=]*=[""][^""]*[""])", "", System.Text.RegularExpressions.RegexOptions.IgnoreCase Or System.Text.RegularExpressions.RegexOptions.Multiline))
Return newDom
End Function


Read more!

Thursday, December 2, 2010

Static compression is being disabled warning in IIS 7 solved

Since i moved my website to IIS 7 windows 2008 I was continuously getting below error message regarding my website application pool. I did some research and found out problem was related to ApplicationPoolIdentity permission to IIS Temporary Compressed Files.

The directory specified for caching compressed content C:\inetpub\temp\IIS Temporary Compressed Files\DefaultAppPool is invalid. Static compression is being disabled.


So I got the help from below link to fix this problem, thanks to scott


Read more!