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 


Just Great window VDS 5+ Win2k+

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced VDS 5 Source Code
View previous topic :: View next topic  
Author Message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1054
Location: India

PostPosted: Fri Jul 04, 2003 10:45 am    Post subject: Just Great window VDS 5+ Win2k+ Reply with quote

This is a fancy dialog window that is placed such that it is behind the desktop for keybord/mouse focus but can be visible ontop(refer to my previus examples for ontop,notontop and transparent window.
The OUTSTANDING features of this window:
1.The window behind(or desktop icons Smile) this transparent window can be selected and worked on as if this window did never exist. Wink
2.Even text on the window doesnot obscure focus !(not the case with native VDS invisible style).
3. Transparency can be adjusted and background can be changed !
Utility:
Can be used for:
1.News updates
2.Sticky notes/Notifications.
3.Fancy media player
4.And things You can imagine - Sky is the limit for Ur imagination! he he.

Please note that the script uses non VDS dll and API calls.
Use at your own risk.
I have tested on WinXP - should work on win 2k+.(never Try on Win98/Me)
Code:

#----------------------------------------------------------------------------#
#Calling a Non-VDs dll; Just Great window VDS 5+Win2k+-----------------------#
#----------------------------------------------------------------------------#
#Author:  CodeScript---------------------------------------------------------#
#----------------------------------------------------------------------------#
#Copyright:You can remove this info while(if) 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.
REM IF ANY TIME FORM BECOMES INVISIBLE PRESS F6 TO STOP THE DEMO
  Title OOOPS !
REM CHECK THE WINDOWS VERSION AND DIASALLOW THOSE BELOW WIN 2K. 
%%WINDOWVERSION = @substr(@SYSINFO(WINVER),1,1)
 If @greater(5,%%WINDOWVERSION)
  warn SORRY ! This Script uses Transparent windows supported only on Win2000 and above !
  exit
  end
%%ico = @windir()\explorer.exe
%%taskclick = 0 
  Title Just Great window Demo by CodeScript
  DIALOG CREATE,Just Great window,438,595,195,121,CLASS MYWIN,ONTOP,SNAP,NOTITLE,
REM YOU CAN CHNAGE THE COLOR OF STYLE TO CHANGE THE FONT COLOR 
  DIALOG ADD,STYLE,STYLE1,,,,,FF0080
  Dialog add,TASKICON,TaskIcon,%%ico,Just Great
REM AVOID EDITING THE USER32.DLL DECLARATIONS AND CONSTANTS TO AVOID CRASH.
  LOADLIB USER32
%H = @strdel(@WINEXISTS(#MYWIN),1,1)
 IF %H
 %I = @lib(user32,GetWindowLongA,INT:,%H,-20)
 %I = @lib(user32,SetWindowLongA,INT:,%H,-20,$80000)
 %I = @lib(user32,SetLayeredWindowAttributes,INT:,%H,0,160,$2)
 %I = @lib(user32,SetWindowLongA,INT:,%H,-20,-4000)
     ELSE
   ERROR -1
  end
  FREELIB USER32
REM CHANGING THE COLOR OF GRADIENT CHANGES THE BACKGROUND
  DIALOG ADD,GRADIENT,GRADIENT1,-1,0,195,123,F2EFEA,WHITE,,BOTTOMTOTOP
  DIALOG ADD,TEXT,TEXT1,13,79,,,Breaking news !!,,STYLE1
  DIALOG ADD,TEXT,TEXT2,34,88,,,Sticky notes !!,,STYLE1
  DIALOG ADD,TEXT,TEXT4,96,10,,,Sky is the limit for Ur Imagination !!,,STYLE1
  DIALOG ADD,TEXT,TEXT3,55,77,,,Program Status !!,,STYLE1
  DIALOG ADD,TEXT,TEXT5,76,81,,,Media Player !!,,STYLE1
    DIALOG SHOW
 
 
:Evloop
  wait event
  goto @event()

:OKBUTTON
 LOADLIB USER32
%H = @strdel(@WINEXISTS(#MYWin),1,1)
if %H
 %H = @lib(user32,SetForegroundWindow,BOOL:,%H)
   else
    ERROR -1
  end
 FREELIB USER32
 END
window normal,#MYWIN
goto EVLOOP

:TaskIconCLICK
   if @equal(@click(b),RIGHT)
     dialog popup,Hide|Show|Ontop|DesktopOnly|-|Exit
     else
     goto Check
     end
    goto EVLOOP
   
:check
REM CHECK THE WINDOW STATUS USING A VARIABLE AND TOGGLE ACCORDINGLY
IF @EQUAL(%%taskclick,0)
 %%taskclick = 1
 goto hideMenu
  ELSE
 %%taskclick = 0
 goto ShowMENU
 END

:HideMENU
window hide,#MYWIN
goto EVLOOP

:ShowMENU
LOADLIB USER32
%H = @strdel(@WINEXISTS(#MYWin),1,1)
if %H
 %H = @lib(user32,SetForegroundWindow,BOOL:,%H)
   else
    ERROR -1
  end
 FREELIB USER32
 END
window normal,#MYWIN
goto EVLOOP

:OntopMENU
%%taskclick = 0
window ontop,#MYWIN
window normal,#MYWIN
goto EVLOOP

:DesktopOnlyMENU
REM THIS IS NOTHING BUT NOTONTOP OPTION
LOADLIB USER32
%H = @strdel(@WINEXISTS(#MYWin),1,1)
if %H
 %H = @lib(user32,SetWindowPos,BOOL:,%H,-2,0,0,0,0,3)
   else
    ERROR -1
  end
 FREELIB USER32
 END
goto EVLOOP

:ExitMENU

:Close
  exit

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Fri Jul 04, 2003 11:36 am    Post subject: Reply with quote

Works well on Win2K! Wink

Excellent piece of code... Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jul 04, 2003 12:05 pm    Post subject: Reply with quote

Nice. Thumbs Up
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1054
Location: India

PostPosted: Fri Jul 04, 2003 1:36 pm    Post subject: Reply with quote

The hotkey in the comment makes no sense. It doesnot exist Wink
Also the button label :OKBUTTON and its code makes equally no sense as none exists.
Anyway these are harmless and I have not edited it.
Also the line below in the code is redundant.
If U want U can remove these junk. Smile

Quote:

%I = @lib(user32,GetWindowLongA,INT:,%H,-20)


Additional info:
Quote:

%I = @lib(user32,SetWindowLongA,INT:,%H,-20,-4000)

You can change the value of -4000(thin border) to:

1. -1 to get a rounded frame around the window.
2. -2 to get a flat panel with 3D sloping edges.
3. -$1 to get almost no border at all! (on white forground only text is visible with a mild fading gradient.

I thought i would put screenshots of the same but it may be difficult since I have to upload somewhere.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jul 04, 2003 2:13 pm    Post subject: Reply with quote

I uploaded screenshots for you. Wink

-$1:


-1:


-2:

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1054
Location: India

PostPosted: Fri Jul 04, 2003 2:33 pm    Post subject: Reply with quote

FreezingFire wrote:
I uploaded screenshots for you. Wink

Very nice !
Thanx very much. Laughing Very Happy Very Happy
I think this should tempt many to get VDS 5

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 737
Location: The Netherlands

PostPosted: Fri Jul 04, 2003 3:15 pm    Post subject: Reply with quote

I find this extremely nice, thank you! I think this could be very useful for On Screen
Displays.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1054
Location: India

PostPosted: Fri Jul 04, 2003 6:31 pm    Post subject: Reply with quote

I dont know if this is a documented style. Remove the notitle option and see - the window looks funny with close button on left - like Mac OS I think and I found it intereting an I thought of removing title addding transparency(blend) after it is sent to back (else it looks black) and making it a see thru cum work thru window. It may have many applications like displays, online help or similar info as you read and type from a window below. So let Ur imagination go wild. Very Happy Very Happy
Enjoy

Edit:
If some one is interested in this funny wondow with close button on left take a look at http://forum.vdsworld.com/viewtopic.php?t=1703

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Mon Dec 13, 2004 5:41 pm    Post subject: Reply with quote

Anyone know if this can be applied to any window i.e. Notepad or just a new dialog.
Back to top
View user's profile Send private message
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Mon Dec 13, 2004 6:57 pm    Post subject: Reply with quote

This will work with other windows except the one I'm trying to apply it to. Would you know. I'm tring to make a command window trasparent. I've tried tommys blend dl and both trasparent examples from code script. The command window is unfased. Anyone have any ohter ideas or reasons why this wont work. I'm running windows xp
Back to top
View user's profile Send private message
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Mon Dec 13, 2004 8:47 pm    Post subject: Reply with quote

Anybody have any experence with [SetLayeredWindowAttributes] I'm not sure if this will allow a command prompt to become transparent or not.
I'd hate to waste my time to find out it wont work.



[url]
http://www.codeproject.com/win32/quaker1.asp
[/url]
Back to top
View user's profile Send private message
Garrett
Moderator Team


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

PostPosted: Tue Dec 14, 2004 3:10 am    Post subject: Reply with quote

Here's a program that does offer a transparent command window.

http://www.corion.net/econsole/index.html

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Tue Dec 14, 2004 4:12 pm    Post subject: Reply with quote

Thanks Garrett,

That is about what I'm looking for but I would love to make a command window transparent. The econsole seams to take a command window and clone it to make a regular window that can be transparent. I would like to know the reason why a regular command window cannot be transparent or if it is possible.
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 -> Advanced VDS 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