Results 1 to 24 of 24

Thread: Disable start button and task bar via VB.net in ppsm

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Exclamation Disable start button and task bar via VB.net in ppsm

    I'm busy creating PowerPoint PPSM files. My problem is that the actual file appears in he taskbar once it is opened.. I worked hard on about 100 of these macro-enabled presentations and do not want someone to change it. unfortunately there is no way to let it be viewed via powerpoint viewer as all the macros does not work through the viewer.

    So i thought the easiest way will be to write a code in the actual ppsm and when you open the file the start button and task bar will not be seen until the file is closed again

    I searched for many codes but the moment i click on the start button you see the powerpoint file again in the taskbar..

    I'm very new to coding but now I have this project and I am in such a mess.

    Please can you think of a way to do this.. i will really appreciate it
    Kind regards
    Chan

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    33,442

    Re: Disable start button and task bar via VB.net in ppsm

    Shot in the dark as I don't know what ppsm is but... couldn't you change the display mode to full-screen or presentation mode?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Re: Disable start button and task bar via VB.net in ppsm

    Quote Originally Posted by techgnome View Post
    Shot in the dark as I don't know what ppsm is but... couldn't you change the display mode to full-screen or presentation mode?

    -tg
    Hi techgnome, thanks for the reply. ppsm is a macro enabled PowerPoint show, and yes it is running in full screen but if they click on the start button, you immediately see the PowerPoint button and if you click on that you see the actual file and also the path.. so anyone can copy and change that..

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Cool Unpin files from taskbar with VB.net code

    Hi I'm battling with this and my previous question was maybe the wrong question.
    Is it possible to write a vb.net code in a PowerPoint file, so that when the file is opened it does not appear on the PowerPoint button in the task-bar as recently opened.. No one must see the opened file in other words, and in that way they will not be able to change the file.

    Please help me with this..
    Regards
    chan
    Last edited by Chaps; May 22nd, 2017 at 09:24 AM. Reason: sounds stupid

  5. #5
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    869

    Re: Disable start button and task bar via VB.net in ppsm

    Chaps

    I too am in the dark re PPSM, but could you possibly make a copy yourself
    of the original, and have your app just replace it after the other user is
    finished.

    That might address the "change" issue.
    I have no idea how to address the "copy" issue.

    Spoo

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,383

    Re: Unpin files from taskbar with VB.net code

    you should be able to lock any vba project
    in vbaproject properties

    can .ppt files be password protected as other office documents?

    excel has option not to add to mru when opening workbooks, see if power point has the same

    as i do not have power point, that is all the help i can be
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  7. #7

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Re: Unpin files from taskbar with VB.net code

    Quote Originally Posted by westconn1 View Post
    you should be able to lock any vba project
    in vbaproject properties

    can .ppt files be password protected as other office documents?

    excel has option not to add to mru when opening workbooks, see if power point has the same

    as i do not have power point, that is all the help i can be

    thanks I will check again

  8. #8

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Re: Disable start button and task bar via VB.net in ppsm

    Quote Originally Posted by Spooman View Post
    Chaps

    I too am in the dark re PPSM, but could you possibly make a copy yourself
    of the original, and have your app just replace it after the other user is
    finished.

    That might address the "change" issue.
    I have no idea how to address the "copy" issue.

    Spoo
    Thanks for the reply. I think my problem is basically with the jump lists.. I do not want my files to appear in that list on another person's pc.. Any ideas regarding that maybe?

  9. #9
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    869

    Re: Disable start button and task bar via VB.net in ppsm

    Chaps

    Sorry, no
    Hopefully someone else has some.

    Spoo

  10. #10
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    33,442

    Re: Disable start button and task bar via VB.net in ppsm

    Try reading through this.
    http://www.pptfaq.com/FAQ00189_Contr...oint_files.htm

    It sounds like what you want to do is force it to open using the PP Viewer, rather than the full PP.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  11. #11
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,998

    Re: Unpin files from taskbar with VB.net code

    To get the list in VB.Net for MS Powerpoint, use the below. I have tested it in MS Office 2013.

    Code:
    Dim myReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
    Dim myReg_Key As Microsoft.Win32.RegistryKey
    
    myReg_Key = myReg.OpenSubKey("Software\Microsoft\Office\15.0\PowerPoint\User MRU\LiveId_6F85BDF91752C064A5A564E4859ED67464F1FF44C3A73229F1554E33CA77DECE\File MRU")
    
    Dim strRegistry_Keys = myReg_Key.GetValueNames() '.GetSubKeyNames()
    
    For Each strSub_Key As String In strRegistry_Keys
        MessageBox.Show (myReg_Key.GetValue(strSub_Key.ToString))
    Next
    The above code gets the details from the Registry directly.
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    OMEN by HP - 15-ce073tx with Win10+Office 2013. || Mac Book Pro (10.6.8) with Office 2011

  12. #12
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,998

    Re: Disable start button and task bar via VB.net in ppsm

    Office Dev thread merged with Vb.Net Thread and Moved to VB.Net
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    OMEN by HP - 15-ce073tx with Win10+Office 2013. || Mac Book Pro (10.6.8) with Office 2011

  13. #13
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Disable start button and task bar via VB.net in ppsm

    This feels really sketchy. I don't have enough context. Here's what I see, when I spell it out kind of simple maybe you'll see why I'm concerned.

    You wrote these PowerPoint files. You desperately need them to run macros. And you desperately need to make sure the user can't find where they are. That sounds pretty bad to me, as described.

    Why is it so vital that they don't "change the file"? Why can't you use Windows permissions or some other aspect of the filesystem to achieve this? Why not keep a copy of them for yourself so when someone inevitably breaks them you can fix them?
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  14. #14

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Re: Disable start button and task bar via VB.net in ppsm

    Quote Originally Posted by techgnome View Post
    Try reading through this.
    http://www.pptfaq.com/FAQ00189_Contr...oint_files.htm

    It sounds like what you want to do is force it to open using the PP Viewer, rather than the full PP.

    -tg
    No not true. I actually just do not want the files to appear in the jump lists..

  15. #15

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Re: Disable start button and task bar via VB.net in ppsm

    Quote Originally Posted by Sitten Spynne View Post
    This feels really sketchy. I don't have enough context. Here's what I see, when I spell it out kind of simple maybe you'll see why I'm concerned.

    You wrote these PowerPoint files. You desperately need them to run macros. And you desperately need to make sure the user can't find where they are. That sounds pretty bad to me, as described.

    Why is it so vital that they don't "change the file"? Why can't you use Windows permissions or some other aspect of the filesystem to achieve this? Why not keep a copy of them for yourself so when someone inevitably breaks them you can fix them?
    I create educational software and I don't want children to change the file and make it un-usable. So nothing sketchy basically.. Only me wanting to protect the actual files. I do understand a thread like this is idiotic to you because I'm only starting with coding and maybe it seems as if I have no idea what I am talking about.. you are correct in that and maybe that is why I asked for help in the first place

  16. #16

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Re: Unpin files from taskbar with VB.net code

    Quote Originally Posted by Siddharth Rout View Post
    To get the list in VB.Net for MS Powerpoint, use the below. I have tested it in MS Office 2013.

    Code:
    Dim myReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
    Dim myReg_Key As Microsoft.Win32.RegistryKey
    
    myReg_Key = myReg.OpenSubKey("Software\Microsoft\Office\15.0\PowerPoint\User MRU\LiveId_6F85BDF91752C064A5A564E4859ED67464F1FF44C3A73229F1554E33CA77DECE\File MRU")
    
    Dim strRegistry_Keys = myReg_Key.GetValueNames() '.GetSubKeyNames()
    
    For Each strSub_Key As String In strRegistry_Keys
        MessageBox.Show (myReg_Key.GetValue(strSub_Key.ToString))
    Next
    The above code gets the details from the Registry directly.
    Thanks for this. I will see if it is working. I see you closed this thread as something not important.. Sorry for the trouble.. but is is important to me that was why I asked the question in various ways and at the end I only wanted to clear the jump lists. But no one here can help me with that in any case and really just get a bit aggressive by closing a thread in such a terrible manner. how will a newby like me ever ask for help again

  17. #17
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    33,442

    Re: Unpin files from taskbar with VB.net code

    Quote Originally Posted by Chaps View Post
    Thanks for this. I will see if it is working. I see you closed this thread as something not important.. Sorry for the trouble.. but is is important to me that was why I asked the question in various ways and at the end I only wanted to clear the jump lists. But no one here can help me with that in any case and really just get a bit aggressive by closing a thread in such a terrible manner. how will a newby like me ever ask for help again
    What was closed were the extraneous threads (actually only one was closed, the other two were merged). Scattershot threads (creating multiple threads) doesn't do any good because it spreads the responses and you get partial answers and those answers don't have the information in the other threads. The third thread was closed not because it wasn't important, it's because it added no additional value.

    Part of the reason for the responses you have gotten is because it is unusual. Had you simply stated what the need was right from the start, the attitudes would have been far different. We've seen too many come-lately-johnnys that want to hide what they are doing. As a result, we tend to have a healthy skepticism when it comes to threads like these.

    That said... I think it's possible - think mind you - to "compile" the PPT into a standalone program so that you can distribute. I think. I'm not 100% sure. I'll see if I can look later.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  18. #18

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Re: Unpin files from taskbar with VB.net code

    Quote Originally Posted by techgnome View Post
    What was closed were the extraneous threads (actually only one was closed, the other two were merged). Scattershot threads (creating multiple threads) doesn't do any good because it spreads the responses and you get partial answers and those answers don't have the information in the other threads. The third thread was closed not because it wasn't important, it's because it added no additional value.

    Part of the reason for the responses you have gotten is because it is unusual. Had you simply stated what the need was right from the start, the attitudes would have been far different. We've seen too many come-lately-johnnys that want to hide what they are doing. As a result, we tend to have a healthy skepticism when it comes to threads like these.

    That said... I think it's possible - think mind you - to "compile" the PPT into a standalone program so that you can distribute. I think. I'm not 100% sure. I'll see if I can look later.

    -tg
    Thanks so much for the kind reply. unfortunately i need it in a ppsm format otherwise the macros does not work. and the viewer supplied by Microsoft disable the macros.. it is such a huge frustration. the macros I used is mainly to mark an answer incorrect or correct or to drag and drop certain items. All answers and results are then exported to excel.. I so wish Microsoft supply a proper viewer.. i really do not understand why they go through the trouble of let us create all the awesome stuff and then disable that exact same stuff when we release it to the client.. So I actually wanted to release the raw files in the powerpoint show format but then it pops up in the jump lists.. now the children(who is really clever today), can chop and change and the parents will then just contact me and tell me the stuff is not working.. so I wanted to fix that before I actually release the files to the parents

  19. #19
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    869

    Re: Unpin files from taskbar with VB.net code

    Quote Originally Posted by techgnome View Post
    We've seen too many come-lately-johnnys
    Is that Brit-speak for port-o-loos?
    I've always heard them referred to as Johnny-come-latelys.

    (Sorry .. couldn't resist)

  20. #20
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Disable start button and task bar via VB.net in ppsm

    It's not an idiotic problem. It's actually a difficult problem. But I had some concerns about it, since Office macros have been an important vector for viruses in the past.

    When I have a difficult problem and I can't think of a solution, the first thing I like to ask is, "Is this really the problem, or can I solve a similar and easier one instead? "I want to disable the taskbar" isn't your problem. Your problem is, "I don't want the files to be changed in a way that makes them stop working." That's still a hard problem.

    You'd have to lock down the system in a lot of difficult ways, deal with the registry in ways that might cause Windows security to stop you, and you can't really stop the kid from just tooling around in Windows Explorer and stumbling into your files. You can write-protect them and take other measures, but since they need to be viewed I don't think that will be effective either. I feel lke this approach is sort of like writing a blacklist-based virus scanner: if you find 99 ways to stop the kids from changing the file, they'll find the 100th and 101st and you'll be sad.

    Here's a different, easier solution: "be able to restore the file if it breaks". That would mean you keep a permanent, unchangeable copy of the file somewhere and give the user a way to get that file copied onto their system. This is kind of like a "repair" feature. I think it will be more reliable, overall.

    The easiest solution might be a write-only USB drive, or a web link to download new files, etc. In an office environment, you could put the files on a network share and grant only certain people write access. But you're dealing with arbitrary machines, it's hard to write software that locks things down like that.

    So here's a more complicated approach that will still work.

    You write a "launcher" application. It helps the user filter the available presentations, and presents buttons/links/whatever to let them launch the one they want. That application comes with a big fat binary file that is actually all of the PowerPoint presentations bundled together using some kind of format you create. When the program starts, it checks a directory on the hard drive. If the presentations aren't there, it "unbundles" them and creates the appropriate files in the directory. The UI has a "repair" button. The user clicks this if one of the files becomes broken. When "repair" is clicked, the same process as "when no presentations exist" happens. The program "unbundles" everything and replaces all of the files in its directory.

    That's relatively tamper-proof, and if anyone breaks the files you've given them a way to "unbreak" them. I think writing this application would be much easier than trying to find everywhere the file location is stored/displayed and locating API to lock down each of those places.

    I suppose the kid could delete your file, or take a hex editor to it and corrupt it. There comes a point where you can't really do anything to save a user from themselves.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  21. #21
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    869

    Re: Disable start button and task bar via VB.net in ppsm

    Chaps

    As long as Sitten now has us thinking "outside the box", how about this for a novel approach ..
    use a PictureBox.

    By that, I mean that you create an app in .Net (as a stand-alone EXE) that has a PB (among
    other controls) on the form that loads and displays the PowerPoint "slides". That way, the
    users could see the presentation but would not have the ability to copy or change the actual
    "slides" .. it would be totally independentfrom PowerPoint.

    The down-side of this approach is that you'd need to establish some sort of "in the cloud"
    storage location that your app would "call" to gain access to the "slides". I imagine that
    this would involve a fair amount more infrastructure than you initially anticipated.

    EDIT:

    Upon re-reading, seems like Sitten's "launcher" app is a similar approach.

    Spoo
    Last edited by Spooman; May 24th, 2017 at 11:22 AM.

  22. #22
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    33,442

    Re: Disable start button and task bar via VB.net in ppsm

    Quote Originally Posted by Spooman View Post
    Chaps

    As long as Sitten now has us thinking "outside the box", how about this for a novel approach ..
    use a PictureBox.

    By that, I mean that you create an app in .Net (as a stand-alone EXE) that has a PB (among
    other controls) on the form that loads and displays the PowerPoint "slides". That way, the
    users could see the presentation but would not have the ability to copy or change the actual
    "slides" .. it would be totally independentfrom PowerPoint.

    The down-side of this approach is that you'd need to establish some sort of "in the cloud"
    storage location that your app would "call" to gain access to the "slides". I imagine that
    this would involve a fair amount more infrastructure than you initially anticipated.

    Spoo
    I considered that too... but would it still run macros? I'm thinking it wouldn't. That seems to be the sticking point... You'd also have to slice up the PPT, find the right slide, then load it into the pic box...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  23. #23
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,998

    Re: Unpin files from taskbar with VB.net code

    Quote Originally Posted by Chaps View Post
    Thanks for this. I will see if it is working. I see you closed this thread as something not important.. Sorry for the trouble.. but is is important to me that was why I asked the question in various ways and at the end I only wanted to clear the jump lists. But no one here can help me with that in any case and really just get a bit aggressive by closing a thread in such a terrible manner. how will a newby like me ever ask for help again
    I hope TG has cleared the confusion regarding merging of the threads

    Did you try the code that I gave? You can easily remove the entries using that code.
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    OMEN by HP - 15-ce073tx with Win10+Office 2013. || Mac Book Pro (10.6.8) with Office 2011

  24. #24

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    13

    Re: Unpin files from taskbar with VB.net code

    Quote Originally Posted by Siddharth Rout View Post
    I hope TG has cleared the confusion regarding merging of the threads

    Did you try the code that I gave? You can easily remove the entries using that code.
    I only use VB in PowerPoint (Developer).. when I paste this code, all is red.. and it is not working there.. I think this code is maybe for another platform?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width