|
How Can i change a folder's icon using C# as whn i share a folder its icon changes
|
|
|
|
|
If you just want to change the image of an item in the tree view, change the ImageIndex (and SelectedImageIndex ) properties to the index of the desired image inside the imagelist.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hello
I have a problem that I can't find any solution to. I have an arraylist of objects that I want to show in a datagrid and that works just fine. The problem is when the objects themselves has an internal property that is an arraylist, then the datagrid will show the "+" sign att each row. I want the datagrid to show only the "parent" rows without drilldown features.
For example
public class MyStuff
{
string stuff;
public MyStuff()
{}
public MyStuff(string NewValue)
{
stuff = NewValue;
}
public Stuff
{
get{return stuff;}
set{stuff = value;}
}
}
arraylist MyList = new arraylist;
for (int iI = 0, ii <10, ii++)
mylist.add(new MyStuff(ii.tostring()))
datgrid1.datasource = MyList
works just fine, but
public class MySecondStuff
{
string stuff;
public MySecondStuff(string NewValue)
{
stuff = NewValue;
}
public Stuff
{
get{return stuff;}
set{stuff = value;}
}
}
public class MyStuff
{
string stuff;
arraylist arList = new arraylist();
public MyStuff(string NewValue)
{
stuff = NewValue;
for (int iI = 0, ii <10, ii++)
arList.add(new MySecondStuff(ii.tostring()))
}
public Stuff
{
get{return stuff;}
set{stuff = value;}
}
}
arraylist MyList = new arraylist;
for (int iI = 0, ii <10, ii++)
mylist.add(new MyStuff(ii.tostring()))
datgrid1.datasource = MyList
Will show the parent MyStuff correctly in the datagrid but each row will have the "+" sign next to it and allow the user to see the MySecondStuff class under it. Can anyone please say how I can remove the "+" sign when working with arraylist or collections in the datagrid?
I now the code above doesnt work, just wrote it to explain how the classes are built when they are viewd in a datagrid.
Best regards
/Marcus
|
|
|
|
|
Hi there,
I'm relatively new to C#. I am making a class library(DLL) firing custom events. I want to have another windows application (in C#) that handles such events. I'm creating delegates and declaring events in the dll, but when I create an instance of dll and attach an event handler to handle a particular custom event, an exception saying that there is no instance for event handler is raised. I tried handling the events from the dll, with an empty method, and yet attaching a handler on the calling application, the result is that nothing happens.
Do you have any clues to help out please?
ThankS
GaMBiT---> aND ReVeNGe WiLL Be
|
|
|
|
|
I suggest you to create an event of your delegate type in the application, where you suppose consume this event.
eg: This is the dll defanision.
using System;<br />
<br />
namespace ClassLibrary1<br />
{<br />
public delegate void Me();<br />
public class Class1<br />
{<br />
public Class1()<br />
{<br />
}<br />
}<br />
}
Below one is the application code block , where i am going to consume this event.
[STAThread]<br />
static void Main() <br />
{<br />
Application.Run(new Form1());<br />
}<br />
private event ClassLibrary1.Delegate Evt;<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
this.Evt+=new ClassLibrary1.Me(Form1_Evt);<br />
this.Evt();<br />
}<br />
private void Form1_Evt()<br />
{<br />
MessageBox.Show("afasfasf");<br />
}
Sreejith Nair
[ My Articles ]
|
|
|
|
|
thanks man!
great help!
GaMBiT---> aND ReVeNGe WiLL Be
|
|
|
|
|
Thanks...I managed to solve my problem...
I had a misplaced code problem.
Sorry and Thanks!;P
GaMBiT---> aND ReVeNGe WiLL Be
|
|
|
|
|
Hi !
iam doing a remoting application is c#. the server is a singlecall object run using remoting.configure
xml config file. there is only one client but a group of servers hosting these singlecall objects
. i make invocations by using remoteobject.getactivator method at a very high frequency to get bit map data. when the server machine is running windows 2000 professional the performance is decent but for windows xp pro the performance is very bad. the system is very slow at getting method results. any idea what could be happening. i checked
three windows xp pro machines and as many windows 2000 pro machines. the performance is consistently bad and good respectively.
any help would be great.
thanks.
|
|
|
|
|
i trying to wirte a code to disalbe toolbar start , and run mstsc40.exe
using System.Diagnostics;
i can't use Process object !!!
|
|
|
|
|
Your question would be much better handled in the Embedded/Mobile Forum[^]. It has nothing to do with C#, but rather functionality of the target platform.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello
I am drawing text by using Graphics.DrawString
I need to rotate it.
this: StringFormatFlags.DirectionVertical; rotate text 90degrees clockwise.
However I need rotate text 90deg. counter-clockwise. How I will do it?
heartfelt thanks for help.
Peter
|
|
|
|
|
I am trying to load data from a as400 db into a datatable, but i get the following error:
OleDbDataAdapter internal error: invalid rowset accessor: Ordinal=5 Status=UNSUPPORTEDCONVERSION.
Can anyone tell me how to fix this?
|
|
|
|
|
this thread talks about your problem - hope it can help - cause I can't
http://www.dotnet247.com/247reference/msgs/43/219462.aspx
-spif2001
|
|
|
|
|
hello i have 2 classes one class has a function that takes the second class as a ref argument however i want to call this function from within the second class but the compiler will not let me using, this, is there any way around doing without making the function take a non ref argument?
|
|
|
|
|
You can't pass 'this' a ref argument because it is a value, not a variable. This will satisfy the compiler
<br />
A a = this;<br />
new B().SomeFunc(ref a);<br />
I don't know if that is what you want though..
Regards
Senthil
My Blog
|
|
|
|
|
Your queary is little confusing. Still , is this what you are looking for
using System;<br />
namespace ConsoleApplication1<br />
{<br />
class Class1<br />
{<br />
public string myName="meOnly";<br />
static void Main()<br />
{<br />
Class2 Obj2=new Class2();<br />
Class1 Obj1=new Class1();<br />
Console.WriteLine(Obj1.myName+"\n");<br />
Obj2.Showme(ref Obj1);<br />
<br />
}<br />
}<br />
class Class2<br />
{<br />
public void Showme(ref Class1 cls)<br />
{<br />
cls.myName="MEonly";<br />
Console.WriteLine(cls.myName);<br />
}<br />
}<br />
}
Sreejith Nair
[ My Articles ]
|
|
|
|
|
hrmm that doesnt quite do it i guess my question if to parts
i have 2 classes
class obj1
{
public static MyFunc(ref obj2 o)
{
do some stuff
}
}
class obj2
{
public MyFunc()
{
obj1.MyFunc(/*ref*/ this); // this doesnt work
}
}
the second part is if im not using a ref what kinda memory problems will this cuase if any i dont really want to duplicate obj2 i want to use the same one continuasly ?
any answers will help :p
|
|
|
|
|
Hi there!
Does anyone know of any free tools which I can use to evaluate the performance of certain functions of an application? I have used DevPartner however the application crashes 90% of the time when using that!
Thanks.
|
|
|
|
|
I use the DevPartner coummnity edition regulary and i have never had it crash - and I do some pretty extreme profiling runs - some of them taking over 24 hours
|
|
|
|
|
I have just added help to my C# application, and it invokes the Help window when F1 is pressed just as it should. However, I find that the help window itself disappears or is covered by my app (the app is always maximized) whenever the app loses focus. For reasons I won't go into at the moment, my app creates additional windows that it arranges for itself, but I don't know if this has any bearing on the matter. All I can say for sure is that if my app loses the focus, the Help window disappears. It comes back if I click on the title bar of my app to get focus back, but if I click on the title bar of the Help window, my app loses focus, and the help window goes away again!
Does anyone know of a setting I may have made in my app that would cause this behavior?
|
|
|
|
|
Just try this code and tell me , whether it served your purpose or not.
System.Diagnostics.Process.Start(@"c:\\help.chm");
and don't forget to refer System.Configuration namespace in your code.;)
Sreejith Nair
[ My Articles ]
|
|
|
|
|
That worked just fine. Thanks! Is there any way I can access individual topics this way for context-sensitive help?
|
|
|
|
|
You can achive it throught some third party help creator tool Or you can use Microsoft Help Workshop. This you will get through .NET installation.;)
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I am looking for a sample of code in C# using as a web service which would do the following:
1. Accept a XML stream
2. Parse the XML, prep for inserting into a database table
3. Set a Session ID
4. Return the Session ID to the Requester.
If someone could show me how this is done, I would be most appreciative.
Cheers,
Shelly
|
|
|
|
|
Hi friends
i am using finisar sqlite dll to interact with sqlite db,i am often getting the following Exception Message
"Unable to load dll(sqlite)" though dll is present and I event verified by calling calling
mycon.GetType().AssemblyQualifiedName.ToString()
and its indicating right path of loaded Dll
can anyone tell me why the mentioned exception is being thrown?
Thanks
|
|
|
|