Click here to Skip to main content
15,907,875 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: search trough a TreeView for a TreeNode with matching tag Pin
Charlie Williams7-Jan-04 11:30
Charlie Williams7-Jan-04 11:30 
Generalmms sending Pin
Anonymous6-Jan-04 18:17
Anonymous6-Jan-04 18:17 
GeneralDialog Issues in .NET CF PocketPC 2003 Pin
Cowwolfe6-Jan-04 2:48
Cowwolfe6-Jan-04 2:48 
GeneralRe: Dialog Issues in .NET CF PocketPC 2003 Pin
Colin Angus Mackay6-Jan-04 4:44
Colin Angus Mackay6-Jan-04 4:44 
GeneralUnhandled exceptions in winform custom control Pin
smartinz5-Jan-04 1:51
smartinz5-Jan-04 1:51 
GeneralProduct Licensing Pin
RichLee5-Jan-04 0:03
RichLee5-Jan-04 0:03 
Generalplease help me,my project......... Pin
Ahmed Gaser3-Jan-04 23:15
Ahmed Gaser3-Jan-04 23:15 
Questionmust clicking a control inside a scrollableControl bring it into view? Pin
misterbear3-Jan-04 1:41
misterbear3-Jan-04 1:41 
QuestionGrid "OnDrawCell" Event ? Pin
guim72-Jan-04 3:31
guim72-Jan-04 3:31 
AnswerRe: Grid "OnDrawCell" Event ? Pin
Marcie Jones7-Jan-04 9:38
Marcie Jones7-Jan-04 9:38 
GeneralRe: Grid "OnDrawCell" Event ? Pin
guim78-Jan-04 5:31
guim78-Jan-04 5:31 
GeneralRe: Grid "OnDrawCell" Event ? Pin
Marcie Jones8-Jan-04 5:37
Marcie Jones8-Jan-04 5:37 
GeneralRe: Grid "OnDrawCell" Event ? Pin
guim78-Jan-04 22:01
guim78-Jan-04 22:01 
QuestionAccessing memory usage for current Application (or AppDomain)? Pin
Jon Rista29-Dec-03 16:53
Jon Rista29-Dec-03 16:53 
AnswerRe: Accessing memory usage for current Application (or AppDomain)? Pin
je_gonzalez29-Dec-03 17:31
je_gonzalez29-Dec-03 17:31 
GeneralRe: Accessing memory usage for current Application (or AppDomain)? Pin
Jon Rista29-Dec-03 17:58
Jon Rista29-Dec-03 17:58 
GeneralRe: Accessing memory usage for current Application (or AppDomain)? Pin
je_gonzalez29-Dec-03 18:12
je_gonzalez29-Dec-03 18:12 
GeneralRe: Accessing memory usage for current Application (or AppDomain)? Pin
Jon Rista29-Dec-03 20:32
Jon Rista29-Dec-03 20:32 
QuestionIs it worth getting Visual C#? Pin
Gomac27-Dec-03 6:45
Gomac27-Dec-03 6:45 
AnswerRe: Is it worth getting Visual C#? Pin
Colin Angus Mackay27-Dec-03 7:11
Colin Angus Mackay27-Dec-03 7:11 
GeneralRe: Is it worth getting Visual C#? Pin
Gomac27-Dec-03 7:29
Gomac27-Dec-03 7:29 
AnswerRe: Is it worth getting Visual C#? Pin
SiddharthAtw29-Dec-03 22:33
SiddharthAtw29-Dec-03 22:33 
GeneralRe: Is it worth getting Visual C#? Pin
HAHAHA_NEXT8-Jan-04 9:51
HAHAHA_NEXT8-Jan-04 9:51 
QuestionBug in Forms.HelpProvider? Pin
Noodnik23-Dec-03 20:52
Noodnik23-Dec-03 20:52 
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( disposing );
}

#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.helpProvider1 = new System.Windows.Forms.HelpProvider();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(184, 16);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "Cancel";
//
// button2
//
this.button2.Location = new System.Drawing.Point(184, 56);
this.button2.Name = "button2";
this.button2.TabIndex = 2;
this.button2.Text = "button2";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(24, 24);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 3;
this.textBox1.Text = "textBox1";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(288, 122);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox1,
this.button2,
this.button1});
this.HelpButton = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);

}
#endregion

///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}
AnswerRe: Bug in Forms.HelpProvider? Pin
je_gonzalez29-Dec-03 17:39
je_gonzalez29-Dec-03 17:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.