Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questiontrue)]
private
static
extern
boolSetWindowPos(HandleRef hWnd, HandleRef WndInsertAfter,
intx,
inty,
intcx,
intcy,
intflags);
private
const
intSWP_NOACTIVATE = 0x10;
privateForm2 form2;
privateTimer timer;
privateMode mode;
private
enumMode {
publicForm1()
newTimer();
newEventHandler(timer_Tick);
this.mode = Mode.Allee;
voidtimer_Tick(
objectsender, EventArgs e)
if(
this.mode == Mode.Allee && form2.Left >
this.Right + 4)
this.mode = Mode.Retour;
else
if(
this.mode == Mode.Retour && form2.Left <=
this.Left) {
this.mode = Mode.Allee;
this.timer.Enabled =
false;
return;
if(
this.mode == Mode.Allee)
else{
private
voidbutton1_Click(
objectsender, EventArgs e)
newHandleRef(form2, form2.Handle);
newHandleRef(
this,
this.Handle);
this.Left,
this.Top, form2.Width, form2.Height, SWP_NOACTIVATE);
this.Focus();
true;
private
staticForm2 instance;
publicForm2()
public
staticForm2 GetInstance() {
if(instance ==
null)
newForm2();
returninstance;