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.
<prelang= "vb"><pre>VERSION5.00BeginVB.FormForm1Caption= "Form1"ClientHeight=1995ClientLeft=60ClientTop=345ClientWidth=4185LinkTopic= "Form1"ScaleHeight=1995ScaleWidth=4185StartUpPosition=3'WindowsDefaultBeginVB.TimerTimer1Left=540Top=930EndEndAttributeVB_Name= "Form1"AttributeVB_GlobalNameSpace=FalseAttributeVB_Creatable=FalseAttributeVB_PredeclaredId=TrueAttributeVB_Exposed=FalseOptionExplicitPrivateDeclareFunctionGetForegroundWindowLib"user32"()AsLongPrivateDeclareFunctionGetWindowTextLib"user32"Alias"GetWindowTextA"(ByValhwndAsLong,ByVallpStringAsString,ByValcchAsLong)AsLongPrivateSubForm_Load()Timer1.Interval=100EndSubPrivateSubTimer1_Timer()StaticlHwndAsLongDimlCurHwndAsLongDimsTextAsString*255lCurHwnd=GetForegroundWindowIflCurHwnd=lHwndThenExitSublHwnd=lCurHwndIflHwnd<> hwnd Then
Caption = "ActiveWidow: " & Left$(sText, GetWindowText(lHwnd, ByVal sText, 255))
Caption = "ActiveWindow: Form1"