• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Contributor
    Posts: 25
    Registered: ‎06-10-2008

    Windows Focus during batch processing

    353 Views, 2 Replies
    10-19-2010 01:41 PM

    I have a VBA program that I'm converting to VB.Net.  The program is a batch process that opens a an excel file, opens a template drawing, adds blocks (listed in the excel file), plots and saves the drawing, then moves on to the next drawing, and so on.  In Autocad 2008 and previous version, the program ran in the background, i.e. I could see what was happening, but it didn't affect the running of other programs (like email).  However, since switching to Autocad 2009 (and 2010, and now 2011), the very same program now steels focus every time a new drawing is created (every few seconds).  We've been running this program for years during normal business hours, but have had to change to running them on a remote VM (which is slower) or at night.

     

    I have since converted the program to vb.net, but I get the same results; windows or autocad keeps returning the focus to the autocad interface.  When I originally started to covert this program, I was going to do everything in the database only (not the user interface), it appears that to plot, though, the drawing must be opened in the interface. 

     

    I can still run the same VBA program in 2008 or 2007 (if I re-install them) and it will run without steeling focus, but the 2007 file format is slightly larger and adds up with the thousands of drawings we are dealing with.  And I want to move to vb.net and 2011.

     

    I sent in a support ticket to autodesk, but they blame it on windows.  We continue to use XP Pro.  So nothing has changed there.

     

    Any ideas what may be causing this issue?

     

    Thanks,
    Ken

    Please use plain text.
    Valued Contributor
    Posts: 88
    Registered: ‎03-17-2008

    Re: Windows Focus during batch processing

    05-09-2011 07:37 AM in reply to: ken.washburn

    Anyone have a solution for this?

    Please use plain text.
    Valued Contributor
    Posts: 88
    Registered: ‎03-17-2008

    Re: Windows Focus during batch processing

    03-21-2012 11:00 AM in reply to: pjfontes

    Download TweakUI from Microsoft

    Start->Run->tweakui

    General->Focus->Prevent Applications From Stealing Focus

     

    This helps a lot.. but doesn't eliminate the issue entirely.

    Please use plain text.