The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 HowTo: Move Windows

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
klasperstanze Posted - 01/13/2016 : 02:37:25 AM
Hello,

I am using Origin 9.1 on Win7, 64 bit.
My question is: Is there a LabTalk command which allows re-arrangement of windows, e.g. graph windows? I want to have my newly created plot moved to the top left corner, for example.

I hope you can help me since excessive internet research lead to nothing.

Thanks in advance!
3   L A T E S T    R E P L I E S    (Newest First)
SeanMao Posted - 01/15/2016 : 04:59:31 AM
Hi,

My bad! I should have mentioned that User AutoLoad folder is implemented later on. But you can add it to "System" folder instead. For your reference, see figure below:



Regards!

Sean
klasperstanze Posted - 01/15/2016 : 03:53:01 AM
Hi SeanMao,

Thanks alot for the help.
I´m new to OriginC though and therefore tried to find out where to put the code-file, since there is no autoload folder in my Origin.

I tried to put it in Originlab/91/User Data/OriginC.
Didn´t work (as .ocw file).

Where exactly does the code need to be placed (and with what file ending)?
SeanMao Posted - 01/14/2016 : 01:08:19 AM
Hi,

There is no LabTalk way to do it, but you can define an OC function and add this file to "User [AutoLoad]" folder in Code Builder so that every time you start Origin it will be available:


// This function will position given graph window with name 
// winName and position and resize it
void Window_MoveWindow_ex1( string winName, int wLeft, int wTop, int wRight, int wBottom)
{
    GraphPage gp = Project.GraphPages(winName);
    if (gp.IsValid())
    	{
    		Window gWin = gp.GetWindow();
    		gWin.ShowWindow(SW_NORMAL);
    		RECT RecNew;
    		RecNew.left = wLeft;
    		RecNew.top = wTop;
    		RecNew.right = wRight;
    		RecNew.bottom = wBottom;
			gWin.MoveWindow(&RecNew);
    	}
}


After that you can run the command below directly in Script Window:

Window_MoveWindow_ex1(Graph1, 100,300,600,1000);

Give it a try and see how it goes!

Regards!

Sean

OriginLab Tech.

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000