Why isn't this working?

Just starting out? Need help? Post your questions and find answers here.
Stefan
Posts: 160
Joined: Mon Feb 05, 2018 9:44 pm

Why isn't this working?

Post 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
bmld76
Posts: 26
Joined: Wed May 24, 2023 5:10 pm

Re: Why isn't this working?

Post by bmld76 »

Hello

Wright, impossible to execute this code correctly. I test another solution and it is always the same problème.
jagermeister
Posts: 5
Joined: Thu Mar 24, 2016 10:51 pm

Re: Why isn't this working?

Post 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:
Stefan
Posts: 160
Joined: Mon Feb 05, 2018 9:44 pm

Re: Why isn't this working?

Post by Stefan »

This code also doesn't work with Spiderbasic 2.51
Post Reply