Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: dbrckoviPosted on 2005-02-16 at 01:50:17ID: 13322158
Hi!
---------- ---------- ---------- ---------- ---------- ---------- -----
---------- ---------- ---------- ---------- ---------- ---------- --------
You say you have some experience with Visual Basic. If you have it installed, then you can create small program which will find application's window,
normalize it (if it's maximized), and move it to fixed location.
Here's how you can do the same thing with Notepad window:
- start Visual Basic 6 -> Standard EXE project
- double click on the form and paste this code:
'-------------------------
'first, declare API functions and constants which plan to use...
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Const SW_NORMAL = 1
Private Sub Form_Load() 'when the form loads...
Dim Handle As Long 'a variable which stores handle to window
Handle = FindWindow(vbNullString, "Untitled - Notepad") 'find a window with this title: "Untitled - Notepad"
ShowWindow Handle, SW_NORMAL 'normalize the window
MoveWindow Handle, 10, 10, 1000, 1000, 1 'move it to coordinates (10,10)-(1000,1000) and repaint it
End 'quit
End Sub
'-------------------------
Now you can click File -> Make Project1.exe to create an exe out of it, or you can press F5 to run it from within Visual Basic.
To change it so it will resize Analyzer app. instead of Notepad, you have to change "Untitled - Notepad" to the text which you see in Analyzer app's title bar.