forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Move dialog Help [SOLVED]

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sun Jan 20, 2008 2:15 pm    Post subject: Move dialog Help [SOLVED] Reply with quote

Hi Guyz,

I Would Like to move a dialog without title and I write this but not work fine, first time click on the dialog, dialog move to pos 0,0 I know wrong something but I don't understand what.
Someone can help me please?
Code:
Title Demo

  DIALOG CREATE,Demo,-1,0,240,160,NOTITLE,CLICK,ONTOP
  DIALOG ADD,TEXT,Demo1,60,53,,,Demo Dialog
  DIALOG ADD,TEXT,TEXT1,15,103,,,TEXT1
  DIALOG SHOW
  %x = 240
  %y = 160
:Loop
Wait Event
Goto @Event()


:Click
Parse "%%Ox;%%Oy",@MousePos(XY)
While @MouseDown(L)
    Parse "%a;%b",@MousePos(XY)
    %x = @Diff(%a,%%Ox)
    %y = @Diff(%b,%%oy)
  End
  Dialog SetPos,,%y,%x
Wend
Goto Loop


Last edited by Tdk161 on Mon Jan 21, 2008 8:12 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sun Jan 20, 2008 7:59 pm    Post subject: Reply with quote

HI Tdk161,

Try this script::

Code:


  option decimalsep,"."
  option scale,96

  dialog create,MoveNoTitleWindow,-1,0,300,200,NOTITLE,CLICK
  dialog add,BUTTON,Close,170,225,70,25,Close
  dialog show
 
:Evloop
  wait 0.1,event
  %E = @event()
  goto %E
 
:Timer
  goto Evloop
 
:CLICK
  parse "%X;%Y",@mousepos(XY)
  parse "%T;%L",@winpos(MoveNoTitleWindow,TL)
  %%dX = @diff(%X,%L)
  %%dY = @diff(%Y,%T)
  while @mousedown(L)
    parse "%%X;%%Y",@mousepos(XY)
    %%newX = @diff(%%X,%%dX)
    %%newY = @diff(%%Y,%%dY)
    if @greater(0,%%newX)
      %%newX = 0
    end
    if @greater(0,%%newY)
      %%newY = 0
    end
    window position,MoveNoTitleWindow,%%newY,%%newX
  wend
  goto Evloop
 
:CloseBUTTON
:CLOSE
  exit

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Mon Jan 21, 2008 8:13 am    Post subject: Reply with quote

Very Happy Very Happy Very Happy Many Many tnx Solved

Look this
http://www.vdsworld.com/download.php?id=494 Very Happy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group