Welcome Guest.   Make a donation to an author on the site November 23, 2014, 06:05:19 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Always on top  (Read 1922 times)
oblivion
Supporting Member
**
Posts: 360


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« on: October 04, 2011, 01:56:45 PM »

Just a quick question -- I hope!

I want to make a GUI button that I can float over another application, but I can't work out if I can create a GUI with an always-on-top type of attribute.

If I can't, can anyone suggest something I could bolt on that would have a similar effect?

Logged

-- bests, Tim

...this space unintentionally left blank.
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: October 04, 2011, 01:59:56 PM »

Just add the following to your AHK code (assuming it's the first GUI):

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. Gui, +AlwaysOnTop
Logged

Ath
Supporting Member
**
Posts: 2,263



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: October 04, 2011, 02:13:08 PM »

Or grab a copy of WinButtons, that even has a nice configuration editor WinButtonEdit, and can easily be configured to be Always On Top cheesy
Logged

oblivion
Supporting Member
**
Posts: 360


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: October 04, 2011, 04:38:33 PM »

Just add the following to your AHK code (assuming it's the first GUI):

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. Gui, +AlwaysOnTop

Thanks! (I was sure I'd checked all the possibilities for Gui in the help -- I must be getting old.)  embarassed
Logged

-- bests, Tim

...this space unintentionally left blank.
oblivion
Supporting Member
**
Posts: 360


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: October 12, 2011, 05:05:17 PM »

Or grab a copy of WinButtons, that even has a nice configuration editor WinButtonEdit, and can easily be configured to be Always On Top cheesy
I looked quite hard at it. I think if I was starting from the point of wanting a button-based launcher-type thing, I'd have used it. But as it was, I was trying to add functionality to something I'd already written, and after making my own head spin for a while, decided against.

For what it's worth, I'd set up a couple of context-sensitive hotkeys but wanted to replicate the functionality of one of them with something a bit more visible. I created a timer loop that checks to see if two specific applications are running and, if the one of them relevant to the hotkey has focus, puts a small (64x64) button onscreen, with alwaysontop set and the notaskbar attribute too so it's not too obtrusive, and if either of the applications closes, the button's destroyed again.

It works well except for the slight timelag caused by the fact that I've put a 2 second delay on it so as not to take too much cpu when there's little happening. That bit I haven't really experimented with much, to be honest, but as long as it doesn't do anything nasty like leak memory, I'm quite happy with the way it works.

Thanks for both your help, anyway: gave me the focus on the thinking I needed to get what I wanted to happen!  Thmbsup
Logged

-- bests, Tim

...this space unintentionally left blank.
Ath
Supporting Member
**
Posts: 2,263



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: October 13, 2011, 01:51:52 PM »

except for the slight timelag caused by the fact that I've put a 2 second delay on it
I'm using a loop delay of 0.1 second in WinButtons, and I don't see much cpu load while it's running, but that could be my system, as I'm running it on an i7-860 (quad-core with HT, so 8 virtual CPU's Cool)
Logged

oblivion
Supporting Member
**
Posts: 360


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: October 13, 2011, 01:59:21 PM »

except for the slight timelag caused by the fact that I've put a 2 second delay on it
I'm using a loop delay of 0.1 second in WinButtons, and I don't see much cpu load while it's running, but that could be my system, as I'm running it on an i7-860 (quad-core with HT, so 8 virtual CPU's Cool)

Some people are just showoffs.  mrgreen

Once I get over myself a bit  Wink I'll see if I can elbow my code into Winbuttons, mostly because I like the idea of a graphic button.  Cool
Logged

-- bests, Tim

...this space unintentionally left blank.
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.056s | Server load: 0.12 ]