Posts

Showing posts with the label windows

Opera Fullscreen Autoshow/hide Toolbar

Image
Another thing missing from Opera is the fullscreen mode autoshow/hide toolbar. Yes, there are ways to show and autohide the toolbars with delay using keyboard shortcuts and mouse gestures as described here , however, often time we (especially netbook users) just want to use our mouse to show the address bar or tab bar to navigate back/forward or to switch tabs. So, my idea is, when we go to fullscreen mode, we add a handler to detect when the mouse reach the top of the screen, and when it does, we would like to send Opera the show toolbars shortcut. I have searched through Opera Extensions API if there is a way to send an internal Opera action command through an extension, but so far the result is none. So, finally, I decided to utilize Autohotkey to the rescue. Basically I wrote a script to detect when Opera is active, and detect when mouse position reach top of the page, then send the keyboard shortcut to Opera. #NoTrayIcon ; Uncomment this line to show Tray Icon #Persistent ...

Programmatically Start/Stop Windows Service

Source: http://www.dotnetspider.com/resources/865-How-start-stop-windows-services-programmati.aspx [C#] using System.ServiceProcess; // add .Net Reference to Project ServiceController controller = new ServiceController(); controller.MachineName = "."; controller.ServiceName = "MySQL"; string status = controller.Status.ToString(); // Stop the service controller.Stop(); // Start the service controller.Start();

File/Folder names cannot be created in Windows XP/Vista

In Windows XP/Vista, we cannot create file/folder with the following names: con, aux, nul, prn, lpt(1-n), com(1-n) The reason: those words are reserved as MSDOS device drivers Source: http://support.microsoft.com/kb/74496/en-us But, if you still INSIST to have folder with those names, here is what to do Source: http://kerneltrap.org/node/5772 Run in Command Prompt (Start - Run - cmd) To create folder aux in drive D: mkdir D:\aux\ To remove folder aux in drive D: rmdir D:\aux\ To copy file into folder aux: copy filename.ext D:\aux\ To delete file in folder aux: del D:\aux\filename.ext Note: you cannot copy files to or delete folder manually in Windows Explorer Also, if we already have a file named "test" in a directory, then we cannot create a folder named "test" inside that directory, and vice-versa, if we already have a folder named "test", we cannot create a file named "test" in the same directory. In this case, we cannot trick it even using ...