|
Hi all,
I am using the zedgraph control in my current project in which i am using zedgraph as a graphing area,
here i am plotting the line graph dynamically(ie., when the user clicks on the graph pane the points r created and the graph is drawn). According to our project requirement if the user selects a point it should be highlighted by dispalying a different color for that point so i am repainting the graph with a different color of the selected point this works fine but when selecting more than one point all selected points should be highlighted wher i am facing the problem. when i am passing all the selected points index and trying to highlight them its is working but on mouse click i am unable to get the desired o/p may b some where it is repainting i think.
Thanx in advance
prashanth
|
|
|
|
|
I'm guessing that you should post this against the article on ZedGraph. The author is probably your best bet for answering this one.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I want a DataGridView property in my UserControl:
C#<br />
<br />
public DataGridView _DataGridView<br />
<br />
[Category("Data"), DefaultValue(null)] <br />
public DataGridView DataGridView<br />
{<br />
get { return _DataGridView; }<br />
set { _DataGridView = value; }<br />
}<br />
I put the user control on a form, and this property shows (none) by default. I assign a dataGridView1 to the property.
But, when I delete dataGridView1, the property does not revert to (none). I can even still press the [+] and traverse as if the property was still referring to something.
I've looked everywhere (documentation, msdn, and searched the web) for any example demonstrating how to define a property to exhibiting the correct behavior.
The correct behaviour is exhibited by the ContextMenuStrip property of a Control, where it reverts to (none) when a contextMenuStrip1 is assigned to it and then deleted.
I'm new hear, so please forgive me if this query's been resolved, and point me in the right direction.
Thank you for your attention,
S
-- modified at 14:54 Thursday 29th March, 2007
|
|
|
|
|
Is there a similar method for a toolbarbutton?
|
|
|
|
|
The toolbar button (ToolStripButton) works just like a regular button.
Check for its events in the object browser or reflector.
ToolStripButton myToolbarButton1 = new ToolStripButton();
toolStripMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
myToolbarButton1,myToolbarButton2.... etc } );
this.myToolbarButton1.Click += new System.EventHandler(this.myToolbarButton1_Click);
Hope i helped.
Gideon
|
|
|
|
|
Hi
I have a XML file processing in C# as part of my project, it takes more time to process in some system even though system configuration is same (including free memory space and all). Does and any other factors affect this? Like XML versions or anything?
Please let me know...
|
|
|
|
|
Hi All,
Is there anyone who knows how to add a Restart Machine Dialog to installer.
I'm using the Setup Projcet in Visual Studio 2005.
I want the dialog can show after the installer.
Counld you help me?
|
|
|
|
|
I recently attended a VB (yes VB, so I could get a free version of VS2005 standard) and in the toolbox there was a snippet manager where you could drag snippets from there an introduce into code. How was this done? I've done some research but couldn't find anything.
Thanks
Mike
Everybody gotta be somebody
|
|
|
|
|
Hi
I am developing a windows applicaiton which is a client and connected with a server(a 3rd party tool developed in Labview) thru TCP socket. Communication is ok but when i unplugg the ethernet, the server is still indicating the client is connected. when i replugg the ethernet cable in the client side, im have done shutdown, close of socket and trying to re-establish the connection. But i could not make the conncetion the Socket.Beginconnect throwing the exception.
How to handle this situation..
can server detect the client availablity if the ethernet cable unplugged at client side?
I can't modify that server code, Is it possible to do something at client side to reconnect it to server?
I have tried Networkavailablitychange class, but no use..
Please post some sample code or links, that would be really help full please..
Thanks
Srini
|
|
|
|
|
there are interfaces declared in a dll below
-------------------- Encrypt.dll -------------------------
interface IDESCoder
{
string CreateCode(string IVString,string KeyString,string StringToEncode);
string GetCode(string IVString, string KeyString, string StringToDecode);
}
interface IMD5Encoder
{
string CreateCode(string StringToEncode);
}
public class ClsDES : IDESCoder
{
public string CreateCode(string IVString, string KeyString, string StringToEncode)
{
}
public string GetCode(string IVString, string KeyString, string StringToDecode)
{
}
private Boolean CheckIVKey(string IVString, string KeyString, string StringToEncode)
{
}
}
public class CldMD5 : IMD5Encoder
{
public string CreateCode(string StringToEncode)
{
}
}
-----------------------------------------------------------------------
and there is a Host
-------------------- test.exe ----------------------------------------
string filepath = @"E:\Encrypt.dll";
Assembly myDllAssembly = Assembly.LoadFrom(filepath);
Type dllType = myDllAssembly.GetType("IDESCoder");
if (dllType!=null)
{
......??????
}
-------------------------------------------------------------------------
then,what should i do next with Reflection if i want to use Interface declared in the dll??
|
|
|
|
|
string filepath = @"E:\Encrypt.dll";
Assembly myDllAssembly = Assembly.LoadFrom(filepath);
Type dllTypeInterface = myDllAssembly.GetType("IDESCoder");//this statement may have some question
Type dllTypeClass = myDllAssembly.GetType("ClsDES");//this statement may have some question
if (dllType!=null)
{
//TODO---you can use Factory pattern to improve it
dllTypeInterface interf=Activator.CreateInstance(dllTypeClass );
}
and you can choose another simpler way to resolve the problem.
first of all,You should Add references into your application in VS.NET.
then you can use it like using some interface or class in mscorlib.dll.
for example. using System.Int32;
It is very useful for everyone to show your own ideas to others.---Discussion is the power of improvement.
|
|
|
|
|
i know the way you said, and, you see , if i just know the interface'name ,can i have the dllTypeInterface object?
|
|
|
|
|
Hi all,
I am trying to use a DLL that modifies a stream of bytes (basically it's an encryption/decryption DLL). This DLL comes from a third party and I have to use it "as is". It wasn't designed for C#, but I really don't see any reason I shouldn't be able to use it.
The DLL reads and writes to a byte array (reads encrypted data, writes decrypted data), and this is giving me the error "Attempted to read or write protected memory."
I think the problem is quite simply that I don't understand how C# handles this kind of thing, so was wondering if I could get a little help.
The code goes something like this:
<br />
[DllImport("ABCdecrypt.dll", EntryPoint = "ABCdecrypt", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]<br />
unsafe public static extern bool ABCdecrypt([MarshalAs(UnmanagedType.I4)] int type, byte* data, int datalength);<br />
<br />
private void buttonGo_Click(object sender, EventArgs e)<br />
{<br />
byte[] yData = File.ReadAllBytes(textBoxInput.Text);
unsafe<br />
{<br />
fixed (byte* pBuf = &yData[0])<br />
{<br />
ABCdecrypt(100, pBuf, yData.Length);
File.WriteAllBytes(textBoxOutput.Text, yData);
}<br />
}<br />
MessageBox.Show("Done");<br />
}<br />
If I'm not being clear, please ask me to clarify. Essentially, all I want to do is use the library to decrypt the file referred to by textBoxInput.Text and save it out as the file referred to by textBoxOutput.Text
|
|
|
|
|
Hi YttriumOxide,
I've been struggling with something very similar recently. You can read my question here[^]:
I seem to have found an answer and it turned out to be far simpler than I thought it was going to be. Having said that, I might still be doing something wrong which will come back to bite me later but for now I seem to be OK and on my way.
What I did different from you was not to pass a pointer to the byte array as a parameter to the function but the byte array itself. I did not even do it in an unsafe block (which I probably should) but it worked.
So, leaving your declaration of your function unchanged (where you import it from the DLL), I would have called it like this:
ABCdecrypt(100, yData, yData.Length);
I have to stress though that I am by no means an expert in this field. I'm only just starting to meddle in C# and I haven't the faintest clue about marshalling. By the way, why did you marshal your first parameter as UnmanagedType.I4? And why did you not marshal the other two parameters? Do you know of any sites where I can read up on the MarshalAs attribute when used in this context?
Good luck
|
|
|
|
|
I am a C# programmer with mostly ASP.NET experience. I have done very little Win32 (WinForms) programming. Any suggestions for a good book on Windows Forms? I don't mean a general C# or .NET book, but one that specifically addresses the topic of Windows Forms.
|
|
|
|
|
I use this one at work, and it is pretty good.
Edit: Sorry, just noticed you said not specifically for C#.
|
|
|
|
|
No, your answer is great - I don't want a VB book, I want a C# one. What I meant was I don't want a C# book on General .NET. I want a C# book written specifically for windows forms, and that's exactly what you found.
Thanks
|
|
|
|
|
I use "Windows Forms Programming in C#" by Chris Sells....Excellent book.
Theres a version for .NET 2.0 out now also.
Hope that helps
Mike
Everybody gotta be somebody
|
|
|
|
|
|
I used Charles Petzolds book on Forms programming, but I am not very happy with it. It gives a very global overview and he refues to use the IDE functions, which are really great help when trying to create forms.
Petzold gives a lot of attention to the use of panels. However, panels have serious disadvantages. For a more complex form with, say 10 controls, you need a lot of panels. This makes maintenance a hell. So I decided to stop using panels.
Petzold gives very little attention to important but complex controls like listboxes and listviews. I think this very dissappointing.
|
|
|
|
|
hi guys,
how do i connect to a gateway using csharp and get its output so taht i can manipulate them...
as im a biginner in csharp 1 idea i had was uusing telnet and get the data..
is there any good solutions for this??
aneef
|
|
|
|
|
Hello all,
I'm in the process of writing a windows service. We would like to provide a small application that lives in the system tray so that people can monitor the status of the service. This application doesn't really need to do anything other than display an icon in the taskbar and maybe a context menu. All of the options selected from the context menu will either do something in the background (stopping/starting the service) or will launch another application. Is there a more eloquent way to handle this that just putting the component on an other wise empty form, loading the form and then making it invisible?
I generally hate task tray icons and usually turn them off, so I've never run into this problem before.
Will
|
|
|
|
|
I don't know of any other way of doing it. So yes blank form with the component on the empty form.
Ben
|
|
|
|
|
Hi,
I have a C++ DLL exporting a function that takes a callback of the following type:
typedef muFloat_t* (*muFacFun_t)(const muChar_t*, void*);
Is there any chance i can wrap this into a delegate? The Problem is that the function returns a pointer but C# has no pointers.
Regards,
Ingo
|
|
|
|
|