Les Snippets

Connexion

Obtient le handle d'une fenêtre contenant un point déterminé

Niveau requis pour utiliser/comprendre cette source : 1 ( Débutant )
Créé le 24/12/2009 11:10:28 et initié par Willi [Liste]
Date de mise à jour : 24/12/2009 11:18:01
Vue : 10551
Catégorie(s) : API
Langages dispo pour ce code :
- VB 2005, VB 2008, VB.NET 1.x
- C# 1.x, C# 2.x, C# 3.x
- VB6, VBA



Langage : VB.NET 1.x , VB 2005 , VB 2008
Date ajout : 24/12/2009
Posté par Willi [Liste]
DateMAJ : 24/12/2009
<System.Runtime.InteropServices.DllImport("user32.dll", CharSet:=Runtime.InteropServices.CharSet.Unicode)> _
Shared Function WindowFromPhysicalPoint(ByVal Point As POINT) As IntPtr
End Function
    Public Structure POINT
        Public x As Integer
        Public y As Integer
    End Structure
    Public Function GetHwndFromPoint(ByVal p As POINT) As IntPtr
        Return WindowFromPhysicalPoint(p)
    End Function
Langage : C# 1.x , C# 2.x , C# 3.x
Date ajout : 24/12/2009
Posté par Willi [Liste]
[System.Runtime.InteropServices.DllImport("user32.dll", CharSet = Runtime.InteropServices.CharSet.Unicode)]
static IntPtr WindowFromPhysicalPoint(POINT Point);
public struct POINT
{
  public int x;
  public int y;
}
public IntPtr GetHwndFromPoint(POINT p)
{
  return WindowFromPhysicalPoint(p);
}
Langage : VB6 , VBA
Date ajout : 24/12/2009
Posté par PCPT [Liste]
Private Type POINTAPI
    As Long
    As Long
End Type
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As LongByVal yPoint As Long) As  Long
Private Function GetHwndFromPoint(ByRef p As POINTAPI) As Long
    GetHwndFromPoint = WindowFromPoint(p.X, p.Y)
End Function

Snippets en rapport avec : Windows, Handle, From, Point



Codes sources en rapport avec : Windows, Handle, From, Point

{Delphi} LE BUREAU DANS LA FORM
Titre:Le Bureau dans la form Un exemple de code qui montre comment mettre le Bureau de Windows dans...

{Assembleur} DIMENSIONNER SES FENÊTRES EN POURCENTAGE DE L'ÉCRAN
Le programme montre deux fenêtres identiques en 800*600. L'une est construite en % de l'écran et ...

{C / C++ / C++.NET} CHAT EN MODE CONSOLE AVEC API WINDOWS
== Il s'agit d'un programme de messagerie instantanée (chat) réalisé en C avec l'API Windows. == ...

{C / C++ / C++.NET} ASCII_PHYSIX
Bonjour à tous ! Je vais vous présenter un jeu programmer par moi même: ASCII_PhysiX. Pourquoi ce...

{C / C++ / C++.NET} OBTENIR DANS UN FICHIER LE CONTENU D'UN DOSSIER WINDOWS
Ce petit programme portable permet de capter dans un fichier le contenu d'un dossier Windows. Le mod...

{Delphi} AFFICHER LES OBJECTS DE WINDOWS EXPLORER DANS UN WEBBROWSER
Un exemple de code qui montre comment afficher les objects de Windows Explorer dans un WebBrowser .....

{C / C++ / C++.NET} INTERROGATION WMI / CIM V2 EN C
Interrogation de la base WMI (Windows Management Instrumentation) avec du WQL et du COM, en C (pas d...

{Delphi} UTILISER LES FICHIERS *.CPL
Un exemple de code qui montre comment utiliser les fichiers *.cpl qu'on trouve dans ..\WINDOWS\syste...

{Delphi} ÉJECTER LE CD-ROM
Titre: Éjecter le CD-ROM Un exemple de code qui montre comment Éjecter le CD-ROM avec la DLL de Win...

{Graphisme} APPLICATION POINT EN JAVA SE
Ce programme a été concu par SEBGO Pauline Nadège et COMPAORE Moustapha, étudiants en Analyse - P...