My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
![]() Posts: 333 Joined: 21-September 14 From: Tampa Bay, Florida, USA ![]() | @Albert Kallal In the FolderCopy program you developed for me, is there a way to display more details in the dialog box that shows the progress bar? CODE Imports Microsoft.VisualBasic.FileIO Imports System.Environment Module Module1 Public Sub Main() If GetCommandLineArgs().Count <> 3 Then Console.WriteLine("Missing from or to folder or too many values") Exit Sub End If Dim strSourceFolder As String = GetCommandLineArgs(1) Dim strDestinationFolder As String = GetCommandLineArgs(2) My.Computer.FileSystem.CopyDirectory(strSourceFolder, strDestinationFolder, UIOption.AllDialogs) End Sub End Module This post has been edited by FrankRuperto: Nov 11 2019, 03:39 PM Attached File(s) ![]() ![]() -------------------- Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's. |
![]() Post#2 | |
![]() UtterAccess VIP Posts: 2,898 Joined: 12-April 07 From: Edmonton, Alberta Canada ![]() | Well, as always, the issue is always in the details. Quite sure this example uses shell() from VBA Anyway, the issue is what additional details would one want? And, more important, do we want to pass+use such details from Access? (so that's two issues!) So, for example, in place of a folder copy, we could go to a file by file copy, and thus display more information about the file, but then again, that means writing some kind of loop, and switching from a folder copy to executing commands for a file by file copy. And that means writing mode code! (not the end of the world - but hey, I am kind of lazy!). So, one could "cobble" together something that displays custom information, or say whatever we want, but I suppose it really depends on what kind of additional information. So, maybe we just want some kind of "panel" with a company logo, some information, and then on top of that we use/launch/have the existing windows file copy panel appear. And if we start say doing a file by file copy, then we will lose the time remaining. Regards, Albert D. Kallal (Access MVP 2003-2017) Edmonton, Alberta Canada |
![]() Post#3 | |
![]() Posts: 333 Joined: 21-September 14 From: Tampa Bay, Florida, USA ![]() | I just wanted to display the details of the default Windows copy progress dialog. Without substantially changing existing code, I thought that the UIOption Enum would offer additional choices other than AllDialogs and OnlyErrorDialogs, (e.g. AllDialogsDetails) so the user would not have to click on the "More Details" button in the progress dialog box, but there doesn't appear to be a way to automate that, so no big deal, the user can just click it if they want to know more. BTW, this Environment.Is64BitProcess Property can be used for determining if a process is running as x64. This post has been edited by FrankRuperto: Nov 11 2019, 10:23 PM -------------------- Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's. |
![]() Post#4 | |
![]() UtterAccess VIP Posts: 2,898 Joined: 12-April 07 From: Edmonton, Alberta Canada ![]() | Ah ok. It not that we want to add more details, or “our” details to the copyfolder dialog. So the the basic question is can we have the more details option expanded by default when the windows FolderCopy dialog shows. I believe there are some registry hacks and what not that would expands this by default. (they really should have added a option to the FolderCopy method for us!). Right now, I not aware of a means to do this, but I bet with grabbing the windows handle and “firing” off that button, we may well be able to do this. (but this would be trickery, since our code would NOT want to wait for the box to finish – some type of call back likely would be required here. And it also possible that sub-classing of the FolderCopy method is available, then again we likely could do this. I have not really googled this, but grabbing the windows handle, and firing off that button is a possible, - just one that I don’t know off the top of my head. However, that is a “dialog” box, so in theory I would have to launch + display the box, expand the more details, and THEN pass/set the from/to folders and then tell it to start. Windows REALLY should remember what the user did last time. So, the above “might” be possible, but getting one’s hands on the documentation as to how to do this would take more time then writing the code. Edit: Kind of interesting when you said "more details" I assumed you wanted more details or additional information of your choosing - my bad. But interesting how I read the request as something different then what is plain clear to me now. Regards, Albert D. Kallal (Access MVP 2003-2017) Edmonton, Alberta Canada |
![]() Post#5 | |
![]() Posts: 333 Joined: 21-September 14 From: Tampa Bay, Florida, USA ![]() | No worries, I should have been more explicit in explaining that "More details" is an existing option in the Windows default progress dialog box. I tried looking for registry values for FolderCopy.exe but strangely the custom program is not registered, and Windows usually warns asking if it should be allowed to execute and registers it. Can I register its dll with regasm? I tried obtaining more info about the executable, see attached image. Attached File(s) -------------------- Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's. |
![]() Post#6 | |
![]() UtterAccess VIP Posts: 2,898 Joined: 12-April 07 From: Edmonton, Alberta Canada ![]() | As noted, there is a hack. The last time I looked, it was specific to windows 7. I just googled again, and this came up: https://www.ghacks.net/2013/12/19/always-di...iles-windows-8/ but, above is for windows 8. And one for windows10: https://www.tenforums.com/tutorials/60654-s...ndows-10-a.html As noted,the other way is windows api, and grabbing the windows handle (hwnd). But it a complex process. eg: this http://msdn.microsoft.com/en-us/magazine/cc163304.aspx R Albert |
![]() Post#7 | |
![]() Posts: 333 Joined: 21-September 14 From: Tampa Bay, Florida, USA ![]() | Thanks for your research and time, I looked in Win7 regedit but could not find the OperationStatusManager subfolder of Explorer that was mentioned in your links. One would think that expanding the progress dialog to show more detail, explorer would remember that selection and continue displaying progress details in future operations, or there would be a check box for that, like in explorer's folder view options, but ... I also looked at this MS doc about IFileOperationProgressSink interface, but I did not see any options for toggling details so no big deal, let the user manually expand it. Thanks again for your efforts! -------------------- Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's. |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 7th December 2019 - 07:13 AM |