We've implemented a shell property handler for a custom file format, with some standard properties and some custom. When we browse our files in Explorer our properties display nicely, but when our files appear in search results they don't. It seems that Explorer isn't querying our property handler when it displays search results.
My question is this: When Explorer displays an item in search results, where does it look for the item's properties? Does it query the appropriate handler, or does it look somewhere in some kind of search cache?
If it queries the handler then I'll investigate why our handler isn't called. (Maybe it's a registration fault.) If it looks in a search cache then I'll investigate why our files aren't indexed properly.
A secondary question: Is the search results pane restricted to a limited subset of the standard properties? In other words, should we just give up trying to display interesting properties here?
Some observations:
Our file format is just .msg (Outlook email message) renamed to .msga. Our handler knows how to read the .msg file format.
Property values display correctly in Browse mode.
They don't display in Search mode.
Property values are displayed correctly in Explorer's details pane, in either mode.
Some standard properties display OK in the search results, but not others, and no custom properties do. For example, these all display OK but are not served by our handler: System.ItemName, System.ItemUrl, System.Size, System.DateCreated. These are available in our handler but do not display: System.Title, System.Message.FromAddress, System.Message.DateSent.
Explorer is clearly reading our HKCR\<progid> registry key, because the display adapts as we edit ContentViewModeForSearch etc.
Our .msga file type is listed in Control Panel as an indexed file type, and our files are in an indexed directory. And I rebuilt the entire index this morning.
We haven't implemented a filter. Control Panel says that it's using "Office Outlook MSG IFilter" for .msga. (I don't know how it figured this out - maybe I copied a registry setting early in the project, or maybe Windows inferred it because we use Outlook for preview.)
Our handler implements IPropertyStore but its methods seem never to be called. (We've implemented some logging, to a file that the search indexer should have access to, but we can't be sure about that.)
Event Viewer shows gatherer error 3036 during indexing: "The content source <csc://{S-1-5-21-2153095834-1917727522-598830505-500}/> cannot be accessed." I think that SID is my user account, and so I wonder whether it's trying to index something to which it doesn't have privileges.
Related
We have been using PDF file as a part of help docs in our vb.net desktop application. In PDF, we would traverse to the certain chapter in the PDF doc.
Now we have decided to use MadCap Flare as documentation tool. We have a menu item in vb.net form for documentation. On click of the link, we want to open the specific chapter of the Flare documentation.
You know managing content with single-source XML authoring is possible when using MapCad Flare (I'm not using Flare!). You can publish content to an increasing number of formats including HTML5, WebHelp, PDF, Word, XHTML, Clean XHTML, EPUB, DITA and more by MapCad Flare.
So, you may continue using PDF and the way connecting your vb.net desktop application help.
Using HTML based topics maybe another solution for your needs by creating Help for a form, a dialog or control with HTML files (See also: Help for controls with VB .NET).
Properties to display help (HTML file - local)
Activate the hlpProvider component hlpHtmlLocal and set the HelpNameSpace property of hlpHtmlLocal to the file name you want to work with.
We open a local HTML file with the dialog using the little button to the right.
The next step is to set the HelpNavigator property of a control (e.g. button) to a value of the HelpNavigator enumeration (see table below). Here we use Topic.
When the application is running click the HelpButton to enable "What's this .." Help. The cursor changes. Now click the button or press F1 when the button has focus. This will open the single HTML file in your browser.
It seems you can't use anchor names to jump to a specific part of your HTML file.
Properties to display help (HTML file - Server http://..)
Activate the hlpProvider component and set the HelpNameSpace property of hlpHtmlServer to the file name you want to work with. Here we use a http:// address of a single HTML file. If you provide the file on your company server, you don't have to update the help file with the customer.
The next step is to set the HelpNavigator property of a control (e.g. button) to a value of the HelpNavigator enumaration (see table below). Here we use Topic. Then we set the HelpKeyword on hlpHtmlSever property to e.g. "anchor3". Don't add a leading "#". Leave it empty if you want to open a HTML file without anchors. The Help Handles cmdControl2.Click Dim sHelpFile As String Dim sStartupPath As String '--- Initialize context-sensitive help --- Keyword property provides the key information to retrieve the help associated with the control.
When the application is running click the HelpButton to enable "What's this .." Help. The cursor changes. Now click the button or press F1 when the button has focus. This will open the single HTML file over the Internet in your browser.
Sorry I don't know how to name it other than "advanced custom properties". If I know, I would search it first.
I am dealing with a legacy code using 3-rd party controls.
In VB6, When you drag that control onto the form, you can see all the properties supported by the control in the "Properties" window. Such as MarginLeft, MarginRight etc. etc.
That's no problem.
In the "Property" window, the top-most property is generally the "(Name)" field, which is the name of the control.
But the 3-rd party control I am using, has another two "fake properties" above "(Name)", which are "(About)" and "(Custom)".
When you click "(About)", there will be a dialog box showing the company info. When you click "(Custom)", there will be another dialog box showing more properties. These dialog boxes are shown in VB6.
In the "(Custom)" dialog box, you can modify normal properties (same as modifying directly in the Property window). You can do more. There are more properties that are not normal properties (at least you cannot find anything in the Property window).
When you save this form, for normal properties, everything are saved into .FRM file. E.g.,
Control1.MarginLeft = 5
Control1.Text = "I am a control"
However, for the "advanced properties" edited in the (Custom) dialog box, they are not saved in .FRM, they are saved in .FRX in binary format.
E.g., in (Custom) dialog box, you can edit a property called "Caption", which includes text of this caption, the font, the weight, the display style, and a lot of similar properties for Caption. In .FRM, it is something like,
Control1.Caption = "frmForm1.frx":013F
All the text and related properties of Caption are saved in binary format in .FRX file.
Note that, there's no Caption property in the normal Property window, you can only edit it in the "(Custom)" dialog box.
My question is as follows,
How to implement such a (Custom) dialog box that can be shown in VB6?
How to let VB6's Property window display (About) and (Custom)?
How to tell VB6 that Caption property shall not be displayed in Property window, but you can use directly in code as Control1.Caption = xxxx.frx:offset?
How to tell VB6 that this Caption property shall be saved in .FRX, and how to tell VB6 the size of the data, so that VB6 can manages the offset automatically?
How to load the data automatically via VB6 so that the correct values can be displayed in (Custom) dialog box?
As far as I know, .frx formats are secrets, there are a lot of ppl digging into various .frx for standard controls such as Binary(images), List, and Text. I am curious how can a 3-rd party control utilizing .frx, shall the 3-rd party control define its own .frx format? Including for example, how many bytes in front for Length (or no length field at all, it's fixed length), how many bytes for style1, how many bytes for style2, etc.
Thanks a lot. If you know what proper name it is for this "advanced properties", just tell me the name and I can search myself.
I tried to search for advanced properties but didn't really get anything I want to know.
The frx files are for binary or other non-basic data types. The frm will store the simple properties. What you need to do is to hook into the UserControl events WriteProperties and ReadProperties. You don't need to know where the backing storage is (frm vs frx)., you just need to access the PropBag to read and write your data.
Google is your friend to find the documentation:
https://msdn.microsoft.com/en-us/library/aa242140(v=vs.60).aspx
Or additional information on the topic:
http://www.vbforums.com/showthread.php?365735-Classic-VB-How-do-the-ReadProperties-and-WriteProperties-work-(PropertyBags)&s=3cfbd675928ad1eb94f68fbfb13ccd88&p=3672781&viewfull=1#post3672781
Good luck!
So I've made the following control in Design Mode then added the control to a new page Custom in my toolbox.
Now, what would I use for the progID parameter in Controls.Add()? How do I look up this value? Controls.Add("Forms.Frame.1") adds a regular frame, not the desired custom control.
As far as I am aware, you do not generate a new progID with a custom control. Per the MSDN documentation for custom/modified controls:
Note: When you drag a control onto the Control Toolbox, you only transfer the advanced property values.
So only the properties are transferred; the actual control is still of the same type/s as the one you created it from. Further, it looks like this progID is "a unique system-wide string that the Windows operating system can use to identify your control's type." So unless you are up to coding your own control, it looks as though you're just passing properties to the custom toolbox controls you create there.
You'll have to just replicate the custom control each time you want to add it. Just create a sub with all the correct properties and call it. Not what you were looking for, but it'll get the job done.
When deleting records within the platform, this action is not reversible via the front end. Is there a way to allow users to remove a record from their view without actually deleting the record?
You can simulate recycle bin functionality within Archer GRC by adding a record permission field that grants read access to "Everyone". If read access is no longer required then an editor of the record can go in and change "Everyone" to a group called "Recycle Bin."
Please note that if there are other record permission fields in the application, users or groups may still have access if they are selected in those fields. Perhaps You can set up a dropdown status field for the user to select "Recycle Bin" and use this condition for automatic record permissions to revoke permission to the record depending on the requirements or workflow of the application.
Solution shared by Igritte might be somewhat confusing for end users.
End user will see greyed out "Delete" button in the top toolbar, but he has to select "Recycle Bin" in the form. This solution was not accepted by my business owner at some point.
As a work around for "Soft delete", I wrote a custom object overriding "Delete" button functionality.
1. User doesn't have delete access to the record, so JavaScript code will make "Delete" button look like active and available.
2. Once the button is clicked, custom object will populate value in the
hidden value list and simulate the click on the "Save" button.
Update: Note that Custom object needs to hide the value list first once the page is loaded. Here you will need to use a JavaScript and do the following: [a] locate the value list DOM object and [b] set display attribute to none. I used jQuery library to do both. This way your value list is not displayed, but you still can use it to control data driven events.
3. With hidden value populated and submitted, record permission will hide this record from the end user.
Note that custom object hides one value list on the layout as well.
If for some reason JavaScript doesn't load properly, user simply will not be able to click on the grayed out "Delete" button.
Update: Hidden value list can be populated by custom object using JavaScript code as well. You need to identify the form tag "input" in HTML code of the page and set attribute "value" to the desired state. I used jQuery library to do this as well.
I have this solution in production working fine with IE11, FF and Chrome.
I can't share the code, but with WC3Schools JavaScript guides and 4 hours you can write and test it yourself with very little JavaScript skills.
Sometimes you have to use custom objects when you want to get a user-friendly solution of not available functionality.
Good luck!
I'd like to create a read-only view in the infopath.However when I disable the attachment control ,user can not download the file at all.How to make sure users can only download file from the attachment control but not be able to upload or remove it.
If you are customizing a SharePoint List form, you will not be able to set the File Attachment control to read only. However, I was able to work around this, and this will work for you even if it's just a regular form, by using repeating sections with hyperlink controls inside.
In the Fields pane, click on Show Advanced View
Expand Attachments so you can see the attachmentURL field
Drag attachmentURL into the form and choose Repeating Section with Controls
Click in the section and press CTRL-K to insert a Hyperlink
Enter . in Data Source for Link to
Enter . in Data Source for Display
There are some gotchas and workarounds for some problems you may encounter. See more details on my blog post http://vincepangan.com/?p=220
context menu -> Properties, there is a check box (the first one) on the first tab, make sure it is not checked.
EDIT: If your view is read-only, you cannot download the attachment. The workaround is to clear the read-only checkbox of the view, and activate the read-only on all other controls. The attachment control can be configured to not allow upload/modification of the attachment. This means that in order to upload or modify an attachment, you'll need an other view.
See also entries on msdn:
http://social.msdn.microsoft.com/Forums/en/sharepointinfopath/thread/1106f090-7767-431f-a699-b81c1173c2ee
http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/36c07bd7-a5ba-4fa0-b992-e9a94103dbf4
http://social.technet.microsoft.com/Forums/sr-Latn-CS/sharepoint2010customization/thread/412e80ce-badb-4467-a2d1-7e1696774058