Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Bug in Forms.HelpProvider?

Bug in Forms.HelpProvider?

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpcsharpdotnetwinformsgraphics
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Noodnik
    wrote on last edited by
    #1

    I'm trying to provide simple "pop-up" (e.g., tooltip-style) help hints for my dialog controls (standard Windows Forms using C#), using System.Windows.Forms.HelpProvider and System.Windows.Forms.Form.HelpButton. I'm using only the "SetHelpString()" method on the HelpProvider to set the help text to strings managed internally by the application. When I invoke the help the first time, it always seems to work. Sufficient subsequent invocations invariably either crash the program completely (with an "Application Error" dialog: The instruction at "xxxxx" referenced memory at "xxxxx". The memory could not be "written". Click on OK to terminate the program - sometimes it says "read" instead of "written") or cause some very strange application error/exception that the CLR does manage to catch. Does anyone recognize this? Is there a fix for it? I've searched MSDN Knowledge Base and Google (and here at CodeProject) for clues, but nothing comes up. Help!! Here's a program that demonstrates this problem for me, usually within 5-10 usages of the "HelpButton": ----------------------- using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication1 { /// /// Summary description for Form1. /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.HelpProvider helpProvider1; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.TextBox textBox1; /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); string s= "This is the help for button 1 I hope it is long and helps us to figure out where the problem is" ; helpProvider1.SetHelpString(button1, s) ; s= "This is the help for button 2 I hope it is long and helps us to figure out where the problem is" ; helpProvider1.SetHelpString(button2, s) ; s= "And this help is for the text box" ; helpProvider1.SetHelpString(textBox1, s) ; } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( di

    J 1 Reply Last reply
    0
    • N Noodnik

      I'm trying to provide simple "pop-up" (e.g., tooltip-style) help hints for my dialog controls (standard Windows Forms using C#), using System.Windows.Forms.HelpProvider and System.Windows.Forms.Form.HelpButton. I'm using only the "SetHelpString()" method on the HelpProvider to set the help text to strings managed internally by the application. When I invoke the help the first time, it always seems to work. Sufficient subsequent invocations invariably either crash the program completely (with an "Application Error" dialog: The instruction at "xxxxx" referenced memory at "xxxxx". The memory could not be "written". Click on OK to terminate the program - sometimes it says "read" instead of "written") or cause some very strange application error/exception that the CLR does manage to catch. Does anyone recognize this? Is there a fix for it? I've searched MSDN Knowledge Base and Google (and here at CodeProject) for clues, but nothing comes up. Help!! Here's a program that demonstrates this problem for me, usually within 5-10 usages of the "HelpButton": ----------------------- using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication1 { /// /// Summary description for Form1. /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.HelpProvider helpProvider1; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.TextBox textBox1; /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); string s= "This is the help for button 1 I hope it is long and helps us to figure out where the problem is" ; helpProvider1.SetHelpString(button1, s) ; s= "This is the help for button 2 I hope it is long and helps us to figure out where the problem is" ; helpProvider1.SetHelpString(button2, s) ; s= "And this help is for the text box" ; helpProvider1.SetHelpString(textBox1, s) ; } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( di

      J Offline
      J Offline
      je_gonzalez
      wrote on last edited by
      #2

      Your problem is not with the code attached. At least I do not get the error after 35 tries (.NET 1.1.4322)

      N 1 Reply Last reply
      0
      • J je_gonzalez

        Your problem is not with the code attached. At least I do not get the error after 35 tries (.NET 1.1.4322)

        N Offline
        N Offline
        Noodnik
        wrote on last edited by
        #3

        Thanks for checking that out! In "Help:About" from my "Visual C# .NET" IDE, I see I'm using "Microsoft .NET Framework Version 1.0.3705" (e.g., a very old version). It would appear to be a bug that has been fixed in updates to the .NET framework and/or the IDE. Do you know where I can get the update(s) for my .NET Framework and IDE? I've tried the "Check for Updates" menu item (it fails without giving a reason), and looked around Microsoft's Support website for updates, but am not sure what I need.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups