All I want is to make a simple application that you can resize while rendering.
(IE resize while never once seeing the buffer out the edge of the screen)
Most commercial, professional, and major open source programs seem to be capable of this, while most all personal or hobbyist programs never seem to be capable of this. (I have no idea why)
I want to make a professional looking program like that.
A few examples of what I'm talking about:
https://gamedev.stackexchange.com/questions/127691/how-to-stop-sdl-from-freezing-the-rendering-while-resizing-the-window
https://www.gamedev.net/forums/topic/488074-win32-message-pump-and-opengl---rendering-pauses-while-draggingresizing/
https://en.sfml-dev.org/forums/index.php?topic=19388.5
What I have used in the past for windowing are:
SDL (Currently)
SFML
GLFW +OpenGL
And this problem applies to all 3 from what I can recall.
I would like to know the following:
If this is a problem that is solvable, please tell me why or why not
I've never once looked that low-level (OS APIs nor Graphics back-ends) so I just want to know why.
What's the way to solve this? Is it within my means?
Is the solution -really- a perfect solution? I've seen many people suggest solutions that have various problems
(IE minimizing the buffer but not getting rid of it entirely OR you got rid of it but there's a ton of flickering (I forgot why but it doesn't matter))
My current understanding is that this a Win32 API/Windows API related bug related to blocking.
I don't have any deeper understanding or knowledge on how to create my own solution easily, but if I must learn then I will.
I need to take a screenshot of a currently hidden window without giving focus to that window. I saw a post on this, here: Window screenshot using WinAPI
I've never used this method, so any advice is greatly appreciated.
I would like to be able to do this either in Windows or OS X, is it possible to do in OS X? It doesn't necessarily need to be in the same language or be cross platform, but of course, that's a plus :).
I would investigate the possibility of asking the window to draw itself into a bitmap, rather than trying to take its picture with a screenshot. That might be a way of making it irrelevant that the window is minimized. Something like the WM_PRINT or WM_PRINTCLIENT message. I suspect that's actually what the person was trying to do who asked the original question that you linked to. The biggest pitfall is if the window doesn't handle that message appropriately. Not all apps are so well-behaved. Also, I don't think it works for windows that are truly hidden, but I can't tell from your question and the flurry of articles you link to whether or not that's a real concern.
Unfortunately, I also know nothing about programming OS X; I'm just a user on that platform. You might try diving into the Qt sources to see how they're doing it cross-platform, if that's really important to you.
It's hard to imagine that you could have one solution that would work on Windows and OS X. The windowing frameworks are completely different. It would be harder to try to come up with one solution that to write two.
On Windows at least, I'm not convinced you'll have much luck taking a screenshot of a hidden or obscured window. When you search for this on the web, there are a gazillion hits for people asking that very question. None of them appear to have succeeded. If you factor in DWM and Aero glass then I think your chances of success are limited.
There are many applications for Windows these days that don't use native windows controls, don't have standard window frames and generally look different. What are some recommended techniques for creating such interfaces?
There are good reasons not to. Like that you will most likely not do a better job than Windows does. (Maybe it will look better (in your opinion), but will it behave?). Or that it's not what most users expect. Or that it will look like s**** on Windows 2011.
That said, it's not hard. You simply handle the WM_NC* events like WM_NCPAINT or WM_NCHITTEST. NC stands for Non Client (window area). And of course, there is a trick on Vista/Win7 (you have to announce it to the DWM).
From an implementation aspect, you could employ WPF (Windows Presentation Foundation) assuming you code for .NET :) It has pretty bunch of skinnable controls, that may look like native and may not.
From a design aspect, if your interface isn't going to follow documented standards (like the Windows UI guidelines), it has to be intuitive. I think the new generation of Windows applications will go through a growing phase in a manner similar to the early days of the Web. After a time, some standards or common themes will evolve.
Can you give us some sample applications? Some apps that don't use native windows controls use cross-platform GUI libraries, like Qt for C++ or Tkinker. These maintain the same look across different platforms.
I wouldn't really recommend making your user interface different deliberately. You don't stand to gain much. Your controls are almost always going to be buggier than native controls, and you are requiring the user to learn something new. Now, if you're controls add a large enough value to be worth the users' time it can be okay. But making them get used to different looking buttons is rarely worth it.
I`m not sure if this answer your question.
You can use third party skinning controls like from Infragistics, or SkinSoft for example.
But like Bubba said I`d recommend going for WPF.
Model-View-Controller! It's as valuable here as in web apps or anywhere else. Be sure to keep the part of your program that generates the custom UI separate from the part of your program that flashes the BIOS.
I know this question is 10 years old but none of the answers mention using an option in visual studio, dont know if it existed at the time.
Theres an option to remove the border of the window in visual studio (called borderStyle). Thats the easiest way to do it, using C#. After removing the border, all you have to do is create a new interface. If you're looking to do it in C++, i think you need to use DWM. I will let an example i found here.
https://github.com/melak47/BorderlessWindow
Another example (maybe without DWM? didnt test):
https://social.msdn.microsoft.com/Forums/vstudio/en-US/b98c4c06-9581-44d3-8e5a-4adb2316e653/win32-about-styles-how-can-i-do-a-borderless-window?forum=vclanguage
There is a lot of people disencouraging to do it in this thread but there's no reason to not do it, if you know what you're doing your application can look great.
Does anyone have experience with embedding messaging or mailing programs into VS? I'm interested in things like Skype or Instant Messenger being embedded as tool windows. If you use (or have used) something like this, how has it affected your productivity?
I'm not sure why you want to do this? I find I already have too little space in VS.
That aside, almost every dev team I have been on now communicated via a combination of IRC, MSN, Skype etc. We have always found that a flashing toolbar is a much smaller distraction to your programming zone than a tap on the shoulder. It also means we can stick our headphones on, and faze out into focused programming land, aka "The Zone", without concern for missing co-workers trying to get your attention.
I second the fact that I would find this very annoying; I prefer to read messages on my own basis, not when someone wants to send me something, and then be forced to distract my attention from what I'm on.
That said, you could fairly trivially host some sort of messaging website (twitter perhaps, or any other) in a tab in VS. I wouldn't, but you could.
My machine is seriously underpowered, and I think I need to start conserving every spare cycle. I know that my Gnome environment seems to underperform compared to my coworkers' KDE setups. But if I'm going to make that big of a switch, I might as well consider running something even lighter.
Is it possible to survive on a lightweight window manager and still run modern apps (Firefox, Eclipse, OpenOffice)? What's a good candidate window manager for me to try, and what do I need to know?
The window managers listed below all subscribe to the lightweight and fast approach.
They are faster than fully fledged window managers like KDE or Gnome and trim down on most visual distractions. Which one you pick will be mostly determined by your own taste and what you can get to run.
There's a subfamily of these window managers, notably those which attempt to let you do everything by keyboard and let you tile your applications with minimal screen real estate waste. These can feel funny if you come from mouse-oriented window managers. XMonad and ratpoison are members of this family.
xfce
ratpoison
fluxbox
awesome -1, cannot handle minimize to tray
XMonad
dwm
fvwm (codebase for another WMs)
icewm
Englightenment
wmii
openbox
pekwm
I like XMonad. It's very stable, has very low overheads, and has an active user/developer community.
XMonad is almost as minimal as ratpoison, but it displays multiple windows by tiling them, and even allows floating windows if you really need them (e.g. for modal dialogues or GIMP). It's certainly given my underpowered Ubuntu box a new lease of life!
Edit: I forgot to mention: XMonad is keyboard-based rather than point'n'grunt, so there's a bit of a learning curve, but once I got the hang of it I found that I was much more productive.
Fluxbox is a good alternative and very lightweight.
http://www.fluxbox.org/
Icewm is quite nice and lean (used it for a while on an underpowered box but moved to KDE when the box was upgraded).
The first thing you should would be to build your own kernel, with just the things you need. That will save tons of resources.
Then, choose a lightweight WM. Ive found Enlightenment very light and awesome, give it a try.
Later, you should look for lightweight replacements of the apps you use.
You can replace OpenOffice with Abiword, Gnumeric.
Just google, and you will find very nice alternatives to those ram-eater software.
The thing I would recommend will be to avoid Java software, they'll run VERY slow on a low resources PC.
Also, check for the services that are currently running on your PC, and disable the ones you don't use.
Consider changing your current distro for a low resources distro. I found Debian very customizable and lightweight.
Good Luck!
I use FVWM for 7 years. Most of WM based on FVWM, but strip any flexibility of FVWM.
FVWM is just "interface" to Xlib so it bring to you all what in Xlib.
If you want currently popular tiling - just: FvwmPiazza::Tiler
Google for ~/.fvwm/config as get own from scratch is too difficult, this good one from which I started: http://zensites.net/fvwm/guide/
Also look to:
https://wiki.archlinux.org/index.php/FVWM
http://wiki.gentoo.org/wiki/FVWM
https://wiki.debian.org/Fvwm
I'll second xfce, it's probably the most popular of the lightweight WM's out there (perhaps due to its inclusion in Xubuntu). I've also had good experiences with Fluxbox (it came with Damn Small Linux when I used that as a lightweight Linux VM (back when VMs were slow :-) ).
There is definitely an ease-of-use learning curve to reckon with when migrating to these more lightweight WMs, but the performance benefits aren't hard to see on older hardware (menus appear instantly, navigation is pretty snappy).
I used Fluxbox for a long time, which is great for people used to having windows floating around like in KDE, Gnome etc. It's pretty small, pretty fast and highly configurable, plus it doesn't look as ugly as some other "minimalist" window managers. ;)
A few weeks ago I switched to awesome because I like how efficiently it places and resizes my windows. It's perfect for me since I almost always have just a full screen terminal on one screen and a browser on another screen. It also supports mixed window styles, so you can have windows managed by awesome and floating windows on one screen (e.g. I have almost always a managed full screen urxvt open and a small floating mplayer window in one of the corners). It's as lightweight as fluxbox, if not even faster, but doesn't offer as many options for customizing the look and feel.
I am using fluxbox too. Compared to a desktop envionment, using only a window manager is not as convenient. You choose every component yourself which is both a strength and a weakness. ROX file manager and usbmount are great companions to fluxbox. Also take your time to find some dockapps that may be useful.
Enlightenment (v16) is actually very lightweight compared to gnome/kde these days, and it is very configurable (although, nothing seems to be as configurable as fvwm) Florian's suggestions are all good, but if you're used to gnome/kde, then you probably won't like ratpoison / xmonad.
icewm has done me good for several years. I don't need most of the crap that the big-time desktops offer, but i do like a clock and CPU usage monitor running in the bar along the bottom - icewm does have these. It is noticeably lighter in feel than the popular desktops. No weirdness such as tiled windows or anti-mouse attitude. Customizing the root menu is also easy, much easier than doing so in KDE or Gnome, which i never did figure out adequately. At one place i worked, the sysadmin saw my screen and decided to give it a try. AFIK, he's still using it.
I'd recommend openbox. Its lightweight, very configurable, and works great without getting in the way. Very functional, and can do pretty much anything you want. I love it.
I tried PekWM for some time. I really liked it. It allowed me to group programs of the same type, for example: Terminals.
I myself have used 'lwm' or lightweight window manager for quite a while now and have been very happy with it. I use it with xfce4-panel which I use for a clock and better window manipulation. Lwm is truly light weight even more than xfce, icewm, pekwm and others.
I've used everything at one time or another, but I keep coming back to WindowMaker. I like the concept of the clip, the multiple workspaces (I keep one for each type of task) and the fact that it looks good with theming that is ridiculously easy.
Docker is an essential app to add to the desktop to keep nm-applet and other applets in the WindowMaker dock.
Don't judge it by the default theme. Use the Wprefs tool to customize it to your liking.
Cheers
KG
Over the years, I've downgraded the WMs of my machines. Since the more mainstream WMs, like Gnome or KDE become more and more resource hungry, it wasn't long, before I replaced Gnome with XFCE on laptops and desktop computers.
In fact, I've been using XFCE longer than any other WM. It seems to me, as if the niceties of things like Gnome and KDE are great when seeing them for the first time, but after using them for a few weeks and months, the novelty wears off, and it makes more sense to go back to a more streamlined environment.
The problem with XFCE is, that it's not as lightweitght as it needs to be for some of the older laptops I still have. I decided to use LXDE on those, and to be honest, I kinda have a love/hate relationship with that. It works fine, in the sense that it's quite resource friendly, and it's quick to log in, etc. But certain things don't seem to work that well. One of which is the task bar. It seems some of the icons don't fit, because they were designed for things like Gnome or XFCE. The icons still do work, but it's next to impossible to make the whole LXDE experience look the part.
Blackbox (+ bbkeys) is a little bit weird, but pretty nice thing. Also you can check the comparison table of window managers.