EzDevInfo.com

desktop interview questions

Top desktop frequently asked interview questions

Create popup "toaster" notifications in Windows with .NET

I am using .NET and am creating a desktop app/service that will display notifications in the corner of my Desktop when certain events are triggered. I don't want to use a regular Message Box b/c that would be too intrusive. I want notifications to slide into view and then fade out after a few seconds. I am thinking of something that will act very much like the Outlook alerts that one gets when a new message arrives. The question is: Should I use WPF for this? I've never done anything with WPF but will happily try it if that's best means to the end. Is there a way to accomplish this with regular .NET libraries?


Source: (StackOverflow)

How to open a file with the default associated program

How do I open a file with the default associated program in Java? (for example a movie file)


Source: (StackOverflow)

Advertisements

Which embedded database to use in a Delphi application?

I am creating a desktop app in Delphi and plan to use an embedded database. I've started the project using SQlite3 with the DISQLite3 library. It works but documentation seems a bit light. I recently found Firebird (yes I've been out of Windows for a while) and it seems to have some compelling features and support.

What are some pros and cons of each embedded db? Size is important as well as support and resources. What have you used and why?


Source: (StackOverflow)

C#: Get complete desktop size?

How do I find out the size of the entire desktop? Not the "working area" and not the "screen resolution", both of which refer to only one screen. I want to find out the total width and height of the virtual desktop of which each monitor is showing only a part.


Source: (StackOverflow)

Change desktop wallpaper using code in .NET

How can I change the desktop wallpaper using C# Code?


Source: (StackOverflow)

PHP as a Desktop Programming Language

I'm not much of a programmer, PHP is where I'm comfortable. And sometimes I find that I need to do things, such as arrange files or rename files on a mass scale on my computer. And I think I could do this with PHP but I can't of course.

So I was curious, is there a way I could run PHP files as kind of exe files.

EDIT: Fairly important point, using Windows.


Source: (StackOverflow)

Open a link in browser with java button?

How can I open a link in default browser with a button click, along the lines of

button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
        open("www.google.com"); // just what is the 'open' method?
    }
});

?


Source: (StackOverflow)

How to run a shell script in OS X by double-clicking?

I have a shell script that has user execution permission on OS X, but when I double click on it, it opens in a text editor. How can I get it to run by double-clicking it?


Source: (StackOverflow)

Hardware-accelerated OpenVG implementation on Desktop based on OpenGL ES [closed]

I'm currently trying to get OpenVG up and running on my desktop. The problem comes here: I am / will be developing an application for a Windows CE device (with .NET compact framework), which has hardware-accelerated OpenGL ES 2.0 and OpenVG 1.0.1 (based on TI OMAP35x, if you're interested). The application will definitely use OpenVG for drawing, and likely OpenGL for some effects if OpenVG doesn't offer them (i.e. blur).

Now I'd like to develop on my desktop without the emulator (see this question). So I thought I just import OpenVG with P/Invoke, which was quite easy, since the OpenVG people made their constants into real enums, and though a procedural C API, it translated very well into an object-oriented form (with a Graphics class for drawing and Path, Paint, Stroke and Image objects). I also managed to get going with differently named DLLs and entry points. Oh, and I imported EGL 1.3, also quite easy to translate to an object-oriented API.

Until this point, it sounded quite good. I thought I'd just use the OpenVG reference implementation from Khronos, but it is slow. Really slow. You know, like clearing the surface taking literally a second! So I thought, fine, OpenVG is a standard, I'll just take one of the other implementations. Most of them are based on OpenGL, which is what I want. Or isn't it?

No, it's not. Creating an OpenGL ES 2.0 surface with EGL 1.3 (supplied with the PowerVR Windows Emulation SDK for OpenGL ES 2.0) is not compatible with any OpenVG implementation I tried. Some of them require traditional OpenGL (AmanithVG GLE), the EGL version supplied by PowerVR doesn't support OpenVG. Most implementations don't even have EGL and use some bizarre functions to initialize the context - all of them assuming that an OpenGL context has already been created. OpenGL, not OpenGL ES. Sigh.

The only one I could get to work was AmanithVG SRE, which is very fast for a software implementation and does not rely on OpenGL or EGL. It works, but it is still far too slow for real time animations.

I can't believe that these things feel so wrong. I'm really tempted to just use WindowsMobile.DirectX.Direct3D, for which PowerVR supplies an emulation layer for Desktop Windows, in the hope that the final Board Support Package will supply Direct3D as an OpenGL ES wrapper, like it seems to be on many devices.

So, the question, finally:

Is there any OpenVG implementation for Windows Desktop systems that works with OpenGL ES 2.0? Bonus points if it works smoothly with PowerVR's OpenGL ES 2.0 emulation and the supplied EGL 1.3.

Or should I just try to use a traditional OpenGL 2.0 implementation on the Desktop? But they're typically not supplying EGL as well. I don't want to have two initialization layers (EGL and WGL). Or should I?

Note: this is not a .NET question, because the problem is the very same without .NET.


Source: (StackOverflow)

Need Advice on Implementing a Time-limited Trial

I'm developing a shareware desktop application. I'm to the point where I need to implement the trial-use/activation code. How do you approach something like this? I have my own ideas, but I want to see what the stackoverflow community thinks.

I'm developing with C++/Qt. The intended platform is Windows/Mac/Linux.

Thanks for your advice!


Source: (StackOverflow)

Twitter Bootstrap2 100% height responsive

I want to make a responsive layout with twitter's bootstrap v2, with a column and a map.

The idea is to build a UI like that from maps.google.com, but using a responsive design with bootstrap2.

I want to have a style for desktop with

  • navbar on top
  • 1 left column (as sidebar)
    • height: 100% minus navbarHeight, with a scrollbar
    • width: .span3
  • content that fills the rest of the screen

Then for the responsive mobile design I want the parts that have the full height to have a height depending on the content.

I made a sketch to explain better sketch

EDIT: Looking to do something like this but responsive, and only with north (navbar), west (sidebar), and center (content)

EDIT2: I finally made it with jquery, but I want a CSS solution. If someone asks, I will put the solution as an answer.

EDIT3: Ok, here is the solution I found using JQuery (I think it's easy to do with plain js)

$(window).bind('resize', function() {
    if ( $(window).width() > 980 ) {
        $("#content").height(($(window).height()-40)+"px")
        $("#sidebar").height(($(window).height()-58)+"px")
        $("body").css("padding-top","40px")
    }
    else {
        $("#content").height(($(window).height()-50)+"px")
        $("#sidebar").height(($(window).height()-68)+"px")
        $("body").css("padding-top","0px")            
    }

    $("#sidebar").css("overflow", "auto")
    $("body").css("padding-bottom","0px")
    $(".navbar").css("margin-bottom","0px")
});

The $(selector).css() functions and the conditional if could be replaced with plain css and the media queries from CSS3 http://twitter.github.com/bootstrap/scaffolding.html#responsive

But the problem is that $(window).height() is calculated runtime. That should be replaced maybe by something like a height:100% in CSS, and that could do the trick, but I couldn't find the right place to put that 100% height.

EDIT4: Here I found what it could be a CSS-only solution! If I make progress, I'll post the answer! http://blog.stevensanderson.com/2011/10/05/full-height-app-layouts-a-css-trick-to-make-it-easier/


Source: (StackOverflow)

What's the difference between SpecialFolder.Desktop and SpecialFolder.DesktopDirectory?

I'm confused about the differences between these two special folders.

Here's a code snippet that writes the output of each, but they output the same thing.

string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
string pathTwo = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);

Console.WriteLine(path);
Console.WriteLine(pathTwo);

Console.ReadKey();

According to the MSDN documentation (for .NET 1.1):

Desktop
The logical Desktop rather than the physical file system location.

DesktopDirectory
The directory used to physically store file objects on the desktop. Do not confuse this directory with the desktop folder itself, which is a virtual folder.

What does it mean when it says the logical Desktop rather than the physical file system location? Also, what is a virtual folder in simple terms?

In the newer .NET 4 version of the documentation, I noticed that they removed the Desktop entirely and only left DesktopDirectory. Why is this?


Source: (StackOverflow)

Windows 7 Remote Desktop Connection Save Credentials not working [closed]

Trying to connect from Windows 7 to a Remote Windows 2008 Server via Remote Desktop Connection

I always used to be asked for credentials during logon – even though i saved my credentials

This error would creep up

Your system administrator does not allow the use of saved credentials to logon to the remote computer computername/ipadress because its identity is not fully verified. Please enter new credentials. The logon attempt failed

There is no-trust-relationship when connecting 2 computers from different domains. Windows uses NTLM in this case and the default domain machine policy does not allow use of saved credentials.


Source: (StackOverflow)

Mac OS X - run shell script from the desktop GUI

You can create a shell script or a Python or Ruby script and run it on the Mac by using "Terminal" ... if you have Finder open, and you click on the icon for the file containing the source code of a saved shell script, is there a way to have that script run, instead of opening in my text editor ?


Source: (StackOverflow)

HTML5 drag and drop between windows

is there anyway with the HTML5 Drag & Drop functionality or/and the File API to drag an jpg image from one window to another?

The idea is that I could drag and image from Facebook to a different browser's window with a custom HTML that would get that image.

Or, at least, a way to drag from the Desktop to a browser?

Thanks a lot


Source: (StackOverflow)