9 Replies - 985 Views - Last Post: 07 December 2015 - 11:57 AM Rate Topic: -----

#1 alaslipknot   User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 32
  • Joined: 08-November 12

I want to create an alternative to f.lux what should i know ?

Posted 06 December 2015 - 10:13 AM

Hello,

I am a game developer who's been working with unity for the past 3 years and has intermediate Java background another other web dev "skills" from college (studied for a degree in embedded system and hardware programming)

Anyway,
Lately i found myself in need for a software that will allow me to control my desktop screen brightness but to make it more simple, i don't want something that will access the hardware brightness settings of the screen, i just need something that do what f.lux does, but instead of applying a transparent orange layer over the entire screen, i want to apply a transparent black (or dark blue) layer over the entire screen and be able to control its transparency to "simulate" a brightness control setting.

I think these are the most important things that i need :

  • determine the screen resolution and create a borderless window to fill the screen
  • fill that window with the desired color
  • keep that window on top of everything
  • prevent that window from getting any focus so i can still select anything i want
  • a UI control window to enable/disable the brightness tool and change its settings


So do you think this is simple enough to be done for someone who never used Visual Studio or C# outside of Unity ? like i said, i am not a beginner programmer but i am a total noob when it comes to making Windows specific application.

What do you suggest please ?

Thank you and have a good day

Is This A Good Question/Topic? 0
  • +

Replies To: I want to create an alternative to f.lux what should i know ?

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15685
  • View blog
  • Posts: 62,818
  • Joined: 12-June 08

Re: I want to create an alternative to f.lux what should i know ?

Posted 06 December 2015 - 11:09 AM

It will be a challenge. For the most part unity uses c# as a scripting language and less an actual program. It will be had in terms of research and form, but do-able.
Was This Post Helpful? 0
  • +
  • -

#3 alaslipknot   User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 32
  • Joined: 08-November 12

Re: I want to create an alternative to f.lux what should i know ?

Posted 06 December 2015 - 11:41 AM

View Postmodi123_1, on 06 December 2015 - 11:09 AM, said:

It will be a challenge. For the most part unity uses c# as a scripting language and less an actual program. It will be had in terms of research and form, but do-able.


Hi, not sure if you got my question right, but let me clarify just in case :)/>

I don't want to create this software with unity, i want to create it with whatever tool you guys suggest, i just mentioned my unity and college experience just to let you know that i am not a complete programming beginner specially when it comes to algorithm and figuring out a solution for a given problem, but just like any tool in the world, since i have zero knowledge of C# outside of unity, i was looking for an expert advice before getting started.

Thank you

This post has been edited by alaslipknot: 06 December 2015 - 11:42 AM

Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15685
  • View blog
  • Posts: 62,818
  • Joined: 12-June 08

Re: I want to create an alternative to f.lux what should i know ?

Posted 06 December 2015 - 12:15 PM

No, I certainly understood you were not using Unity. I was explaining that how Unity uses C# is not how regular app development utilizes C#. Unity is all about the scripting and which is different than C# by itself.
Was This Post Helpful? 0
  • +
  • -

#5 alaslipknot   User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 32
  • Joined: 08-November 12

Re: I want to create an alternative to f.lux what should i know ?

Posted 06 December 2015 - 12:19 PM

View Postmodi123_1, on 06 December 2015 - 12:15 PM, said:

No, I certainly understood you were not using Unity. I was explaining that how Unity uses C# is not how regular app development utilizes C#. Unity is all about the scripting and which is different than C# by itself.


Oh yes i know that :)

I made few apps for Android using Android Studio, i also made some web application with PHP and HTML5, and some embedded-c too, but as you may guessed, making games is all that i want to do but i also like programming and am thinking of expanding my C# knowledge and was just wondering if this is a good place to start.

Thanks
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15685
  • View blog
  • Posts: 62,818
  • Joined: 12-June 08

Re: I want to create an alternative to f.lux what should i know ?

Posted 06 December 2015 - 01:36 PM

Well - the premise is wrong. f.lux doesn't apply a color window on top, but instead jacks with the color calibrations.

searchable terms: "c# color calibrations"

It will, more than likely, require you to dive into pinvoke land which is a little hard to digest.


Examples:
http://www.pinvoke.n...egammaramp.html
http://www.pinvoke.n...devicegammaramp
https://msdn.microso...v=vs.85%29.aspx
Was This Post Helpful? 0
  • +
  • -

#7 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5106
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: I want to create an alternative to f.lux what should i know ?

Posted 07 December 2015 - 08:17 AM

As modi123_1 says, you're going to need to get into P/Invoke territory, which is calling into the Win32 C DLLs. .NET doesn't expose everything that the Win32 API does; sometimes you have to extern out to them. While I can't give you direct advice as I've never went looking for how to control color output, I can tell you it won't be something baked into .NET.

As Modi says, it's unlikely that F.Lux is applying any kind of overlay; rather they're messing with the color settings at the source.
Was This Post Helpful? 0
  • +
  • -

#8 alaslipknot   User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 32
  • Joined: 08-November 12

Re: I want to create an alternative to f.lux what should i know ?

Posted 07 December 2015 - 11:09 AM

View Postmodi123_1, on 06 December 2015 - 01:36 PM, said:

Well - the premise is wrong. f.lux doesn't apply a color window on top, but instead jacks with the color calibrations.

searchable terms: "c# color calibrations"

It will, more than likely, require you to dive into pinvoke land which is a little hard to digest.


Examples:
http://www.pinvoke.n...egammaramp.html
http://www.pinvoke.n...devicegammaramp
https://msdn.microso...v=vs.85%29.aspx



View PostCurtis Rutland, on 07 December 2015 - 08:17 AM, said:

As modi123_1 says, you're going to need to get into P/Invoke territory, which is calling into the Win32 C DLLs. .NET doesn't expose everything that the Win32 API does; sometimes you have to extern out to them. While I can't give you direct advice as I've never went looking for how to control color output, I can tell you it won't be something baked into .NET.

As Modi says, it's unlikely that F.Lux is applying any kind of overlay; rather they're messing with the color settings at the source.




Okay that seems like a solution but what about the overlay idea ? wouldn't be much more simple to do ? i just want to know if it is possible to create a panel (window) and be able to select elements "behind" it like desktop shortcuts, etc...
I still didn't dive in it but i think these could be useful :

Control.CanFocus and Control.CanSelect

thanks
Was This Post Helpful? 0
  • +
  • -

#9 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15685
  • View blog
  • Posts: 62,818
  • Joined: 12-June 08

Re: I want to create an alternative to f.lux what should i know ?

Posted 07 December 2015 - 11:36 AM

Quote

Okay that seems like a solution but what about the overlay idea ? wouldn't be much more simple to do ?

No, the overlay is not a viable idea. The overlay is a 'thing' that would take prio on interaction with anything it is over. If you want to click on the icon, and the panel is on top of everything, you will only be clicking on the panel. The color calibration is the only real way to go, and it is what f.lux did.
Was This Post Helpful? 0
  • +
  • -

#10 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5106
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: I want to create an alternative to f.lux what should i know ?

Posted 07 December 2015 - 11:57 AM

You can make panels transparent and you can make it so you can click through them, but you'll be clicking through to the form, not the desktop under it. You can't (easily) make a form that passes clicks through to whatever is underneath it. Plus you'd have to constantly re-capture and re-draw what's under the form anyway.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1