Page 1 of 1

Why isn't this working?

Posted: Mon May 15, 2023 2:49 pm
by Stefan

Code: Select all

Enumeration
  #window
EndEnumeration

Declare WindowMove()

BindEvent(#PB_Event_MoveWindow , @WindowMove())

OpenWindow(#window,10,10,200,200,"Test")

Procedure WindowMove()
  Protected  x,y
  If IsWindow(#window)
    x=WindowX(#window)  
    y=WindowY(#window)  
    
    If x<0 Or y<0
      Debug Str(x)+"  "+Str(y)    
      ResizeWindow(#window,100,100,#PB_Ignore,#PB_Ignore)
    EndIf
  EndIf
  
EndProcedure

Spiderbasic 2.40

Re: Why isn't this working?

Posted: Mon Jun 19, 2023 1:11 pm
by bmld76
Hello

Wright, impossible to execute this code correctly. I test another solution and it is always the same problème.

Re: Why isn't this working?

Posted: Sat Sep 02, 2023 11:54 pm
by jagermeister
Your code will only output if the window x or y is out of bounds on the left or top of the screen. What is it you're trying to accomplish exactly?

Note: Whoops! Didn't notice this is from months ago. :oops:

Re: Why isn't this working?

Posted: Thu Oct 05, 2023 7:36 am
by Stefan
This code also doesn't work with Spiderbasic 2.51