| View previous topic :: View next topic |
| Author |
Message |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Jul 04, 2003 6:19 pm Post subject: Resizable Bevelled (Client Edge/3D) Cute Tool Window VDS5.x |
|
|
Resizable Bevelled(Client Edge/3D) Cute Tool Window:
Well earlier example was for a bevelled window,
This is a bevelled tool window(Smallcap). Bevelled tool window has a better
appearance than bevelled normal window but the problem is it doenot minimize to tray
and instead U have an old fashioned ugly button sitting at the side on desktop. Our
cute window creates the taskbar icon and then becomes a tool window and its menu is
preserved. whenever U minimize the window it is also hidden and it looks like any
other window. Further after the first minmize the window toggles betwwen minimize
and restore on clicking the taskbar icon !!.Lots of theory ?Boring - Then run this
code and see.
Resizable Bevelled Cute Tool Window uses non VDS dll and API calls.
If any mistake occurs VDS?SYSTEM can crash.
Use at your own risk.
Enjoy!
| Quote: |
#-----------------------------------------------------------------------------#
#-Calling a Non-VDs dll Bevelled cute tool Window-----------------------------#
#-Author: CodeScript---------------------------------------------------------#
#-Copyright: You can remove this info while Using this code in your app.-----#
#-----------------------------------------------------------------------------#
REM USE AT YOUR OWN RISK !!
REM MISTAKES MADE WHILE USING A NON VDS DLL MAY INVITE A VDS/SYSTEM CRASH.
REM SAVE YOUR WORK BEFORE RUNNING/DEBUGGING THIS SCRIPT.
Title Bevelled tool Window Demo by CodeScript
DIALOG CREATE, Bevelled tool Window Demo by CodeScript,-1,0,356,120,CLASS MYWIN,Resizable
REM WELL IF U WANT TO DISABLE MAXIMIZE THEN REMOVE THE MENU ENTRY FROM SYSTEM MENU
REM I AM NOT PLANNING HTIS CURRENTLY.
REM IF U REMOVE RESIZABLE PROPERTY INSTEAD AN UGLY TOOLBAR WILL REMAIN!
DIALOG ADD,BUTTON,OK,70,112,130,24,Close
DIALOG SHOW
REM RESIZE TTHE WINDOW A BIT FOR THE CHANGES TO OCCUR
REM ELSE STYLE WILL CHANGE ONLY AFTER A MINIMIZE ETC.
LOADLIB USER32
%H = @strdel(@WINEXISTS(#MYWIN),1,1)
IF %H
%H = @lib(user32,SetWindowLongA,INT:,%H,-20,2000)
ELSE
ERROR -1
end
FREELIB USER32
Window POSITION,#MYWIN,,,,150
:RESIZE
%%Pos = @WINPOS( Bevelled tool Window Demo by CodeScript, S)
if @EQUAL(%%Pos,2)
window hide, Bevelled tool Window Demo by CodeScript
end
goto EVLOOP
:Evloop
wait event
goto @event()
:OKBUTTON
:Close
REM THE STEP BELOW IS NECESSSARY TO PREVENT THE TASKBAR ICON
REM REMAINING EVEN AFTER THE APP HAS CLOSED
LOADLIB USER32
%H = @strdel(@WINEXISTS(#MYWIN),1,1)
IF %H
%H = @lib(user32,SetWindowLongA,INT:,%H,-20,2)
ELSE
ERROR -1
end
FREELIB USER32
exit
|
I had put up 2 characters infront of title of the dialog(to prevent the title from setting at extreme left). It gets lost in the BBcode/html. Anyway the code still works. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension
Last edited by CodeScript on Sat Jul 05, 2003 5:16 am; edited 1 time in total |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Jul 04, 2003 8:22 pm Post subject: |
|
|
Excellent once again, but you should really use the code tag to display
your code. It uses block lettering so it's spaced evenly. Here's the
difference:
| Quote: | | This has spaces in it . |
| Code: | | This has spaces in it . |
You'll see that, even though it has the same exact contents, the quote tag
seems to remove the spaces while the code tag seems to preserve them.
Click the button to see the exact contents of this post. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Jul 05, 2003 5:00 am Post subject: |
|
|
Thanx for that - I know this problem. But when i use CODE the code will be on different lines if it is long - although it gets copied correctly readabilty is poor on the post. I dont know how to lengthen the code box. I know its possible I have seen people doing but not know how. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Jul 05, 2003 5:14 am Post subject: |
|
|
Additinal Info:
| Code: |
LOADLIB USER32
%H = @strdel(@WINEXISTS(#MYWIN),1,1)
IF %H
%H = @lib(user32,SetWindowLongA,INT:,%H,-20,2000)
ELSE
ERROR -1
end
FREELIB USER32
Window POSITION,#MYWIN,,,,150
|
You can change 2000 to
1. 80000 to get Rt justified title tool window.
2. 90000 to get Rt justified title bevelled tool window(client edge).
3. 066000 or $80 if you want a simple plain tool window (this would be different from native VDS tool window in that you can minimize it to taskbar ! using the above code.
Bevelled (tool) window(client edge) style is especially useful for MDI child forms/windows. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jul 05, 2003 11:39 am Post subject: |
|
|
| CodeScript wrote: | | I dont know how to lengthen the code box. I know its possible I have seen people doing but not know how. |
Easy, just put an unbroken line above the code box like this:
___This_is_the_unbroken_line______________________________________________________________________________________________________________________________________________________________
| Code: | | This is a really really long code line to test the fix for this: putting an unbroken line above the code box. This actually was discovered by Mac and it works pretty well |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jul 05, 2003 11:40 am Post subject: |
|
|
BTW Great job on the additional information too!  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| 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
|
|