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 


How to create an appBar without using API

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code
View previous topic :: View next topic  
Author Message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 159
Location: Spain

PostPosted: Wed Mar 14, 2007 4:30 pm    Post subject: How to create an appBar without using API Reply with quote

Hi all Hi

I was looking for an easy solution to create a applications bar in the top or bottom of the screen so any window not has to be covered by the bar.

Look this code:

Code:

  %%height = @sysinfo(SCREENHEIGHT)
  %%width = @sysinfo(SCREENWIDTH)

  option decimalsep,.

  DIALOG CREATE,Window Control AppBar,0,0,%%width,32,ONTOP,NOTITLE,COLOR #2662DF

  DIALOG ADD,BUTTON,Close,3,3,12,11,X
  DIALOG SHOW

:ev_loop
  wait .01
  %e = @event()
  if %e
    goto %e
  end
 
  %v = @winactive()
  if %v
    if @equal(@winpos(%v,S),3)
      window normal,%v
      window position,%v,32,0,%%width,@diff(%%height,61)
    elsif @equal(@winpos(%v,S),1)
      if @unequal(%v,Window Control AppBar)
        %%top = @winpos(%v,T)
        if @greater(32,%%top)
          window position,%v,32
        end
      end
    end
  end
  goto ev_loop

:CloseBUTTON
  exit



Simple and without using API
________________

uVeDeSe

visit: http://www.uvedese.es


Last edited by uvedese on Wed Apr 02, 2008 7:33 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Thu Mar 15, 2007 12:49 am    Post subject: Reply with quote

When I first start it the bar covers whatever window is active. But as soon as I open another application it works correctly. And all existing windows are then resized.

Maybe need to activate the currently active window.

_________________
cheers

Dave
Back to top
View user's profile Send private message Visit poster's website
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 159
Location: Spain

PostPosted: Thu Mar 15, 2007 10:46 am    Post subject: Reply with quote

It is true what you say Dave(c)...
... when you execute the script the active window is the own(proper) script covering then the existing windows. When you activate any existing window or open new windows all windows are then resized.

All the existing windows would have to be activated, then... Confused

____________
uVeDeSe
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 -> Visual DialogScript 5 Source Code 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