6 Replies Latest reply on Mar 28, 2013 5:19 AM by O.Developer

    How to call operating system(windows) functions like sutdown,refresh,et

    979801
      Hello,
      I am new in Oracle D2k.I want to know that how to call windows XP/7 shell commands(operating system functions) or windows function key(like F5 for system refresh in windows xp/7) in an Oracle Form.
      Actually I have to make a trigger which can fire at pressing a particular key and execute appropriate action of Windows7 like shutdown,F5(function key of windows to system refresh).
      thank you
      regards
      aaditya.
        • 1. Re: How to call operating system(windows) functions like sutdown,refresh,et
          indra budiantho
          is it for client or server side? if for client try to search webutil, if for server side use dbmsjob.
          • 2. Re: How to call operating system(windows) functions like sutdown,refresh,et
            Michael Ferrante-Oracle
            Exactly which Forms version are you using? Also, you refer to "shutdown". Are you talking about shutting down the machine or exiting the running form?
            • 3. Re: How to call operating system(windows) functions like sutdown,refresh,et
              979801
              thanx for reply,
              system config.-Operating system-windows7
              Oracle database- oracle 11g.
              oracle forms 11g(fusion middle ware).
              I have to make buttons(at client side) which can call operating system functions like- shutting down,refresh,copy and paste and most important to call F11(operating system function key) which is used to keep internet explorer page in full view mode).
              than kyou.
              • 4. Re: How to call operating system(windows) functions like sutdown,refresh,et
                Michael Ferrante-Oracle
                Just for future reference, regardless if you are posting in the Forms area of the forum or any other, terms like Forms 11g, Oracle 11g, etc are parts of product names. They are not version numbers although they do offer a slight hint. It is very important that when posting you include the complete version number of any products related to the problem or question you have. For example, you said you are using Oracle Forms 11g. Look at how many possible versions "Forms 11g" could possibly be:

                11.1.1.1
                11.1.1.2
                11.1.1.3
                11.1.1.4
                11.1.1.6
                11.1.2.0
                11.1.2.1

                With each new patch release and major release, a large number of bug fixes are included. In the case of new major releases, in addition to bug fixes, many new features are added. So knowing the version number is important.

                Beyond that, it would appear that you have many questions:

                1. How to copy and paste
                2. How to execute a system shutdown
                3. How to force the browser into full screen mode
                4. Refresh - this one is unclear. What do you mean by "refresh"?

                Let me answer those that I can:

                <blockquote>o Functions like cut/copy/paste are available directly from your Forms code. For these I would recommend referring to the Builder's Online Help. Look for CUT_REGION, COPY_REGION, PASTE_REGION. It might also be helpful to understand SELECT_ALL. For example you may want to code a Copy button like this:
                GO_ITEM('some_text_field);
                SELECT_ALL;
                COPY_REGION;
                o To execute a system shutdown on the client machine, you would first need to WebUtil enable your form. Refer to the Forms Builder Online Help for information about how to use WebUtil. You can also find lots of information in this forum about WebUtil. Once enabled, you can execute a Windows shutdown in various ways. Here one option:
                Declare
                     my_cmd varchar2(255);
                Begin
                     my_cmd := 'cmd /c start "" "' || '"shutdown -s -f -t 1"' || '"';
                     WEBUTIL_HOST.HOST (my_cmd);
                End;
                Refer to the Microsoft documentation for more information: http://technet.microsoft.com/en-us/library/bb491003.aspx

                o I'm not sure what you are attempting to do with the F11. I understand that this function key sets the browser to full screen, but the form will not exactly adjust for this change in browser size. You can adjust the applet size dynamically, but not the form. For that you would need to code the behavior yourself. So, before I can offer something specific, it would be helpful to understand what you expectation is and if what you want is to set the browser to full screen, why not just allow the end user to do it? You could easily have a java script popup displayed before the form starts which might say something like "To maximize your browser, press F11"

                o Finally, "refresh". I don't know what you mean here. Refresh what? The Windows desktop, browser, Oracle Forms.....
                </blockquote>
                1 person found this helpful
                • 5. Re: How to call operating system(windows) functions like sutdown,refresh,et
                  979801
                  thanx,with the help of your post now I am able to get solution and I would apply your suggestions.
                  thank you
                  regards
                  Aaditya.
                  • 6. Re: How to call operating system(windows) functions like sutdown,refresh,et
                    O.Developer
                    Hi

                    This is excellent , explained very well for people like me.
                    Thanks