473,847 Members | 1,715 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 6690
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
1642
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 at slide.Shapes.PasteSpecial. I am able create a System.Drawing.Bitmap object from the memory...
2
10220
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, and it works great; however, the same techniques are not working for selecting individual slides. ...
8
7086
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
2028
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 press the mouse button nothing hapens. thank you for helping me.... :) here is the code:
1
4048
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 have managed to get a VBscript macro going in Powerpoint. Once the show begins I click a button to...
1
13934
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
8121
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 be interpreted poorly when they are brought into Flash. Also, make sure there are no objects that...
1
11917
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
9730
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10983
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10648
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10707
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10341
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9485
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7883
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5719
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4529
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

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.