Move Active Window

I need to write a program that moves the active window after every 20 
seconds. I believe there must be some api function for that but dont know 
which one. Can any one help. In most case the active window will be VB6 IDE 
itself so if any active window is not easy is it easy to write a code that 
moves the VB6 IDE after every twenty seconds?? Don't ask why I want to do 
it, I just need to do it!!

Thanks 

0
VB6Pro
12/5/2009 1:05:15 PM
vb.general.discussion 1016 articles. 0 followers. Follow

4 Replies
1096 Views

Similar Articles

[PageSpeed] 34

On Sat, 5 Dec 2009 18:05:15 +0500, "VB6Pro" <no_more_nonsense@myemail.com>
wrote:

>I need to write a program that moves the active window after every 20 
>seconds. I believe there must be some api function for that but dont know 
>which one. Can any one help. In most case the active window will be VB6 IDE 
>itself so if any active window is not easy is it easy to write a code that 
>moves the VB6 IDE after every twenty seconds?? Don't ask why I want to do 
>it, I just need to do it!!
>
>Thanks 

Set a timer for 20 seconds and when it fires, move the screen by a few
pixels, checking that the form hasn't gone off of the edge of the screen.

Richard
-- 
http://www.caravanningnow.co.uk
....and so, as the computer-generated dinosaur of time gobbles up the
licence fee of eternity... - Humphrey Lyttelton closing comment in I'm
sorry I haven't a clue.
0
Richard
12/5/2009 1:46:54 PM
VB6Pro escribi�:
> I need to write a program that moves the active window after every 20 
> seconds. I believe there must be some api function for that but dont 
> know which one. Can any one help. In most case the active window will be 
> VB6 IDE itself so if any active window is not easy is it easy to write a 
> code that moves the VB6 IDE after every twenty seconds?? Don't ask why I 
> want to do it, I just need to do it!!
> 
> Thanks

Hi, get the handle of the active window with the API GetActiveWindow and 
then call to GetWindowPlacement to get the window state, and if it's 
normal (not maximized or minimized) move the window with MoveWindow.
Use a timer to do it every 20 seconds.

http://allapi.mentalis.org/apilist/GetActiveWindow.shtml
http://allapi.mentalis.org/apilist/GetWindowPlacement.shtml
http://allapi.mentalis.org/apilist/MoveWindow.shtml
0
Eduardo
12/5/2009 7:46:15 PM
On 05/12/2009 13:05, VB6Pro wrote:
> I need to write a program that moves the active window after every 20
> seconds. I believe there must be some api function for that but dont
> know which one. Can any one help. In most case the active window will be
> VB6 IDE itself so if any active window is not easy is it easy to write a
> code that moves the VB6 IDE after every twenty seconds?? Don't ask why I
> want to do it, I just need to do it!!

Locking the PC will have the same effect of an unusable system...

-- 
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
0
Dee
12/7/2009 2:03:39 PM
Eduardo presented the following explanation :
> VB6Pro escribi�:
>> I need to write a program that moves the active window after every 20 
>> seconds. I believe there must be some api function for that but dont know 
>> which one. Can any one help. In most case the active window will be VB6 IDE 
>> itself so if any active window is not easy is it easy to write a code that 
>> moves the VB6 IDE after every twenty seconds?? Don't ask why I want to do 
>> it, I just need to do it!!
>> 
>> Thanks
>
> Hi, get the handle of the active window with the API GetActiveWindow and then 
> call to GetWindowPlacement to get the window state, and if it's normal (not 
> maximized or minimized) move the window with MoveWindow.
> Use a timer to do it every 20 seconds.
>
> http://allapi.mentalis.org/apilist/GetActiveWindow.shtml
> http://allapi.mentalis.org/apilist/GetWindowPlacement.shtml
> http://allapi.mentalis.org/apilist/MoveWindow.shtml

Wouldn't GetForegroundWindow be a "more better" choice?

-- 
[.NET: It's About Trust!]


0
Karl
12/7/2009 11:12:23 PM
Reply:

Similar Artilces:

Moving license to a new computer
I bought a powerbook and am giving the kids my old imac. I'd like to move Office to the powerbook and remove it from the imac. Am I going to run into any technical difficulties doing this? In article <do3en0hjuiv1jrgsan1tlf23demblohh9p@4ax.com>, Andrew D <andrew.davilman@mindspring.com> wrote: > I bought a powerbook and am giving the kids my old imac. I'd like to > move Office to the powerbook and remove it from the imac. Am I going > to run into any technical difficulties doing this? Shouldn't. Run the Remove Office application on the iMac, and inst...

not able to move FLAG STATUS column in Outlook 2003
I tried to move FLAG STATUS column from the very right side to the left side when I am in my Inbox. IT WON'T LET ME!! Anyone was able to do that? No. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Kenny Shu asked: | I tried to move FLAG STATUS column from the very right | side to the left side when I am in my Inbox. IT WON'T LET | ME!! | | Anyone was abl...

To resize the font on the buttons in MFC GUI, Windows CE
I have a GUI written in MFC for a Windows CE device. However I need to resize some of the buttons and their corresponding text. I can't figure out how to change font size. The following code fragments did not help: Trial 1: *CFont fnt2; fnt2.CreateFont(10, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, L"MS Shell Dlg"); m_btnForceAnalog.SetFont(&fnt2); fnt2.Detach(); Trial 2: LOGFONT lf; memset(&lf,0,sizeof(LOGFONT)); lf.lfHeight = 5; // Request a 100-pixel-height font // D...

Active reports
Hello, i want to write my own reports for RMS. Is there anywhere a description of Active Reports, a How To? Something like a book? Wolfgang Nie�en wrote: > Hello, > > i want to write my own reports for RMS. Is there anywhere a description of > Active Reports, a How To? > Something like a book? > It's available RMS Report Reference. Contact your rms-partner .. or CONTACT NIELS ^_^ bye bye antonio ...

Active X control in Excel 2003
I have is=nstalled a pen pad on my pc which usies an active x control in Excel to enable me to draw in it. Everytime I start Excel it asks me if I was to run this Active X control. Is there a way of stopping it asking me every time? Thanks Shane Excel 2003, Windows XP home Hi, I think if you lowered your security level, it wouldn't ask, but I wouldn't recommend doing so. It prevents unauthorized and possibly dangerous macros from running and causing damage. I'd put up with the nuisance. jeff >-----Original Message----- >I have is=nstalled a pen pad on my pc which usi...

Safe to Move?
Hello, I remember seeing an article about moving $NtServicePackUninstall$ files to free up space. I think it was for Windows 2000 Server. Is it possible to do this for Windows 2003 server? -- Thank you for your help! JYC Hello Mr. JYC, Yes, you can do it and if are sure that there is no need to uninstall it you can delete it. Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights. ** Please do NOT email, only reply to Newsgroups ** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.ht...

Windows 7, CRM Outlook client and wildcard certificates
Hi, We are hosting CRM 4.0 for several of our customer organizations. The CRM server is installed to IFD mode. We have installed several Windows 7 laptops with CRM Outlook clients in them. They have worked fine till last Wednesday when all CRM Outlook clients on these Windows 7 machines stopped from authenticating successfully to CRM. When trying to use the CRM with IE, there is first an SSL certificate warning shown which says: "The security certificate presented by this website was issues for a different website's address." I can continue by clicking a link in browser which ta...

Read Receipts won't move to 'delete bin' after processing
Very simply, my read receipts won't move to 'delete bin' after they are processed. This doesn't seem like a complex process. The tracking option allows me to either turn this rule on or off. What else am I supposed to do? I have receipts all over the place and I end up deleteting them manually. Hy, You have to delete it by yourself. It wont work with a rule. >-----Original Message----- >Very simply, my read receipts won't move to 'delete bin' after they are processed. This doesn't seem like a complex process. The tracking option allows me to either ...

mail moved from netscape to outlook?
Hello! I would like to know is it possible to move the mails from netscape mail to outlook? And what is the way? Thanks! >-----Original Message----- >Hello! I would like to know is it possible to move the >mails from netscape mail to outlook? And what is the way? >Thanks! >. > <anonymous@discussions.microsoft.com> wrote in message news:d08901c3efb2$759a75e0$a101280a@phx.gbl... > > >-----Original Message----- > >Hello! I would like to know is it possible to move the > >mails from netscape mail to outlook? And what is the way? > >Thanks! ...

Anyone tried customizing activity views by editing the SavedQueryBase records?
Would editing the SavedQueryBase records directly allow me to add otherwise unavailable columns to the various activities views? I am trying to show the phone number (location) but this column is not available using the workarounds posted for editing the activity views using the CRM GUI. Anyone tried this yet? I am not looking for an officially supported solution - just a functional workaround. ...

Live Mail,I can't move message "unknown Error" appears
-- There are several messages that I want to place in folders, but when I try to move them, I receive the message "Unable to move, Unknown Error". This is more than annoying, as these are important messages from various organizations I belong to. I like to archive these within the confines of Live Mail, and I don't want to hve to go in and out to various folders. Any help will be appreciated. Windows Live Mail Newsgroup. In your newsreader: news://msnews.microsoft.com/microsoft.public.windows.live.mail.desktop On the Web: http://www.microsoft.com/communiti...

Copy or Move row on condition to different and/or multiple sheets
Good afternoon. I'm new to the world of programming in excel but have programmed elsewhere previously. What i am trying to do is to have a todo list setup, ive searched long and hard and can't find anything that quite fits my bill that i can replicate and alter to work so am asking for some assistance. I have a workbook with six sheets, All Jobs, Evaluation, Authority, In Progress, Completed and a helper sheet. In all jobs i have 9 columns A-I (atm A being spare) that have information that i need to show. In column 'I' i have a dropdown box using the helper sheet for p...

Moving Exchange 2000
Hi, I have a exchange 2000 server running on windows 2000 which I need to move onto a new server/hardware but cannot find techincal documents telling me how to do this. The only documents I can find are on disaster recovery which doesnt seem to cover moving exchange across onto new hardware. Does anybody have some a document ??? Also I would like to run exchange 2000 on server 2003, I'm guessing that this won't be a problem to move it onto new hardware running server 2003 ?? Kind Regards Paul... Use the move-server method detailed here: http://tinyurl.com/ys7e9 -- Neil H...

getting around a popup window during a macro
I am running a macro to open a file, copy it, paste it to a differnt workbook, and then close the orginal. When i go to close it there is a popup that tell me "There is large amount of info on the clipboad. Do you want to be able to paste this information into another program later?" I don't need the clipboad information anymore. What do i need to add to macro to keep this from poping up? Here is what I have in the macro to close it. ActiveWorkbook.Close Hi Dennis After your paste line add this Application.CutCopyMode = False -- Regards Ron de Bruin http://www.ronde...

Moving Pages between two publications
How can I move several entire pages from one document to another? Not simply the content of the page, but the format as well as positioning? Select all the elements on one of the pages and Group them together (a little icon will appear at the bottom of the bounding box - click it to lock the group) before you Copy and paste to the other publication. "FrankDe" <FrankDe@discussions.microsoft.com> wrote in message news:B2DF180E-4973-43D3-8278-7EDDF897EA60@microsoft.com... | How can I move several entire pages from one document to another? Not simply | the content of the ...

Move mailbox rights in Exchange 5.5 #2
What is the most restrictive set of rights that would allow an administrator to move mailboxes between 2 servers in the same site? Providing the administrator an admin role on the Servers container, on each server, or on the Private/Public Information Store gives him undesired privileges (like changing default storage limits). Thanks in advance for any assistance. ...

Move users from none Business Unit to other
hi, is it possible to move a user from one business unit to other ? Yes it is. However when you move them they will lose their security role so you will need to add a security role to their user record "M. Ceccacci" <anonymous@discussions.microsoft.com> wrote in message news:D9C93DCE-6400-4C1F-BE36-C86832BA9DCD@microsoft.com... > hi, is it possible to move a user from one business unit to other ? should have said!! to do this go to settings, business units, users then open up the users record then click actions - change business unit. once done make sure you reassign...

moving companies moving loans moving budget
moving companies moving loans moving budget http://www.movingcompanies.co.il ...

Activities: Roles and Privileges
Hello, How can I set the roles for my Customer Service Representatives in order that they can view all activities related to Cases but not the activities related to sensitive information (Orders, Quotes, Invoices...). If I set the role to User level only (Read, Write..etc.) they will not be able to see the activities related to other cases owned by their colleagues. Thanks in advance, Claude R. Try disabling setting for Orders, Quotes, and Invoices to 'None Selected' in the Sales section of your custom role. "Claude R." wrote: > Hello, > > How can I set t...

Saving Window for PDF file
A end-user was working in Great Plains 7.5 and some how or another he was trying to save what he was working on to a .pdf file. I ran virus scan and it came up clean. Also ran spyware it corrected it's problems. But either when the end-user logins or an administrator logs onto the network. This Saving window for .pdf file keeps coming up. You can click on "Cancel" option and it keeps coming back. Can anyone help me? I'm not sure though this it related to Great Plains or not. ...

Windows Live Mail & Feeds
Dies ist eine mehrteilige Nachricht im MIME-Format. ------=_NextPart_000_0038_01CACDA1.9517E3C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everybody, Maybe someone can help me. I am trying to use the Feeds facility but have hugh problems. It seems I can not add any feed at all. Not able to add a folder. In = word ... nothing. Maybe someone can help me to fix this problem or offer a nice place to = read about it. Thanx in advance KR Marco ------=_NextPart_000_0038_01CACDA1.9517E3C0 Content-Type: text...

Moving from Outlook on PC to Entourage on Mac
I'm trying to move to a Mac from a laptop that died and use the Office 2008 for Mac. Can't find the Pst file on the laptop hard drive and it doesn't seem easy to import from outlook. Any suggestions? Locations are here http://www.howto-outlook.com/howto/backupandrestore.htm Outlook requires the data file to be located on your current system, (Not so it overwrites any existing data file) before you open it within Outlook (or import) "GeorgeK" <GeorgeK@discussions.microsoft.com> wrote in message news:64D74ACC-C994-441B-8EA1-FDC4D30B3F88@microsoft.co...

Moving Folder error
Using OL 2007, I am moving some folders and I get a error message 'Folder is full'. Any ideas ? I can copy the folder elsewhere but not more it. Thanks !! "Ronnie" <rarneja@REMOVEMEnc.rr.com> wrote in message news:EB658089-BF7F-40A0-A0CB-46FB67E4CE37@microsoft.com... > Using OL 2007, I am moving some folders and I get a error message 'Folder is > full'. > > Any ideas ? I can copy the folder elsewhere but not more it. Are you using an Exchange account or some other type of account? If another type, what? Have you emptied your Deleted Item...

Moving between worksheets
I had someone do this for me. This is an Excel file with 4 worksheets. The two pertinent ones are called 'Schedule' and 'Version'. When save the file it updates the version of the file with a date/time stamp on the 'Version' worksheet like this. Version Last Saved (Date/Time) 2004.08.282141 8/28/04 9:41 PM 2004.08.282140 8/28/04 9:40 PM 2004.08.282140 8/28/04 9:40 PM 2004.08.282139 8/28/04 9:39 PM 2004.08.282136 8/28/04 9:36 PM I would like it to update the 'Version' worksheet and then jump back to the 'Schedule' ...

Forcing a dialog window to the foreground from another process.
I have googled this topic and most have said this cannot be done because changes are made since Windows 98/2000 to disallow a dialog window from appearing in the foreground if certain conditions are not met. I have an MFC application that handles all the UI aspects (Dialogs/Error Msgbox, etc), my secondary app is an Outlook plugin that communicates with my main app thru COM. From the Outlook plugin, I need to display the dialogs from my main app. The problem is, the dialogs will not be brought to the foreground, they will just blink in the taskbar. I have SetForegroundWindow() calle...