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

.NET (Core and Framework)

 
QuestionMigratting from Windows CE English version OS to German Pin
Sevu19-Sep-05 1:50
Sevu19-Sep-05 1:50 
QuestionCOM is not working in Windows98se Pin
Nilesh Gambhava17-Sep-05 23:36
Nilesh Gambhava17-Sep-05 23:36 
AnswerRe: COM is not working in Windows98se Pin
Dave Kreskowiak18-Sep-05 1:38
mveDave Kreskowiak18-Sep-05 1:38 
QuestionMinimum security level to... Pin
Ray Cassick17-Sep-05 14:28
Ray Cassick17-Sep-05 14:28 
QuestionMSMQ Pin
chinnasrihari16-Sep-05 19:23
chinnasrihari16-Sep-05 19:23 
QuestionSubType = "Form" or "UserControl" --> SubType = "Code" Pin
Rafferty Uy15-Sep-05 22:25
Rafferty Uy15-Sep-05 22:25 
Questionauto detect new device in windows application Pin
SongDog15-Sep-05 7:28
SongDog15-Sep-05 7:28 
QuestionSystemMonitor ActiveX control and custom performance counters Pin
ivanrachev15-Sep-05 4:38
ivanrachev15-Sep-05 4:38 
I have the SystemMonitor ActiveX control on a form and I try to register a custom performance counter.
I expect that after registering the counter with the OS, the user would be able to add it through this System Monitor ActiveX control on the form.
Yet, the Add dialog of this ActiveX does NOT contain the already registered counter.
Does anyone know what might be wrong?
Code snippet follows at the end.
BTW if I have the code that registers the counter in a separate executable, then the ActiveX has my counter. But if they're in one and the same executable, the ActiveX doesn't have it !?!

Ivan



using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;

namespace WindowsApplication1
{
public class Form1 : System.Windows.Forms.Form
{
private AxSystemMonitor.AxSystemMonitor axSystemMonitor1;
private System.ComponentModel.Container components = null;

[STAThread]
static void Main()
{
CounterCreationDataCollection CCDC = new CounterCreationDataCollection();
CounterCreationData ccd = new CounterCreationData(
"MyCounterName",
"Some Help",
PerformanceCounterType.NumberOfItems32
);
CCDC.Add( ccd );
if (PerformanceCounterCategory.Exists("MyCategoryName") )
PerformanceCounterCategory.Delete("MyCategoryName");
PerformanceCounterCategory.Create("MyCategoryName", "Some Help", CCDC);

Application.Run(new Form1());
}

public Form1()
{
InitializeComponent();
}

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.axSystemMonitor1 = new AxSystemMonitor.AxSystemMonitor();
((System.ComponentModel.ISupportInitialize)(this.axSystemMonitor1)).BeginInit();
this.SuspendLayout();
this.axSystemMonitor1.Enabled = true;
this.axSystemMonitor1.Location = new System.Drawing.Point(0, 0);
this.axSystemMonitor1.Name = "axSystemMonitor1";
this.axSystemMonitor1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSystemMonitor1.OcxState")));
this.axSystemMonitor1.Size = new System.Drawing.Size(328, 272);
this.axSystemMonitor1.TabIndex = 0;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(344, 269);
this.Controls.Add(this.axSystemMonitor1);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.axSystemMonitor1)).EndInit();
this.ResumeLayout(false);

}
#endregion
}
}

QuestionActive document server in .NET Pin
Bruce Pataki15-Sep-05 3:15
Bruce Pataki15-Sep-05 3:15 
QuestionBug in framework? Pin
AlexR12315-Sep-05 2:16
AlexR12315-Sep-05 2:16 
QuestionRegarding the linking of a dll created in .NET Pin
MoQuisha14-Sep-05 20:20
MoQuisha14-Sep-05 20:20 
Questioncompact framework - registering events Pin
David Menéndez Cisterna14-Sep-05 8:48
David Menéndez Cisterna14-Sep-05 8:48 
QuestionNETCF Windows Forms Control in Pocket IE?? Pin
rainersimon14-Sep-05 5:41
rainersimon14-Sep-05 5:41 
Questiongprs classes Pin
_tasleem14-Sep-05 3:25
_tasleem14-Sep-05 3:25 
AnswerRe: gprs classes Pin
Dave Kreskowiak14-Sep-05 6:49
mveDave Kreskowiak14-Sep-05 6:49 
QuestionHow do set another folder than \bin for my assemblies when "Local Copy"... Pin
MaWeRic14-Sep-05 1:36
MaWeRic14-Sep-05 1:36 
GeneralRe: How do set another folder than \bin for my assemblies when "Local Copy"... Pin
seee sharp19-Sep-05 0:37
seee sharp19-Sep-05 0:37 
GeneralRe: How do set another folder than \bin for my assemblies when "Local Copy"... Pin
MaWeRic19-Sep-05 19:52
MaWeRic19-Sep-05 19:52 
Question[SOS] about API(SendMessage or PostMessage) Pin
cnet200813-Sep-05 20:01
cnet200813-Sep-05 20:01 
AnswerRe: [SOS] about API(SendMessage or PostMessage) Pin
cnet200813-Sep-05 20:53
cnet200813-Sep-05 20:53 
GeneralRe: [SOS] about API(SendMessage or PostMessage) Pin
Saksida Bojan13-Sep-05 22:37
Saksida Bojan13-Sep-05 22:37 
GeneralRe: [SOS] about API(SendMessage or PostMessage) Pin
cnet200814-Sep-05 20:18
cnet200814-Sep-05 20:18 
QuestionFundamental Question Pin
Anonymous13-Sep-05 13:45
Anonymous13-Sep-05 13:45 
AnswerRe: Fundamental Question Pin
Christian Graus13-Sep-05 14:28
protectorChristian Graus13-Sep-05 14:28 
GeneralRe: Fundamental Question Pin
Anonymous13-Sep-05 14:41
Anonymous13-Sep-05 14:41 

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.