|
|
Yep that's actually what I've ended up doing so far..Using a panel is there any reason i shouldn't be able to draw a borderline around the whole thing and then encase the text in the middle of that borderline, to pretty much emulate a groupbox? Thanks alot for your help!!
|
|
|
|
|
I'm developing an application that charts data from an online real-time data vendor. I'd like to split the program into two main parts: 1) a server part that logs into and maintains the connection to the data feed, and 2) a charting/analysis part that charts and applies algorithms to the data.
The minimum requirement is once the server part is developed, I want to be able to: 1) login, 2) open a chart, 3) close the chart, 4) edit and recompile the charting code in visual studio without having to logoff. 4) open the chart again with the new edits operational.
The ideal senerio would be to not only stay logged on while editing and recompiling the charting code, but also not have to close the chart first. On recompile the edits would automatically be updated into the open chart.
It would seem that the server will need to be an exe and the charting a dll. In C# it looks like to accomplish dynamic loading and unloading of the charting dll, the charting dll will need to be in its own application domain.
I've studied Eric Gunnerson's MSDN article "AppDomains and Dynamic Loading" and this seems to be close to what I'm after. However his approach seems overly complex. I'm hoping to find a simpler way and hopefully some examples to implement my above stated minimum requirement and/or the ideal senerio.
Mark Clifton's Application Automation Layer also looks interesting.
Any thoughts/sugestions/examples would be greatly appreciated.
thanks,
Brian Dalby
|
|
|
|
|
If you need to unload and reload to the same type, the only way of doing it is with app domains.
You can sometimes get away with serializing the name of the type (chart1, chart2, chart3) when you modify it, and only load the new type. It's a bit ugly, however, and has more memory usage.
|
|
|
|
|
|
Hello,
For work I need to make a web based application.
I know JAVA applets will do what I want (this needs to be more like a windows prog and less like a web page)... does C# have anything like a JAVA applet???
Thanks,
Brian Hudson
|
|
|
|
|
|
Look up embedding .NET controls in a web page. It only works in IE 6, maybe in 5.x but I'm not sure.
Deploying a Runtime Application Using Internet Explorer[^]
James
"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
I am trying to create my first control and I don't understand what is going on, or why it isn't working. The control is simply going to paint a line through the center of a textbox. When I override the OnPaint method here, the MessageBox doesn't show up when I add the control to a test form and neither does the line, however everything compiles fine. Any suggestions? BTW, I am setting the property of the _borderlinecolor in the test example.
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
SolidBrush b = new SolidBrush(this._borderlinecolor);
Pen p = new Pen(b, 2);
p.Color = this._borderlinecolor;
e.Graphics.DrawLine(p, 0, this.Height/2, this.Width, this.Height/2);
MessageBox.Show("Hey, I just painted.");
}
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
I had exactly the same problem with OnPaint and classes derived from TextBoxes; it simply doesn't seem to run it.
Never did figure out why, MS don't seem to want you to inherit from TextBox or RichTextBox, so there's no documentation. I think the answer is to inherit from TextBoxBase but I'm not 100% sure. I ended up selecting the text I wanted to highlight because it was an internal project and that was enough; I do intend to fix it at some point though.
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
Paul Riley wrote:
I had exactly the same problem with OnPaint and classes derived from TextBoxes; it simply doesn't seem to run it.
Well, at least I am glad that I'm not the only having a problem with this.
Paul Riley wrote:
I think the answer is to inherit from TextBoxBase but I'm not 100% sure.
When I tried that I got this error:
System.Windows.Forms.TextBoxBase.TextBoxBase() is inaccessable due to its protection level
Thanks for the repsonse.
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
Showing a messagebox in such functions is much like debugging code while having the current window DC handle on air. Read : this does not work.
I suggest to put text in the output console instead.
Also, be sure to call the OnPaint base class implementation.
|
|
|
|
|
S.Rod, thanks again, seems like I am running into brickwall after brickwall today. I made changes like you suggested and it looks like the following now, however I am still not getting anything even printed in the output console, any ideas?
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
SolidBrush b = new SolidBrush(this._borderlinecolor);
Pen p = new Pen(b, 2);
p.Color = this._borderlinecolor;
e.Graphics.DrawLine(p, 0, this.Height/2, this.Width, this.Height/2);
Console.WriteLine("I just painted....");
base.OnPaint(e);
}
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
I don't have .NET at work. Will look the details later tonight.
In the mean time, an obvious question : did you put a breakpoint in that ?
|
|
|
|
|
.S.Rod. wrote:
In the mean time, an obvious question : did you put a breakpoint in that ?
Yes, it seems as if it just doesn't work. I don't know, I think I am going to take a break for a few minutes and come back and look at it again. Thanks again.
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
This is something that someone else had seen, Stan Shannon I think. The problem is that windows handles all of the painting for textboxes so the OnPaint method is never called.
There is a VB.NET article on control SubClassing using the NativeWindow class, I think that would give you the OnPaint method again.
Let me know if that works,
James
"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
I'm experiencing exactly the same problem, has anyone found a solution for this yet??
Please let me know!
Many thanks!
Richard
|
|
|
|
|
Administer IIS and DNS with C# code?
Is there any COM objects or .NET classes for this kind of work?
thanks...
_______________________________
Portal Imoguia Software Imoguia
MSN:maxsnts@hotmail.com
|
|
|
|
|
i want to make my program's User Interface more attractive and have multilanguage support, how could i make it?I'm a newbie so i need your help...
|
|
|
|
|
Multilanguage support or Localization as they call it in .net is a concept you need to understand completely. Here[^] is a good starting point.
Also look for Localization samples in framework sdk (it would be under Samples\Resources\resourcesandlocalization )
HTH
Cheers
Kannan
|
|
|
|
|
I find it really helpful.Thank you a lot!!
Cheers
doose
|
|
|
|
|
Anyone tried using directx 9 and c#??
I downloaded the DX9 runtime and the DX SDK for c# but could get it to work
I found the DX assemblies on the harddrive but I couldn't find them in the
add reference list, also I couldn't add the manually by using browse.
|
|
|
|
|
yes it works for me I have the full sdk and VS.NET and there were no problems installing it and running all the C# examples and I could even write a short program
|
|
|
|
|
Hi!
I have about the same problem as you have. I have downloaded the whole sdk and I could run the samples but I can't compile anything?
|
|
|
|
|
Yep that's it, I could run the samples but wasn't able to compile any programs because the reference was missing.
Tried referencing the assemblies in the assembly folder, but that's not possible.
For some reason the assemblies don't appear in my VS add reference list
|
|
|
|