Jump to content
Sign in to follow this  
TwistedGA

ControlMove() Resize Issue

Recommended Posts

TwistedGA

Hey guys, I've run into a problem yet again, this time concerning the use of ControlMove() to rework a somewhat outdated programs GUI. With the software being outdated, a lot of screen is wasted due to increasing resolution sizes.

I've managed to get this moving around just fine, with one exception.

When I move a control and set the height/width of the control to its actual size as shown by AutoItWindowInfo, it moves just fine. If I change the numbers to reflect a new size, the control moves back to it's original position and the size remains unchanged.

Example:

ControlMove('', '', '[NAME:dgvRequests]', 250, 250, 783, 131) - Original Size, moves anywhere.

ControlMove('', '', '[NAME:dgvRequests]', 250, 250, 783, 181) - Increased Size, I see it flash into it's new position and size, then quickly change back to its original location and size.

Any insight to what the problem might be and a possible direction towards a solution would be greatly appreaciated! Thanks in advance!

Share this post


Link to post
Share on other sites
TwistedGA

Any idea what could cause something like that? This is the only line of code in my script, I tried putting it into a loop and it just flashes between positions. I don't know why the move works just fine, and doesnt return unless I refresh the application. It's only if I change the size of the control. It's a DataGridView control so that is likely the cause, since they are such a mystery when it comes to using AutoIt with them.

Share this post


Link to post
Share on other sites
TwistedGA

I didn't think it was an Autoit issue really, im just curious if anyone has had this problem before and found or a solution.

Getting to the source is impossible, so it looks like I'm stuck in the creek, no paddle in sight.

I'm curious to know though, if something is triggering the GUI to redraw, why is it only redrawing the GUI when I resize the control, but moving the control works fine?

Edited by TwistedGA

Share this post


Link to post
Share on other sites
TwistedGA

You could make a new GUI that is of your design, then have it control the program you want to manipulate. Saying that, the window size of the old app would not be a problem then.

I would love to do this but sadly the program is very unfriendly to AutoIt, that is, as far as my current skills allow. It uses a lot of DataGridView controls and I haven't been able to take control of them, I can only pull data by using copy/paste methods.

I'm still really confused on why it's accepts moving the controls, but trying to size them is giving me such a headache.

I'll keep at it, in the meantime any insight is more than welcome and greatly appreciated!

Edited by TwistedGA

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.