MDI - Menu Cut/Copy/Paste Not Working Even With Shortcut Keys Disabled

Posted by: jasonmell on 8 September 2017, 2:03 pm EST

  • Posted 8 September 2017, 2:03 pm EST

    Working in Visual Studio with the latest version of Spread for Windows Forms (v4.0.3512). If you use Ctrl+C, etc. in the form directly and paste to Excel, there is no issue.  However, if you select information in the Spread and use the menu item to copy/cut and then paste in Excel, it never makes it to the clipboard. All I am using is SendKeys so its pretty weird that its not working this way. I have a sample project attached for your viewing/testing. Please let me know what I can do to get this rectified. Removing these menu options is not sufficient for this program.
    2009/09/testproj091609.zip
  • Replied 8 September 2017, 2:03 pm EST

    <p>Also, these are the two forum references that state this should work after removing the Shortcut Keys</p><p> </p><p>http://www.clubfarpoint.com/Forums/forums/1/68164/ShowThread.aspx</p><p>http://www.clubfarpoint.com/Forums/forums/thread/72410.aspx</p>
  • Replied 8 September 2017, 2:03 pm EST

    <p>Hello Jasonmell,</p><p>You may use Spread's ClipBoard.Cut( ),Copy( ) & Paste( ) methods in order to perform these actions over Spread.Hence you may replace the code for Cut, Copy & Paste in your application with the below code,</p><p> Private Sub CutToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CutToolStripMenuItem.Click<br>        If Form1.FpSpread1.Focused = True Then<br>            Form1.FpSpread1.ActiveSheet.ClipboardCut()<br>        Else<br>            SendKeys.Send("^X")<br>        End If<br>    End Sub<br><br>    Private Sub CopyToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CopyToolStripMenuItem.Click<br>        If Form1.FpSpread1.Focused = True Then<br>            Form1.FpSpread1.ActiveSheet.ClipboardCopy()<br>        Else<br>            SendKeys.Send("^C")<br>        End If<br>    End Sub<br><br>    Private Sub PasteToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles PasteToolStripMenuItem.Click<br>        If Form1.FpSpread1.Focused = True Then<br>            Form1.FpSpread1.ActiveSheet.ClipboardPaste()<br>        Else<br>            SendKeys.Send("^V")<br>        End If<br>    End Sub<br></p><p>I hope it will help you.</p><p>Thanks,</p><p> </p><p> </p>
  • Replied 8 September 2017, 2:03 pm EST

    <p>Hi Deepak,</p><p>Thanks for the quick reply. In this test example, that solution would be OK.  I have a project that has over 100 forms and numerous spreads on each form.  Is there a better solution?  If not, I'd recommend Farpoint do something to handle the shortcut keys in an MDI window. </p><p> </p><p>Much thanks, </p><p>Jason</p>
  • Replied 8 September 2017, 2:03 pm EST

    <p>Hello Jason, </p><p>The menu added to the MDI is preventing Spread from processing these Shortcut Keys.</p><p>The best possible way that I can think of is to call Spread's Clipboard methods after checking if Spread has focus (as suggested earlier).You may loop through the Forms/Spreads in case you have a number of Forms/Spreads.</p><p>I will pass on this request, of handling shortcut keys in an MDI window to the concerned team and will update you accordingly.<br></p><p> </p><p>Thanks,</p><p> </p><p> </p>
  • Replied 8 September 2017, 2:03 pm EST

    <p>Jason,</p><p>I have reported this issue as a bug to our QA team (<font size="-1" face="Arial">Bug Number: <b>27055</b>) it should be fixed in our next maintenance release of Spread for Windows Forms.</font></p><p> </p><p>Thanks,</p><p> </p>
  • Replied 8 September 2017, 2:03 pm EST

    <p>Much thanks to you and the QA Team!  Glad to be a Farpoint customer when things like this get rectified so fast! </p><p>Jason </p>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels