| View previous topic :: View next topic |
| Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Sun Sep 21, 2003 6:09 pm Post subject: Clip Desktop Space |
|
|
Is there a way with API to clip out a space on the desktop, the way the taskbar does when always ontop? I looked in the Win32 help file, but, could not find anything.
Thanks _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sun Sep 21, 2003 6:25 pm Post subject: |
|
|
| Quote: | | to clip out a space on the desktop |
I doubt if the task bar does that. You can make your app bar(i suppose) on top with the desktop window which you can obtain through API. But on NT based systems I think you need to deal with some privileges etc if you are drawing on to desktop window etc. May be some one has better Ideas ?
EDIT:
I am now getting some idea as to what - You do like that for a window by using SetWindowRgn I don't know if it works with desktop window. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Sep 21, 2003 7:25 pm Post subject: |
|
|
It is possible of course, but not sure in VDS. I saw an example in another
language once, and I tried my hind end off to find a way in VDS at the time
to do this also.
If anyone can figure it out, it'll be codescript or dragonsphere.
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Sep 21, 2003 7:40 pm Post subject: |
|
|
The Microsoft Office Shortcut Bar does this with great ease, it doesn't
take long or anything, and clips the desktop space fast. I'll see if I can
find any examples in another programming language for this.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Sun Sep 21, 2003 8:27 pm Post subject: |
|
|
| FreezingFire wrote: | The Microsoft Office Shortcut Bar does this with great ease, it doesn't
take long or anything, and clips the desktop space fast. I'll see if I can
find any examples in another programming language for this.  |
That would be great FF, thanks! _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Mon Sep 22, 2003 3:38 am Post subject: |
|
|
I think definately you would have to create an appbar similar to the windows taskbar but define the size as you see fit. Also the appbar must be anchored to an edge of the screen. I don't know if this is possible in VDS to build or not alone, however it's likely gadget can do this since it's api abilities are more robust.
The Windows Api suggest sending a ABM_NEW message to register a new appbar. This message requires a APPBARDATA structure which consists of the size of the appbardata, handle of appbar, callback message identifier, edge flags, rect structure |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Sep 22, 2003 11:03 am Post subject: |
|
|
I have written a crude code.
I am unsure how to manage the the CallbackMessage member as there is nothing equivalent in VDS.
In VB one can use AddressOf function. I have set it to zero.
Obvoiusly then it won't work althogh return codes are OK.
Some one have a idea for workaround.
| Code: | DIALOG CREATE,App Bar window,-1,0,252,172,class appwin
DIALOG ADD,BUTTON,BUTTON1,140,91,64,24,BUTTON1
LOADLIB USER32
LOADLIB SHELL32
REM SMALL CAP STYLE MAY NOT WORK WITH SOME API FUNCTIONS SO
REM CHANGE THE WONDOW STYLE TO A TOOL WINDOW USING API
%H = @STRDEL(@WINEXISTS(#appwin),1,1)
%A = @LIB(USER32,GetWindowLongA,INT:,INT:%H,INT:-20)
%B = @LIB(USER32,SetWindowLongA,INT:,INT:%H,INT:-20,@SUM(%A,$80))
DIALOG SHOW
:EVLOOP
WAIT EVENT
GOTO @EVENT()
:BUTTON1BUTTON
REM Define the APPBARDATA structure
%R = @BINARY(DWORD,0)@BINARY(DWORD,0)@BINARY(DWORD,300)@BINARY(DWORD,50)
%Z = @BINARY(DWORD,24)@BINARY(DWORD,%H)@BINARY(DWORD,0)@BINARY(DWORD,2)@ADDR("%R")@BINARY(DWORD,0)
%S = @BINARY(DWORD,@SUM(@LEN(%Z),1))@BINARY(DWORD,%H)@BINARY(DWORD,0)@BINARY(DWORD,2)@ADDR("%R")@BINARY(DWORD,0)
REM Register the taskbar
%A = @LIB(SHELL32,SHAppBarMessage,BOOL:,INT:$0,@ADDR("%S"))
REM Position the Taskbar
%B = @LIB(SHELL32,SHAppBarMessage,BOOL:,INT:$3,@ADDR("%S"))
INFO %A|%B are return codes if 1|1 success but did anything happen ?
GOTO EVLOOP
:CLOSE
FREELIB USER32
FREELIB SHELL32
EXIT |
_________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Mon Sep 22, 2003 5:37 pm Post subject: |
|
|
The callback just wants a message number to send to your appbar. You should be able to use OPTION MSGEVENT. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue Sep 23, 2003 6:17 am Post subject: |
|
|
Somehow I don't seem to get it work even using WM_USER+num message number as callback. Most likely problem with structure. I will give a try in VB. If it works that can be used I think ? _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Sep 25, 2003 2:42 pm Post subject: |
|
|
| CodeScript wrote: | | Somehow I don't seem to get it work even using WM_USER+num message number as callback. Most likely problem with structure. I will give a try in VB. If it works that can be used I think ? |
CodeScript you have to register the message Name first with the RegisterWindowMessage API. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Sep 26, 2003 6:17 pm Post subject: |
|
|
No it didn't work
I haven't found a way in VDS as of now though i have
been able to do it in VB.
I will shortly post a VB activex dll for those who like VB . _________________ 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 Sep 27, 2003 2:34 pm Post subject: |
|
|
OK here is the dll for those who don't have any problems having VB 6 runtime on their system.
It comes along with XP operating system.
I do understand some may not like having the VB runtime on
their system.
http://codescript.vdsworld.com/VDS5src/appbar.zip
A DSU wraps all the functions including registering the dll into easy VDS commands.
Most of you might be using many freewres wriiten in VB.
So u might be already having VB6 runtime.
If you don't then you can download it here.
http://codescript.vdsworld.com/VDS5src/msvbvm60.zip
If someone succeeds in pure VDS let me know.
Enjoy. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat Sep 27, 2003 8:01 pm Post subject: |
|
|
Codescript, thanks for looking into this for everyone and also for providing
a work around via the vb dll. I know I appreciate it. I've been
waiting for a solution to this for a few years now for two apps that I've been
holding here all this time.
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sun Sep 28, 2003 2:00 am Post subject: |
|
|
Thanks Garett for the compliments.  _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
|