Made Some changes and its working.. Thank you so much ...
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <AutoItConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 353, 209, 192, 114)
Global $ONTOPON = GUICtrlCreateButton("ON TOP ON", 32, 40, 137, 65)
Global $exit = GUICtrlCreateButton("EXIT", 105, 118, 137, 65)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
Global $ONTOPOFF = GUICtrlCreateButton("ON TOP OFF", 184, 41, 137, 65)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ONTOPON
Example($Form1, True)
Case $ONTOPOFF
Example($Form1, False)
Case $exit
Exit
EndSwitch
WEnd
Func Example($Form1, $bTrue)
; Retrieve the handle of the active window.
Local $hWnd = WinGetHandle("[ACTIVE]")
If $bTrue Then
; Set the active window as being ontop using the handle returned by WinGetHandle.
WinSetOnTop($hWnd, "", $WINDOWS_ONTOP)
Else
; Wait for 2 seconds to display the change.
Sleep(2000)
; Remove the "topmost" state from the active window.
WinSetOnTop($hWnd, "", $WINDOWS_NOONTOP)
EndIf
EndFunc ;==>Example