Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Getting Active Visual windows of OS using Windows32 API .Net 2.0

Author: Zunnair

This Article has Windows32 demonstrations of All Active visual Windows of Your Windows Xp. This is the Part Two of win32 API Usage.

Whenever we want to Access the windows authentication we have to use Win32 APIs .Because Microsoft Gives us his own way because Microsoft wants no disturbance in its Performance due to your access. 

Each of the Win32 API functions and constants have been wrapped up in the Win32API class for use in each demonstration.

Active windows: This fills a listbox with all active visual windows, by filtering the results of the callback function, EnumWindows using various Win32 API functions. In this example EnumWindows is defined using DllImport instead of Declare to contrast the difference between using the two methods.

 

Lets start Understanding by using Code it is recommended that with this explanation please run application First. And try to understand because helpful Comments are written there.

 

Private Sub btnRefreshActiveWindows_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRefreshActiveWindows.Click

 

lbActiveWindows.Items.Clear()

Win32API.EnumWindowsDllImport(New Win32API.EnumWindowsCallback(

AddressOf _FillActiveWindowsList), 0)

 

End Sub

This subroutine clears the active windows list and fills it with all active windows. EnumWindowDllImport works the same as in btn Refresh Active Processes Click however, it is defined using DllImport instead of Declare. In this Article I tried to explain Active Visual Windows Showing, there are many other Concepts regarding Win32 API in VB.net  I will Explain Others in Later Parts.

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< Implementing Multiple Threads using VB.Net 2.0

Disclaimer - Privacy
© 2002-2017 DevASP.net