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 


Notitle and moveable

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


Joined: 08 Feb 2005
Posts: 53

PostPosted: Thu Mar 03, 2005 9:40 pm    Post subject: Notitle and moveable Reply with quote

I know VDS 5 has the option to remove the window title bar but this makes the window immovable. Is there a way to a make a moveable window without a titlebar?
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Thu Mar 03, 2005 10:18 pm    Post subject: Reply with quote

Actually, the window is movable, but it requires some maths. I'm pretty
sure that there is a post here somewhere that details this. But since I'm
not sure where it is, give me a few minutes, and I think I can have a
simple example for you.

_________________
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
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Thu Mar 03, 2005 10:57 pm    Post subject: Reply with quote

Try this. It's a little wonky, but you'll get the idea. You can also browse the
Mousedown.dsc sample that came with VDS. Wink

Code:

  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
 


Edit1:
Figured out what was making dialog reset to 0,0 when clicked. Now works
like it's supposed to. Accidentally swapped two variables Embarassed

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."


Last edited by ShinobiSoft on Fri Mar 04, 2005 5:20 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Fri Mar 04, 2005 4:16 am    Post subject: Reply with quote

You should also be able to cheat and send your dialog WM_NCLBUTTONDOWN while the mouse is down which makes Windows think the user is dragging the title bar:
Code:

%%WM_NCLBUTTONDOWN = $0A1
%%HTCAPTION = 2
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
  while @mousedown(L)
    %P = @SENDMSG(@WINEXISTS(MoveNoTitleWindow),%%WM_NCLBUTTONDOWN,%%HTCAPTION,0)
  wend
  goto Evloop

:CloseBUTTON
:CLOSE
  exit

I haven't tried it in VDS yet, but works in other languages..

_________________
-Sheep
My pockets hurt...
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: Fri Mar 04, 2005 4:34 am    Post subject: Reply with quote

Hiya Sheep,

Doesn't seem to work with VDS 4.5 Sad

_________________
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
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Fri Mar 04, 2005 5:03 am    Post subject: Reply with quote

Scratch that idea then..
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Mar 04, 2005 8:07 am    Post subject: Reply with quote

I think this issue has been discussed here earlier - try to do a search on NOTITLE & MOVE in the forums...

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Mar 04, 2005 9:07 am    Post subject: Reply with quote

The VDS Clock example has no title bar and also an invisible bitmap for the window. That illustrates how you can drag using the window itself.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
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