Google

Monday, March 10, 2008

Java Mobile Games Development

Saturday, March 8, 2008

Java class to exe

Convert Java to Exe

Java Remote DesktopCapture and Remote Control

http://www.indiwiz.com/products/dc/index.php

How It works

How to use java.awt.Robot

Opens notepad and enters text
Java.awt.Robot class is used to take the control of mouse and keyboard. Once you get the control, you can do any type of operation related to mouse and keyboard through your java code. This class is used generally for test automation.

This sample code will show the use of Robot class to handle the keyboard events. If you run this code and open a notepad then this code will write hi budy in the notepad.
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;

public class RobotExp {

public static void main(String[] args) {

try {

Robot robot = new Robot();
// Creates the delay of 5 sec so that you can open notepad before
// Robot start writting
robot.delay(5000);
robot.keyPress(KeyEvent.VK_H);
robot.keyPress(KeyEvent.VK_I);
robot.keyPress(KeyEvent.VK_SPACE);
robot.keyPress(KeyEvent.VK_B);
robot.keyPress(KeyEvent.VK_U);
robot.keyPress(KeyEvent.VK_D);
robot.keyPress(KeyEvent.VK_Y);

} catch (AWTException e) {
e.printStackTrace();
}
}
}

To capture Desktop
 public void captureScreen(String fileName) throws Exception {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
BufferedImage image = new Robot().createScreenCapture(new Rectangle(screenSize));
ImageIO.write(image, "png", new File(fileName));


Alternatively, we might capture our JFrame, including its window decoration, as follows

public void captureFrame(JFrame frame, String fileName) throws Exception {
BufferedImage image = new Robot().createScreenCapture(frame.getBounds());
ImageIO.write(image, "png", new File(fileName));


}


Saturday, March 1, 2008

Software Protection or Software Destruction?

http://www.sofpro.com/

I downloaded the trial version PC Guard for Win32 from above link.
Tested it on Notepad.exe.

Notepad.exe totally failed to run.

Draw your own conclusions.
For me, I promptly deleted the downloaded PC Guard.

Wednesday, February 27, 2008

How to add SendTo in Vista

copy and paste this into explorer:

%APPDATA%\Microsoft\Windows\SendTo

then create shortcut in the folder that opens.