|
Sorry, I nodded off there for a second, what were you saying?
I'm assuming that you are talking about the Windows/WinForms Datagrid, rather than the ASP.NET one? (The formatting techniques for each are very different).
For Windows, you can override the Paint event, and there is a FAQ on this page that explains the process in a bit more detail: http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q745q
Hope it helps--you are not alone!
Datagrid Girl
|
|
|
|
|
Thank you very much for all!!!
You're the best in the world on datagrid handling !
I'm trying this stuff right now !!
Have a nice day!
bye,
Guim
|
|
|
|
|
Is it possible to access the current memory usage values for the running application, from within the applications own code? I have had a hard time finding documentation on this. At first I tried to use the performance monitor classes, but I can't see a way to load up a performance monitor for the current process. Is this possible in .NET? I appreciate any replies.
|
|
|
|
|
long memUsed = System.GC.GetTotalMemory(true/false);
True if you want to force a garbage collection before computing the memory used.
|
|
|
|
|
Hmm...I was looking for a finer grained level of detail....the kind of info you can get from perfmon. Physical and Virtual memory usage, garbage collection counts, propmotions, etc.
|
|
|
|
|
Does http://www.aspheute.com/english/20000809.asp help?
|
|
|
|
|
Well, not really. I know how performance counters work, how to create them, etc. etc. My question is how to I get a performance counter, in say the .NET GC category, for the "current", that beeing the key word, process. The process that I'm actually instantiating the performance counter from? This is not a web application, its a windows forms application. I'm not trying to recreate the perfmon application, I don't want to view performance counters for "other" processes....I want to view them for the process from which I instantiate the counter.
I've looked and looked, but there doesn't seem to be a site on the net or a single word in the .NET documentation that says how to get a counter for the current app, the one that instantiates the performance counter itself. The current instance is what I'm inclined to call it, but there doesn't seem to BE a current instance, only global instances and specific instances for some apps.
|
|
|
|
|
I'm considering migrating to Visual C# and expanding my skills. But is it worth it considering many of the things I need to do can be done using Managed C++. Also in MC++ it is possible to continue to use the STL.
What can be done in C# that can't be in MC++, are their any distinct advantages, apart from nicer syntax and more companies seem to want c# programmers than MC++?
Or is it best to create an appliction using C# and then use MC++ to create components that use the STL and other C++ only features? What i'm really getting at, is it worth gettin Visual C# instead of continuing to use Managed C++ in Visual C++ .Net 2003?
Thanks for your time.
P.S. If anyone knows of a company in the UK requiring or desiring a recent graduate with a 2:1 in Computing, please let me know
|
|
|
|
|
There are a few things I miss from C++ (like templates, const functions/parameters) when I migrated to C#, but there are a number of things that I like about C# (like not having to worry so much about forgetting delete and the resulting memory leaks)
From a marketing perspective (i.e. Marketing your skills to prospecive employers) C# is on the increase and would definitely be an advantage.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
if you use managed objects in c++ though, you still don't have to remember to use delete, as it's handled by the Garbage Collector. Though skills wise it is probably worth it.
|
|
|
|
|
A well renound hecker remarked "C# is C+-". And according to my experience he is very true. The way U can write blazing fast,flexible code in C++, is a distant dream in C#. Professionaly, development time in C# is less, because of boiler plate codes,hence it is in demand. But it still has to go a long way to reach the penetration what C++ enjoys.
Cheers!!
Siddharth
|
|
|
|
|
Depends on the amount of the complexity of programs and the amount of knoweledge you have.
Here is a little picture:
Knowledge to do Visual Basic (6) CSharp (Or Java) C++
Simple work Very Few Some Lots
Medium work Lots Lots Lots
Complex work Forget it Very Much Lots
Chooses depending on the amount of time you want to invest, or the kind of application you will build up.
|
|
|
|
|
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());
}
}
}
|
|
|
|
|
Your problem is not with the code attached. At least I do not get the error after 35 tries (.NET 1.1.4322)
|
|
|
|
|
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.
|
|
|
|
|
i can't seem to find any audio stream related classes in the documentation.
thanks.
|
|
|
|
|
Look int he directX documenttatioan...
/\ |_ E X E GG
|
|
|
|
|
if i use directx classes in my app, will that force users to install directx separately? i am hoping to avoid that.
|
|
|
|
|
Have you looked into using the DirectX Managed SDK?
|
|
|
|
|
Hello,
I want to change the default setting for the option:
1) Just me
2) every one
in select installation folder and set the every one as default option,
but I don't know how should I do it.
Besides according to this option I want to set some data in different
keys in registry I do not how can I get the user selected optionin the
dialog and then use it for setting registry data ?
Thanks in advance,
Saeideh
|
|
|
|
|
um, you have to learn a language called 'orca'... i think that's what it's called.
It will let you make more advanced installers. Search the C# forum for stuff on that...
and also, check out InstallShield. I beleve you can do it in that.
/\ |_ E X E GG
|
|
|
|
|
Thank you for your reply, I could solve my problem by Orca ...
Regards,
Saedeih
|
|
|
|
|
Hello All,
We need help for a technical issue that we are facing in our application
(TA-RES) developed using .NET technology. The details of the issue are as
follows.
Steps for reproducing this problem:
1. Open 2 browser instances
2. In one instance start a product search
3. While the product search is on in the first window, perform a search or
request another page in the same application
It is observed that the execution of the second request starts only when
the processing of the first request is completed. We confirmed this by putting
log statements in the web pages. As per the time stamps the second request
is processed when the first request is completed. From the logs it is also
observed that when the first request is being executed, the init of the
second page is also not called indicating that the requests are being
executed serially by IIS.
When a test application was tried with the same server and configuration
files, we did not notice this behavior. Has anybody come across this
problem? Any help in resolving this issue will be appreciated.
The application has been developed using .NET 1.0 Framework. Please let us
know if you need any more information.
Take what you most fervently believe, what you most longingly hope for, what you most sincerely value, and put those things into practice. That's the way to truly make them real.
|
|
|
|
|
I don't know if this might help as I've never researched it but I've noticed that if a number of browser windows are open on a client and I try and make many connections to the same web site the requests appear to get sent almost in sequence (it seems to allow 2 or 3 concurrent requests at most [with each graphic counting as a request also]). Could this be it?
As I've said it is not something I've researched but just something I've observed.
Do you get the same results if the two client browsers are on different machines?
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Colin Angus Mackay wrote:
it seems to allow 2 or 3 concurrent requests at most
It's something done at an HTTP level - it is regarded as good form to only make a small number of simultaneous HTTP connections to a web server, and 2 is a common value here. Some web servers also limit the number of simultaneous connections.
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|