﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Enhancement Requests  » Browse Dialog Results</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 04:52:13 GMT</lastBuildDate><ttl>20</ttl><item><title>Browse Dialog Results</title><link>http://forum.strataframe.net/FindPost19227.aspx</link><description>&lt;FONT size=2&gt;&lt;P&gt;I have been meaning to ask for&amp;nbsp;this for awhile but never get around to it and just end up doing it my local SF source then forgetting about it until the next time I update :). My users are migrating from a FPW app and really love the keyboard, so&amp;nbsp;in trying to keep the native's happy&amp;nbsp;I have my browse dialogs set up as&amp;nbsp;follows I have the search key set&amp;nbsp;to keys.enter and&amp;nbsp;the setfocustoresultsaftersearch property&amp;nbsp;to true and have added code below to the BD source to handle the lv.results key down&lt;/P&gt;&lt;P&gt;The idea is that a user can enter their search criteria hit enter, the results come up, and then they arrow down to the&amp;nbsp;correct&amp;nbsp;record,&amp;nbsp;hit enter and the BD copy's data and closes form. Setting both the search and accept key to enter will not work as the&amp;nbsp;search would evaluate first so&amp;nbsp;it would just keep searching,&amp;nbsp;so what&amp;nbsp;I have been doing is&amp;nbsp;trapping the Lvresults key down&amp;nbsp;event and if&amp;nbsp;enter copy data and close form as below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure you guys would want to add a property to turn this on/off&amp;nbsp;and what not but if you could add this I'd sure be happy about it.&lt;/P&gt;&lt;P&gt;Thanks Paul&lt;/P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; lvResults_KeyDown(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; sender &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Object&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.Windows.Forms.KeyEventArgs) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt; lvResults.KeyDown&lt;BR&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; e.KeyCode = Keys.Enter &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; lvResults.SelectedItems().Count &amp;gt; 0 &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.CopyDataAndCloseForm()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 11 Sep 2008 09:37:49 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Browse Dialog Results</title><link>http://forum.strataframe.net/FindPost19293.aspx</link><description>Thanks Edhy sometimes&amp;nbsp;I only make sense to myself!!:D</description><pubDate>Thu, 11 Sep 2008 09:37:49 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Browse Dialog Results</title><link>http://forum.strataframe.net/FindPost19271.aspx</link><description>Hi Paul,&lt;/P&gt;&lt;P&gt;And it all make sense to me, it looks like a very logic and direct approach to navigate in the Dialog Browser.</description><pubDate>Wed, 10 Sep 2008 17:20:03 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Browse Dialog Results</title><link>http://forum.strataframe.net/FindPost19268.aspx</link><description>Hiya Ivan,&lt;/P&gt;&lt;P&gt;That would work but not how my user's want it to work.:D&amp;nbsp;I have tried to do it with&amp;nbsp;all types of combination's with the browse dialog but it is not really doable.&lt;/P&gt;&lt;P&gt;My users&amp;nbsp;want to use the enter key&amp;nbsp;for both the&amp;nbsp;search and accept.&amp;nbsp;So asigning&amp;nbsp;the say&amp;nbsp;F2 key to the accept button is not what they want they want to be able to do, they wish to do the following&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;browse dialog displays&lt;/LI&gt;&lt;LI&gt;user enter's search criteria using Tab key to go between multiple search fields&lt;/LI&gt;&lt;LI&gt;user hits&amp;nbsp;the enter key which then&amp;nbsp;executes the search&amp;nbsp;and then the&amp;nbsp;focus is set to the results list view.&lt;/LI&gt;&lt;LI&gt;user arrows down to correct record and then uses the&amp;nbsp;Enter Key again to&amp;nbsp;accept and select that record.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;In other word's the Results List View would just respond to the enter key the same way it does to a double click. &lt;/P&gt;&lt;P&gt;&amp;nbsp;In my foxpro system the users enter their search criteria hit enter and then another modal picklist form pops up and they arrow through the results and then hit enter wich closes both the modal results form and the underlying search form and leaves them on the record they were looking for in the particular edit screen. So I am trying&amp;nbsp;to emulate that &amp;nbsp;process of type first name "john" hit tab key type last name "do" hit enter set n&amp;nbsp;results arrow to&amp;nbsp;john doe's record hit enter form closes and&amp;nbsp;I am on&amp;nbsp;john does employee maintence form.&lt;/P&gt;&lt;P&gt;Hope that makes sence</description><pubDate>Wed, 10 Sep 2008 16:46:36 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Browse Dialog Results</title><link>http://forum.strataframe.net/FindPost19265.aspx</link><description>[quote]I currently have my BD set up with the search key being enter[/quote]&lt;/P&gt;&lt;P&gt;[quote] and accept key to enter. [/quote]&lt;/P&gt;&lt;P&gt;Hey Paul.&lt;/P&gt;&lt;P&gt;Have you tried setting different keys to each of this actions?</description><pubDate>Wed, 10 Sep 2008 13:54:43 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Browse Dialog Results</title><link>http://forum.strataframe.net/FindPost19264.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;One of is misssing something :) I currently have my BD set up with the search key being enter set results to focus = true and accept key to enter. with that set up the user would &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;enter search criteria hit enter --Search key is set to Enter&lt;/LI&gt;&lt;LI&gt;Focus is set to results and user arrows through them&lt;/LI&gt;&lt;LI&gt;user finds correct record and hits enter--- the form executes another search rather than accepting and closing&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;looak at code below and you will see what i mean,&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' Pre-filters all key strokes to see if any special action needs to take place&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Protected&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Overrides&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/FONT&gt;&lt;FONT size=2&gt; ProcessCmdKey(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByRef&lt;/FONT&gt;&lt;FONT size=2&gt; msg &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.Windows.Forms.Message, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; keyData &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.Windows.Forms.Keys) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Boolean&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; keyData = _BrowseDialog.SearchKey &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ExecuteSearch()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ElseIf&lt;/FONT&gt;&lt;FONT size=2&gt; keyData = _BrowseDialog.AcceptKey &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdOK.Enabled &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;CopyDataAndCloseForm()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ElseIf&lt;/FONT&gt;&lt;FONT size=2&gt; keyData = _BrowseDialog.CancelKey &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;DialogResult = System.Windows.Forms.DialogResult.Cancel&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Else&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MyBase&lt;/FONT&gt;&lt;FONT size=2&gt;.ProcessCmdKey(msg, keyData)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Just return a value indicating the item was handled&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;True&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]</description><pubDate>Wed, 10 Sep 2008 13:19:13 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Browse Dialog Results</title><link>http://forum.strataframe.net/FindPost19255.aspx</link><description>In case I am missing something, you should be able to do this right now....or at least get &lt;EM&gt;&lt;U&gt;really&lt;/U&gt;&lt;/EM&gt; close.&amp;nbsp; There is a propertly called SetFocusToResultsAfterSearch which will move the focus to the results set after a query...you can then use the keyboard to find the desired record.&amp;nbsp; Also, you can control the search and accept keys using the following properties:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;AcceptKey&lt;/LI&gt;&lt;LI&gt;CancelKey&lt;/LI&gt;&lt;LI&gt;SearchKey&lt;/LI&gt;&lt;/UL&gt;</description><pubDate>Wed, 10 Sep 2008 10:24:02 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>