View Full Version : پیدا کردن ادرس تایتل یک پنجره
raminr63
پنج شنبه 16 خرداد 1392, 19:50 عصر
سلام
بچه ها من یه فایلی دارم مربوط به بازی که وقتی اجرا میشه 2 تا پنجره داره یکی کنسول بازی هستش و دیگری پنجره خود بازی ( بازی مدرن وارفار2)
حالا من چی میخوام:
ادرس تایتل های این دو رو که تایتا کنسول iw4 Console و تایتل بازی Modern Warfare 2 هستش.
اگه یکی لطف کنه و ادرس تایتل هاش رو برام پیدا کنه یک دونیا ممنونش میشم.
با تشکر.
raminr63
پنج شنبه 16 خرداد 1392, 19:52 عصر
راستی این هم فایل یادم رفت پست کنم:
دانلود فایل مورد نظر (http://plusgamer.ir/iw4m.rar)
barnamenevisjavan
پنج شنبه 30 خرداد 1392, 21:43 عصر
کد وی بی
هر پنجره ای فعال باشه عنوانش رو توی لیبل نشون میده
Imports Microsoft.VisualBasic
Imports System.Runtime.InteropServices
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Namespace WindowsFormsApplication1
Partial Public Class Form1
Inherits Form
' Declare external functions.
<DllImport("user32.dll")> _
Private Shared Function GetForegroundWindow() As IntPtr
End Function
<DllImport("user32.dll")> _
Private Shared Function GetWindowText(ByVal hWnd As IntPtr, ByVal text As StringBuilder, ByVal count As Integer) As Integer
End Function
Public Sub New()
InitializeComponent()
End Sub
Private Sub tmrRefresh_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles tmrRefresh.Tick
Dim chars As Integer = 256
Dim buff As New StringBuilder(chars)
' Obtain the handle of the active window.
Dim handle As IntPtr = GetForegroundWindow()
' Update the controls.
If GetWindowText(handle, buff, chars) > 0 Then
lblCaption.Text = buff.ToString()
lblHandle.Text = handle.ToString()
If handle = Me.Handle Then
lblCurrent.Text = "True"
Else
lblCurrent.Text = "False"
End If
End If
End Sub
End Class
End Namespace
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.