Click here to Skip to main content
       

Visual Basic

 
AnswerRe: Mouse Down Event and Flag setting Pinmemberbig_col29-Nov-12 20:19 
AnswerRe: Mouse Down Event and Flag setting PinmemberAlan N29-Nov-12 3:09 
Questionvb6 to .net Pinmemberdvdljns28-Nov-12 7:42 
AnswerRe: vb6 to .net PinmemberZaf Khan28-Nov-12 16:58 
Is this what you mean?
 
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Timer1.Interval = 250
End Sub
 
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Static lHwnd As Long
    Dim lCurHwnd As Long
    Dim sText As String
 
    sText = ""
    lCurHwnd = GetForegroundWindow
    If lCurHwnd = lHwnd Then Exit Sub
    GetWindowText(lHwnd, sText, 255)
    lHwnd = lCurHwnd
    If lHwnd <> Me.Handle Then
        Me.Text = "ActiveWindow: " & Microsoft.VisualBasic.Left(sText, 255)
        Debug.Print(Me.Text)
    Else
        Me.Text = "ActiveWindow: Form1"
    End If
End Sub

GeneralRe: vb6 to .net Pinmemberdvdljns1-Dec-12 5:47 
GeneralRe: vb6 to .net PinmemberZaf Khan1-Dec-12 8:00 
AnswerRe: vb6 to .net PinmvpDave Kreskowiak28-Nov-12 18:04 
QuestionDeleting a datarow, creating a query to find the row. - ANSWERED, Thank yo [modified] PinmemberJRHibner27-Nov-12 23:30 
AnswerRe: Deleting a datarow, creating a query to find the row. PinmemberAndy_L_J28-Nov-12 22:30 
GeneralRe: Deleting a datarow, creating a query to find the row. PinmemberJRHibner1-Dec-12 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140826.1 | Last Updated 27 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid