Monday, April 21, 2008

How to get Screen resolution


There is a way to read the Screen resolution. It could be useful to know ,for example, whether the screen resolution now is 800 x 600 or 1024 x 768.It may helps you to determine the size of your main form,for example.

Please, Follow the following Steps:
1- Download the jar file "myutil.jar"
2- copy the jar file to /forms/java
3- go to /forms/server
4- edit the formsweb.cfg and add the jar name to the attribute:Archive_Jini
5-edit the file default.env file and add the full jar path and name to the CLASS_PATH attribute
6- open the regedit and add the full jar path and name to the FORMS_BUILDER_CLASSPATH
7- open the form Builder and choose progarm>Import Java Class
8- import the following class: custompkg.ReadScreenSize
9- A pL/SQL package is now created with the same name of the class
10- the following procedure display message for the reolution,Just an example.

Declare
screenObj ora_java.Jobject;
width number;
height number;
Begin
screenObj := readscreensize.new;
width := readscreensize.getScreenWidth(screenObj);
height := readscreensize.getScreenHeight(screenObj);
message(width'x'height);
end;

1 comment:

Raza Hassan said...

library download link is not working.