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 


Menu Lettering Goes Dim?

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


Joined: 16 Sep 2002
Posts: 105

PostPosted: Thu Sep 26, 2002 4:05 am    Post subject: Menu Lettering Goes Dim? Reply with quote

On the script below...the lettering goes dim after auto hide if mouse or other window object is left clicked. Taskbar upon re-entry will allow letters to darken if taskbar is clicked....However, is there any way to force Menu Lettering to be bold and focused without clicking the Tasbar?

As in: Menu Lettering is bold and focused upon Taskbars Re-entry into Windows Desktop?

All advise appreciated and needed much.

Thank you, Mike


option ErrorTrap,ErrorBranch
option Scale,96
option Sleeptime,100
title Top
%%programname = Top
dialog CREATE,Top,0,0,@sysinfo(SCREENWIDTH),10,NOTITLE,ONTOP
dialog SHOW
%%status = 1
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG SHOW

:Evloop
wait event,0
%e = @event()
goto %E

:Timer
if @equal(%%Status,0)
parse "%X;%Y",@mousepos()
if @not(@greater(%Y,5))
%%null = 2
repeat
window Position,Top,0,0,@sysinfo(SCREENWIDTH),%%Null
%%null = @succ(%%Null)
until @equal(%%Null,20)
%%status = 1
%%visibletimer = 0
end
goto evloop
end
if @equal(%%Status,1)
parse "%X;%Y",@mousepos()
if @greater(%Y,20)
%%visibletimer = @succ(%%VisibleTimer)
if @greater(%%VisibleTimer,10)
%%null = 20
repeat
window Position,Top,0,0,@sysinfo(SCREENWIDTH),%%Null
%%null = @fsub(%%Null,1)
until @equal(%%Null,1)
%%status = 0
end
goto evloop
end
goto evloop
:ErrorBranch
window NORMAL,Program Manager
%%null = @msgbox("An error has occured with the "@chr(34)%%ProgramName@chr(34)@cr()"program. You may wish to write down the following"@cr()"information and report this to author of the program:"@cr()@cr()"Error Code:"@tab()@error(E)@cr()"Line Number:"@tab()@error(N)@cr()"Event Status:"@tab()%E@cr()@cr()"Please report the error information to:"@cr()@tab()"??@??????",Program Error,$010)
stop

:ExitMENU
Exit
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Sep 26, 2002 5:52 pm    Post subject: Reply with quote

Several years ago, I started a program called AppBar II. It was based on
the original AppBar by another author who no longer develops his version.

It was an auto hide menu bar for the top of the screen and it only uses
MENU's. The whole thing actually works great except for one tiny
thing..... Freaking menu's don't enable when my dialog is activated
again! Sad

Same problem you're having now. And I never did find a solution to this
problem either. Sad

-Garrett
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Fri Sep 27, 2002 12:08 am    Post subject: Reply with quote

I posted a solution, but it didn't work after the proggie was compiled...

I'll let you know if I find something!

NodNarb
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Fri Sep 27, 2002 12:43 am    Post subject: Reply with quote

Figured it out (not an easy problem!!!), I was on the wrong track the first time, API was no good.

Here ya go!!

Code:

option ErrorTrap,ErrorBranch
option Scale,96
option Sleeptime,100
title Top
%%programname = Top
dialog CREATE,Top,0,0,@sysinfo(SCREENWIDTH),10,NOTITLE,ONTOP
dialog SHOW
%%status = 1
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit

DIALOG CREATE,New Dialog,-1,0,1,1,class menuedit

dialog select,0

:Evloop
wait event,0
%e = @event()
goto %E

:Timer
if @equal(%%Status,0)
parse "%X;%Y",@mousepos()
if @not(@greater(%Y,5))
%%null = 2

%%mousepos = @mousepos()
parse "%%x;%%y",%%mousepos

window position,#menuedit,%%y,%%x

window rclick,#menuedit,0,0

repeat
window Position,Top,0,0,@sysinfo(SCREENWIDTH),%%Null
%%null = @succ(%%Null)
until @greater(%%Null,19)
%%status = 1
%%visibletimer = 0
end
goto evloop
end
if @equal(%%Status,1)
parse "%X;%Y",@mousepos()
if @greater(%Y,20)
%%visibletimer = @succ(%%VisibleTimer)
if @greater(%%VisibleTimer,10)
%%null = 20
repeat
window Position,Top,0,0,@sysinfo(SCREENWIDTH),%%Null
%%null = @fsub(%%Null,1)
until @equal(%%Null,1)
%%status = 0
end
goto evloop
end
goto evloop
:ErrorBranch
window NORMAL,Program Manager
%%null = @msgbox("An error has occured with the "@chr(34)%%ProgramName@chr(34)@cr()"program. You may wish to write down the following"@cr()"information and report this to author of the program:"@cr()@cr()"Error Code:"@tab()@error(E)@cr()"Line Number:"@tab()@error(N)@cr()"Event Status:"@tab()%E@cr()@cr()"Please report the error information to:"@cr()@tab()"??@??????",Program Error,$010)
stop

:ExitMENU
Exit


NodNarb


Last edited by cnodnarb on Fri Sep 27, 2002 1:09 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
noveltech
Contributor
Contributor


Joined: 16 Sep 2002
Posts: 105

PostPosted: Fri Sep 27, 2002 6:05 am    Post subject: Taskbar is sticking Reply with quote

Thanks cnodnarb

I have worked with the new code and have discovered
it's great with the dimming problem...no more dim out. Razz

However, here's the kicker...it has inherited
new problem. Task bar sticks in the hiding
position. Upon x pixels...the menu item opens
down...with task bar in hide position. Crying or Very sad

Any solution? Question

Thanks Mike
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Fri Sep 27, 2002 1:06 pm    Post subject: Reply with quote

You almost had me there!!

After the click command was initiated, no more events could be processed (after entering menu loop)...until I changed line 35 from

Code:

window click,#menuedit,0,0


to this

Code:

window rclick,#menuedit,0,0


Reason I didn't spot this before is that I was dropping the menu down from the right, but logically the user will drop it down from the left!

My code above is updated.

Happy coding!

cnodnarb
Back to top
View user's profile Send private message AIM Address
noveltech
Contributor
Contributor


Joined: 16 Sep 2002
Posts: 105

PostPosted: Sat Sep 28, 2002 7:19 pm    Post subject: Thank You Reply with quote

Thanks Mr Cnodnarb...

Taskbar is working great in Windows 98...

I have discovered another problem...
and I'm hoping you can help!

The Taskbar after installing all Menu Items is
filled to 750 pixels wide by 10 pixels heigth.
Which is great.

If my end-user has 640 * 480 Screen Size...
Far right menu items are out of sight

Is it possible to get the taskbar to check current
Screen Size and be 10 Pixel in Heigth if
Screen Size is 600 * 800 or 20 pixels high
if Screen Size is less then 800 wide?

Thanks again for all your feedback.

Mike
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Sun Sep 29, 2002 8:20 am    Post subject: Reply with quote

No time to show you any smooth code ;-(

Use @SYSINFO(SCREENWIDTH),@SYSINFO(SCREENHEIGHT)
to check settings before you initiate your dialog create command

sample code, may be incorrect!

if @equal(@sysinfo(screenwidth),480)
dialog create,bugs,-1,0,20,480
else
dialog create,bugs,-1,0,10,1240
end

CNodNarb

Now back to trying to get VDS 3.x to work in Linux Wine... it can't load the multimedia dll's for some reason...
Back to top
View user's profile Send private message AIM Address
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Sep 29, 2002 11:40 am    Post subject: Reply with quote

If you're looking to find the width or height of the user's screen, you can use these (cnodnarb was explaining this I think):

Code:
%%width = @sysinfo(screenwidth)
%%height = @sysinfo(screenheight)
DIALOG CREATE,Your Dialog,-1,0,%%width,%%height
rem == Change this around so it works with your code ==


- FreezingFire
Back to top
View user's profile Send private message Visit poster's website
noveltech
Contributor
Contributor


Joined: 16 Sep 2002
Posts: 105

PostPosted: Mon Sep 30, 2002 1:39 pm    Post subject: Much appreciate extra assistance with problem Reply with quote

thanks cnodnarb and FreezingFire for feedback

Still can not get my taskbar to adjust for smaller screen size...

Have tried everything within the limits of my knowledge.

Any extra advise or scripts will be much needed and appreciated.

I've been working with VDS for several months now and possibly have 100 hours tied up trying to learn it.

Thanks much for all the feedback!

Still hanging in there and optimistic,

Mike
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Mon Sep 30, 2002 4:00 pm    Post subject: Reply with quote

Here's something for ya to look at Wink

Code:

option ErrorTrap,ErrorBranch
option Scale,96
option Sleeptime,100
title Top
%%programname = Top

if @equal(@sysinfo(screenwidth),640)
dialog create,top,0,0,640,15,NOTITLE,ONTOP
else
dialog CREATE,Top,0,0,@sysinfo(SCREENWIDTH),10,NOTITLE,ONTOP
end
dialog SHOW
%%status = 1
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG ADD,MENU,&Exit,E&xit
DIALOG CREATE,New Dialog,-1,0,1,1,class menuedit
 
dialog select,0

:Evloop
wait event,0
%e = @event()
goto %E

:Timer
if @equal(%%Status,0)
parse "%X;%Y",@mousepos()
if @not(@greater(%Y,5))
%%null = 2

%%mousepos = @mousepos()
parse "%%x;%%y",%%mousepos

window position,#menuedit,%%y,%%x

window rclick,#menuedit,0,0

if @equal(@sysinfo(screenwidth),640)
gosub six40
else
gosub goodsize
end

%%status = 1
%%visibletimer = 0
end
goto evloop
end
if @equal(%%Status,1)
parse "%X;%Y",@mousepos()
if @greater(%Y,20)
%%visibletimer = @succ(%%VisibleTimer)
if @greater(%%VisibleTimer,10)
%%null = 20
repeat
window Position,Top,0,0,@sysinfo(SCREENWIDTH),%%Null
%%null = @fsub(%%Null,1)
until @equal(%%Null,1)
%%status = 0
end
goto evloop
end
goto evloop
:ErrorBranch
window NORMAL,Program Manager
%%null = @msgbox("An error has occured with the "@chr(34)%%ProgramName@chr(34)@cr()"program. You may wish to write down the following"@cr()"information and report this to author of the program:"@cr()@cr()"Error Code:"@tab()@error(E)@cr()"Line Number:"@tab()@error(N)@cr()"Event Status:"@tab()%E@cr()@cr()"Please report the error information to:"@cr()@tab()"??@??????",Program Error,$010)
stop

:ExitMENU
Exit

:goodsize
repeat
window Position,Top,0,0,@sysinfo(SCREENWIDTH),%%Null
%%null = @succ(%%Null)
until @greater(%%Null,19)
exit

:six40
repeat
window Position,Top,0,0,@sysinfo(SCREENWIDTH),%%Null
%%null = @succ(%%Null)
until @greater(%%Null,37)
exit


BTW, I like your code, it's solid and easy to read. Your style is alot like mine Wink

NodNarb
Back to top
View user's profile Send private message AIM Address
noveltech
Contributor
Contributor


Joined: 16 Sep 2002
Posts: 105

PostPosted: Wed Oct 02, 2002 8:43 pm    Post subject: Thank You Reply with quote

Thank you cnodnarb,

It's working great!
Back to top
View user's profile Send private message
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