| View previous topic :: View next topic |
| Author |
Message |
noveltech Contributor

Joined: 16 Sep 2002 Posts: 105
|
Posted: Thu Sep 26, 2002 4:05 am Post subject: Menu Lettering Goes Dim? |
|
|
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 |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Sep 26, 2002 5:52 pm Post subject: |
|
|
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!
Same problem you're having now. And I never did find a solution to this
problem either.
-Garrett |
|
| Back to top |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 766 Location: Eastman, GA
|
Posted: Fri Sep 27, 2002 12:08 am Post subject: |
|
|
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 |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 766 Location: Eastman, GA
|
Posted: Fri Sep 27, 2002 12:43 am Post subject: |
|
|
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 |
|
 |
noveltech Contributor

Joined: 16 Sep 2002 Posts: 105
|
Posted: Fri Sep 27, 2002 6:05 am Post subject: Taskbar is sticking |
|
|
Thanks cnodnarb
I have worked with the new code and have discovered
it's great with the dimming problem...no more dim out.
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.
Any solution?
Thanks Mike |
|
| Back to top |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 766 Location: Eastman, GA
|
Posted: Fri Sep 27, 2002 1:06 pm Post subject: |
|
|
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 |
|
 |
noveltech Contributor

Joined: 16 Sep 2002 Posts: 105
|
Posted: Sat Sep 28, 2002 7:19 pm Post subject: Thank You |
|
|
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 |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 766 Location: Eastman, GA
|
Posted: Sun Sep 29, 2002 8:20 am Post subject: |
|
|
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 |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Sep 29, 2002 11:40 am Post subject: |
|
|
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 |
|
 |
noveltech Contributor

Joined: 16 Sep 2002 Posts: 105
|
Posted: Mon Sep 30, 2002 1:39 pm Post subject: Much appreciate extra assistance with problem |
|
|
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 |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 766 Location: Eastman, GA
|
Posted: Mon Sep 30, 2002 4:00 pm Post subject: |
|
|
Here's something for ya to look at
| 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
NodNarb |
|
| Back to top |
|
 |
noveltech Contributor

Joined: 16 Sep 2002 Posts: 105
|
Posted: Wed Oct 02, 2002 8:43 pm Post subject: Thank You |
|
|
Thank you cnodnarb,
It's working great! |
|
| Back to top |
|
 |
|
|
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
|
|