Click here to Skip to main content
15,890,946 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionMouse Down Event and Flag setting Pin
big_col28-Nov-12 19:53
big_col28-Nov-12 19:53 
AnswerRe: Mouse Down Event and Flag setting Pin
Simon_Whale28-Nov-12 22:46
Simon_Whale28-Nov-12 22:46 
GeneralRe: Mouse Down Event and Flag setting Pin
big_col29-Nov-12 2:09
big_col29-Nov-12 2:09 
GeneralRe: Mouse Down Event and Flag setting Pin
Simon_Whale29-Nov-12 3:06
Simon_Whale29-Nov-12 3:06 
AnswerRe: Mouse Down Event and Flag setting Pin
big_col29-Nov-12 20:19
big_col29-Nov-12 20:19 
AnswerRe: Mouse Down Event and Flag setting Pin
Alan N29-Nov-12 3:09
Alan N29-Nov-12 3:09 
Questionvb6 to .net Pin
dvdljns28-Nov-12 7:42
dvdljns28-Nov-12 7:42 
AnswerRe: vb6 to .net Pin
Zaf Khan28-Nov-12 16:58
Zaf Khan28-Nov-12 16:58 
Is this what you mean?

VB
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 Pin
dvdljns1-Dec-12 5:47
dvdljns1-Dec-12 5:47 
GeneralRe: vb6 to .net Pin
Zaf Khan1-Dec-12 8:00
Zaf Khan1-Dec-12 8:00 
AnswerRe: vb6 to .net Pin
Dave Kreskowiak28-Nov-12 18:04
mveDave Kreskowiak28-Nov-12 18:04 
QuestionDeleting a datarow, creating a query to find the row. - ANSWERED, Thank yo Pin
JRHibner27-Nov-12 23:30
JRHibner27-Nov-12 23:30 
AnswerRe: Deleting a datarow, creating a query to find the row. Pin
Andy_L_J28-Nov-12 22:30
Andy_L_J28-Nov-12 22:30 
GeneralRe: Deleting a datarow, creating a query to find the row. Pin
JRHibner1-Dec-12 7:21
JRHibner1-Dec-12 7:21 
GeneralRe: Deleting a datarow, creating a query to find the row. Pin
Andy_L_J1-Dec-12 20:27
Andy_L_J1-Dec-12 20:27 
GeneralRe: Deleting a datarow, creating a query to find the row. Pin
JRHibner9-Dec-12 14:55
JRHibner9-Dec-12 14:55 
QuestionModified Registry Key Pin
alirezamansoori27-Nov-12 18:52
alirezamansoori27-Nov-12 18:52 
AnswerRe: Modified Registry Key Pin
Richard MacCutchan28-Nov-12 0:02
mveRichard MacCutchan28-Nov-12 0:02 
GeneralRe: Modified Registry Key Pin
alirezamansoori28-Nov-12 0:39
alirezamansoori28-Nov-12 0:39 
GeneralRe: Modified Registry Key Pin
Richard MacCutchan28-Nov-12 1:15
mveRichard MacCutchan28-Nov-12 1:15 
QuestionLooking for idea for learning book Pin
NaZReD24-Nov-12 9:08
NaZReD24-Nov-12 9:08 
AnswerRe: Looking for idea for learning book Pin
Eddy Vluggen27-Nov-12 12:58
professionalEddy Vluggen27-Nov-12 12:58 
QuestionInstall SQL Server on Another Computer without reach there Pin
Umesh Bachchani24-Nov-12 7:03
Umesh Bachchani24-Nov-12 7:03 
AnswerRe: Install SQL Server on Another Computer without reach there Pin
Eddy Vluggen27-Nov-12 12:59
professionalEddy Vluggen27-Nov-12 12:59 
Question8queen ga write in vb Pin
bakhshipoor21-Nov-12 9:42
bakhshipoor21-Nov-12 9:42 

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

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