While playing with a7Wrapper:

If you use this loop

Code:
while (a7.EngFun.engine_frame() != 0) 
{ 
	UpdateAcknex(); // update your acknex stuff here
	Application.DoEvents(); //Add this here 
}




//set your acknex window to size

Code:
//get the x/y pos 
int left = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Left;
int top = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Top + 
                                                       Program.gamePlayForm.Height;
//get the w/h
int right = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Right;
int bottom = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Bottom - top;

//place the position (left,top)/ (right/bottom) in vectors 
a7.Vector vWinPos = new a7.Vector((a7.Var)left, (a7.Var)top, (a7.Var)0);
a7.Vector vWinSize = new a7.Vector((a7.Var)right, (a7.Var)bottom, (a7.Var)0);

//set title
String winTitle = "Engine: ";


//place the window at position (left,top)
a7.EngFun.video_window(vWinPos, vWinSize, (a7.Var)2, winTitle);



//and dont forget to close acknex engine in your form exit

Code:
//QUIT
private void quitToolStripMenuItem_Click1(object sender, EventArgs e)
{
    //close engine
    if(a7.EngFun.engine_frame() != 0)
         a7.EngFun.engine_close();
    //and exit
    Application.Exit();
}



Then you can have forms as well as the acknex window working together like Gimp windows does.



//
forgot this:
Also use this

Code:
while(1)
{
      ... other stuff

   /// this is equivalent to wait(1)
   a7.EngFun.engine_frame(); break;
}



Last edited by pararealist; 07/17/09 09:54.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.