Click here to Skip to main content
       

Visual Basic

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionMouse Down Event and Flag settingmemberbig_col28 Nov '12 - 19:53 
AnswerRe: Mouse Down Event and Flag settingmemberSimon_Whale28 Nov '12 - 22:46 
GeneralRe: Mouse Down Event and Flag settingmemberbig_col29 Nov '12 - 2:09 
GeneralRe: Mouse Down Event and Flag settingmemberSimon_Whale29 Nov '12 - 3:06 
AnswerRe: Mouse Down Event and Flag settingmemberbig_col29 Nov '12 - 20:19 
AnswerRe: Mouse Down Event and Flag settingmemberAlan N29 Nov '12 - 3:09 
Questionvb6 to .netmemberdvdljns28 Nov '12 - 7:42 
I find I need an old vb program on win7 but got out of doing stuff like this. Despite the fact that some ways of doing things was dropped in modern windows I am guessing there is a replacement. I know send keys was considered un reliable but the problem was finding what window was the focus. Chances are the window is called something else. A good example is the program I need this for when the window is open there is no title to be seen. all my research says that vb6 is an unreliable or troublesome install on win 7. I have the source for an old vb program and have been advised to find a net replacement. And was wondering how others handled the same problems. For instance the converter by microsoft. Does it work. And how much should I expect to be converted and how much should I expect to hand code.
here is what I am talking about.
 
<pre lang = "vb">
<pre>VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1995
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4185
   LinkTopic       =   "Form1"
   ScaleHeight     =   1995
   ScaleWidth      =   4185
   StartUpPosition =   3  'Windows Default
   Begin VB.Timer Timer1 
      Left            =   540
      Top             =   930
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
 

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 Form_Load()
    Timer1.Interval = 100
End Sub
    
Private Sub Timer1_Timer()
    Static lHwnd As Long
    Dim lCurHwnd As Long
    Dim sText As String * 255
    
    lCurHwnd = GetForegroundWindow
    If lCurHwnd = lHwnd Then Exit Sub
    lHwnd = lCurHwnd
    If lHwnd <> hwnd Then
        Caption = "ActiveWidow: " & Left$(sText, GetWindowText(lHwnd, ByVal sText, 255))
        Debug.Print Caption
    Else
        Caption = "ActiveWindow: Form1"
    End If
End Sub
Is there an easy way to do this on win 7?
AnswerRe: vb6 to .netmemberZaf Khan28 Nov '12 - 16:58 
GeneralRe: vb6 to .netmemberdvdljns1 Dec '12 - 5:47 
GeneralRe: vb6 to .netmemberZaf Khan1 Dec '12 - 8:00 
AnswerRe: vb6 to .netmvpDave Kreskowiak28 Nov '12 - 18:04 
QuestionDeleting a datarow, creating a query to find the row. - ANSWERED, Thank yo [modified]memberJRHibner27 Nov '12 - 23:30 
AnswerRe: Deleting a datarow, creating a query to find the row.memberAndy_L_J28 Nov '12 - 22:30 
GeneralRe: Deleting a datarow, creating a query to find the row.memberJRHibner1 Dec '12 - 7:21 
GeneralRe: Deleting a datarow, creating a query to find the row.memberAndy_L_J1 Dec '12 - 20:27 
GeneralRe: Deleting a datarow, creating a query to find the row.memberJRHibner9 Dec '12 - 14:55 
QuestionModified Registry Keymemberalirezamansoori27 Nov '12 - 18:52 
AnswerRe: Modified Registry KeymvpRichard MacCutchan28 Nov '12 - 0:02 
GeneralRe: Modified Registry Keymemberalirezamansoori28 Nov '12 - 0:39 
GeneralRe: Modified Registry KeymvpRichard MacCutchan28 Nov '12 - 1:15 
QuestionLooking for idea for learning bookmemberNaZReD24 Nov '12 - 9:08 
AnswerRe: Looking for idea for learning bookmemberEddy Vluggen27 Nov '12 - 12:58 
QuestionInstall SQL Server on Another Computer without reach therememberUmesh Bachchani24 Nov '12 - 7:03 
AnswerRe: Install SQL Server on Another Computer without reach therememberEddy Vluggen27 Nov '12 - 12:59 
Question8queen ga write in vbmemberbakhshipoor21 Nov '12 - 9:42 

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


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 19 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid