473,563 Members | 2,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable Key Board in Powerpoint slide

49 New Member
Hi,
Can any one tell me How to disable Keyboard Functions using JavaScript.If knows please tell me the code.Also tell me the code for mouse disable also.

Thanks,
Nagesh.
Sep 10 '08 #1
16 6638
RamananKalirajan
608 Contributor
Can i know for what reason u are disabling the keyboard. for a particular field u can do that by the following method

[HTML]function doThis()
{
return false;
}[/HTML]

[HTML]<input type="text" onkeypress="ret urn doThis();">[/HTML]

for this particular text box u cant enter anything. the key board behaves as blocked one. Is this ur requirement. you just post with some additional information about ur requirement

Regards
Ramanan Kalirajan
Sep 10 '08 #2
nagmvs
49 New Member
Can i know for what reason u are disabling the keyboard. for a particular field u can do that by the following method

[HTML]function doThis()
{
return false;
}[/HTML]

[HTML]<input type="text" onkeypress="ret urn doThis();">[/HTML]

for this particular text box u cant enter anything. the key board behaves as blocked one. Is this ur requirement. you just post with some additional information about ur requirement

Regards
Ramanan Kalirajan

Hello Sir,

Thanks for ur reply.Actually my y requirement is to disable keyboard keys in a particular web page what i am having.on that webpage i don't allow anyone to copy and paste and also printing.for using some code i disable it.

But now other requirement is to disable keyboard on powerpoint presentaion that means when a slide is playing i want to disable keyboard keys like pagedown, page up,arrow keys,Enter key,Backspace.H ome,End and also escape keys.
If possible tell me what is the code for this ?.I am already disable right mouse click and left clicks using some code.

So now i want to disable the above keys.If u know the Javascript code or HTML code means please tell me the code.
It's Urgent.

Thanks,
Nagesh.
Sep 11 '08 #3
mrcheeky
7 New Member
I once used this in the body to disable right-click (obviously this will need updating to the new format):

Expand|Select|Wrap|Line Numbers
  1. <script language=JavaScript>
  2. <!--
  3.  
  4. var message="Function Disabled!";
  5.  
  6. function clickIE() {if (document.all) {alert(message);return false;}}
  7. function clickNS(e) {if 
  8. (document.layers||(document.getElementById&&!document.all)) {
  9. if (e.which==2||e.which==3) {alert(message);return false;}}}
  10. if (document.layers) 
  11. {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
  12. else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
  13.  
  14. document.oncontextmenu=new Function("return false")
  15. // --> 
  16. </script>
  17.  
and this to disable select with left click, in the head:
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript1.2">
  2.  
  3. function disableselect(e){
  4. return false
  5. }
  6.  
  7. function reEnable(){
  8. return true
  9. }
  10.  
  11. //if IE4+
  12. document.onselectstart=new Function ("return false")
  13.  
  14. //if NS6
  15. if (window.sidebar){
  16. document.onmousedown=disableselect
  17. document.onclick=reEnable
  18. }
  19. </script>\
  20.  
I hope this helps.
Sep 11 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
But now other requirement is to disable keyboard on powerpoint presentaion that means when a slide is playing i want to disable keyboard keys like pagedown, page up,arrow keys,Enter key,Backspace.H ome,End and also escape keys.
Get the key/char codes of the keys pressed - this link should help. If they match, cancel them with a return false.
Sep 11 '08 #5
acoder
16,027 Recognized Expert Moderator MVP
I once used this in the body to disable right-click (obviously this will need updating to the new format):
The code is pretty outdated. You could get rid of most of that code and it should work fine in most browsers.

Note that all this mouse/key disabling is easy to circumvent. Don't depend on it.
Sep 11 '08 #6
Markus
6,050 Recognized Expert Expert
Whatever you do, the user will always be able to view the source of a page and, therefore, copy the content.
Sep 11 '08 #7
nagmvs
49 New Member
I once used this in the body to disable right-click (obviously this will need updating to the new format):

Expand|Select|Wrap|Line Numbers
  1. <script language=JavaScript>
  2. <!--
  3.  
  4. var message="Function Disabled!";
  5.  
  6. function clickIE() {if (document.all) {alert(message);return false;}}
  7. function clickNS(e) {if 
  8. (document.layers||(document.getElementById&&!document.all)) {
  9. if (e.which==2||e.which==3) {alert(message);return false;}}}
  10. if (document.layers) 
  11. {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
  12. else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
  13.  
  14. document.oncontextmenu=new Function("return false")
  15. // --> 
  16. </script>
  17.  
and this to disable select with left click, in the head:
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript1.2">
  2.  
  3. function disableselect(e){
  4. return false
  5. }
  6.  
  7. function reEnable(){
  8. return true
  9. }
  10.  
  11. //if IE4+
  12. document.onselectstart=new Function ("return false")
  13.  
  14. //if NS6
  15. if (window.sidebar){
  16. document.onmousedown=disableselect
  17. document.onclick=reEnable
  18. }
  19. </script>\
  20.  
I hope this helps.

Hello sir,

Thanks for sending this code.Sir already i disable left mouse and right mouse.now i want the code to disable Pageup,pagedown ,Arrow keys and also Backspace,Enter keys in a powerpoint presentation(Ac tually i ahve a power point presentation that is converted as html page).when a slide is running i want to disable all these keys.If u know the code means please send me.

I have some code to disable key board

Expand|Select|Wrap|Line Numbers
  1. <!-- This code is for disableing some keyboard keys-->
  2.  
  3. <SCRIPT language="Javascript">
  4. var keyesMessage="Questa funzione non si può usare!";
  5. function nokeys(){
  6. if (document.all)
  7. {
  8. //alert(keyesMessage);
  9. return false;
  10. }
  11. }
  12. if (document.all)
  13. {
  14. document.onkeydown=nokeys;
  15. }
  16. </SCRIPT>
  17.  
This code is running successfully in a web page.But not running on a power point slide.

so if u know the code to disable all keyboard keys( in any type of web page)
please send me the code.

it's urgent.

Thanks,
Nagesh.
Sep 12 '08 #8
nagmvs
49 New Member
Hello Guys,

I wan
t the code to disable keyboard in a power point slide.already i disable left mouse and right mouse.now i want the code to disable Pageup,pagedown ,Arrow keys and also Backspace,Enter keys in a powerpoint presentation(Ac tually i have a power point presentation that is converted as html page).when a slide is running i want to disable all these keys.If u know the code means please send me.



I have some code to disable key board :

Expand|Select|Wrap|Line Numbers
  1. <!-- This code is for disableing some keyboard keys-->
  2.  
  3. <SCRIPT language="Javascript">
  4. var keyesMessage="Questa funzione non si può usare!";
  5. function nokeys(){
  6. if (document.all)
  7. {
  8. //alert(keyesMessage);
  9. return false;
  10. }
  11. }
  12. if (document.all)
  13. {
  14. document.onkeydown=nokeys;
  15. }
  16. </SCRIPT>
  17.  
This code is running successfully in a web page.But not running on a power point slide.

so if any one know the code to disable all keyboard keys( in any type of web page)
please send me the code.

thanks in advance,
Nagesh.
it's urgent.
Sep 12 '08 #9
acoder
16,027 Recognized Expert Moderator MVP
What exactly are you trying to achieve by blocking these keys and mouse events? If you're trying to protect the content, then forget it. It's not worth the effort and will easily be bypassed by someone willing enough.
Sep 12 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1626
by: careta | last post by:
Hello, I'm trying to automate PP creation from VB.net. The initial code is (as extracted from MSDN's KB209960): Public Sub Command1_Click() ' Start PowerPoint. Dim ppApp As PowerPoint.Application ppApp = CreateObject("Powerpoint.Application") ' Make it visible.
0
568
by: Ata | last post by:
Hello, I am trying to copy the contents of the output of SQL Reporting Services to a PowerPoint slide. For this, I am using SQL Reporting Services to obtain an IMAGE stream, which I paste to the Windows clipboard. Then, using automation, I am trying to copy this information from the clipboard to a PowerPoint slide. However, I get an error...
2
10188
by: WillRead | last post by:
I have a VB.Net application and a PowerPoint presentation explaining how each form in the application works, etc.. I would like to select and display the slide appropriate for each form by pressing the F1 key. In other words, I want to use the powerpoint presentation for my help system. I am calling the SlideShow from the applications menu,...
8
7052
by: Rut | last post by:
Does anyone know how to start powerpoint from vb.net without the ppt screen appearing. I want to keep it hidden? Using this code: Try pp = New PowerPoint.Application pp.Visible = Office.MsoTriState.msoTrue pp.WindowState = PowerPoint.PpWindowState.ppWindowMinimized Application.DoEvents()
0
2014
by: milkyman | last post by:
Hi there, I hope you can help me. I did download some code, from the Microsoft knolidgebase(MSDN), and it's great. I just don't know how to change the code so that it uses a template, thats on my computer, instate of a blank page. Also i want to controle the presentation with a mouse click(or both). Now it's changing a slide after 5 sec. if i...
1
4032
by: EmmettBrown | last post by:
Hello, Just wondering if anyone can advise. I am trying to remotely control Powerpoint using a microprocessor. I am using RS232 (COM1). The idea is that the microprocessor sends ASCII strings to the PC and Powerpoint changes to the corresponding slide. For example: 01n - Go to slide 1 05n - Go to slide 5 02n - Go to slide 2, etc I...
1
13906
by: mumbaisalsa | last post by:
hi all, i want to run the slide show say ten slides and then close it , but in my code given below it opens the slide show and closes immediately ... .. please give me a solution to this problem 1. Please add MsPowerpoint11.0 object present in COM in ur references. 2. Code : -- Dim appPowerpoint as Powerpoint.Application
3
8092
by: WPeterson | last post by:
Converting PowerPoint to Flash would absolutely be a good choice to distribute your bulky PowerPoint presentations. You can do the whole PowerPoint to Flash conversion manually or with professional applications. First, you'll need to prepare the PowerPoint files. Make sure you are not using any complicated gradients or animations. These will...
1
11845
by: chrizstone | last post by:
Hi Guys, What i want to do is: I want to create a Slide programmatically where a Table is on it! Here´s my Code: String strTemplate; strTemplate = template; String tableSlide = @"C:\Temp\TableSlide_" + guid.ToString();
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.