|
i need to set one image to tree view nodes and another image to inner sub-nodes
i am able to set image to node that are same to nodes and sub nodes but unable to set different image to inner sub node.
|
|
|
|
|
Define the images that your TreeView control uses by setting its ImageList property.
Set which image in the ImageList each node uses by setting the ImageIndex or ImageKey properties on each TreeNode object.
Read the documentation[^] for more information.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I am developing an window application and in am facing a problem in getting image in list view control
--------------------------
Name| image| age
--------------------------
i want to show small image icon in second columns data.
|
|
|
|
|
Have a look at this article[^].
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
how i can print form?
123
|
|
|
|
|
|
Abhijit Jana wrote: One is enough
Why u have post same question three times????
I think its CP going slow. Yesterday i clicked post, and nothing happened. So i clicked it again, and the page eventually loaded with my message posted twice.
My current favourite word is: PIE!
Good ol' pie, it's been a while.
|
|
|
|
|
how i can print form?what i can use for print form?
123
|
|
|
|
|
how i can print form?and what i can use for print form?
123
|
|
|
|
|
Hai everyone,
I am using the following code in my application which is giving an error.please help me .
objMenu.objForm = this;
this.Menu = objMenu.LoadDynamicMenu();
Error 1 Cannot implicitly convert type 'object' to 'System.Windows.Forms.MainMenu'. An explicit conversion exists (are you missing a cast?)
santosh.
|
|
|
|
|
seems that LoadDynamicMenu method returns am object.
so you need to cast it like:
this.Menu = (System.Windows.Forms.MainMenu)objMenu.LoadDynamicMenu();
|
|
|
|
|
Hello.
I have some trouble with List<>. I'll give you a short example, and you'll understand, what I need.
We have a console app.
Let's do some class:
class Class4List
{
public int var;
}
Now let's do a class, that uses a List<> of already created class:
class Class4Method
{
public void changeVar(List<class4list> c4l)
{
c4l[0].var = 1;
}
}
Main:
static void Main(string[] args)
{
List<class4list> test = new List<class4list>(); //create List of our classes
Class4List qwer = new Class4List(); //create a variable with our class type
qwer.var = 25; //give some value to a class member
test.Add(qwer); //add a variable to List
Class4Method tst = new Class4Method();
tst.changeVar(new List<class4list>(test)); //calling method of a class, that uses List<class4list>
}
But after calling a method, value of test[0].var and qwer.var will be "1"! But I don't need it. I want to change value of a variable only inside of method changeVar, and outside of this method it should still be "25".
How to do this?
|
|
|
|
|
Hi!
You're adding a reference to qwer to the List, so if you access this instance in the method you can modify its properties.
If you want a copy of qwer in the list, you should take a look at IClonable .
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thank you very much!
Your advise was greatly helpful!
|
|
|
|
|
plz send me a c# project that would accept the employee details and also be able to add,update,delete records.the back end in sql...i also need the connection establishment code.send the code to bharathi_n_r@yahoo.com
thankz in advance
|
|
|
|
|
I have your project ready to go. Contact me off the board for ways to pay the $10,000 consulting fee for writing this for you.
Or, you can do your own project ( is it your job, homework or a rentacoder job gone bad ? ), and then we'd be happy to help when you're stuck.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
No bady here will send you the code.
Try to do your self. If you have any problem or you need some idea then you are always welcome .
and as i see from your profile, you have joined here 2day. so welcome to Codeproject !!!
|
|
|
|
|
Thanks dude,
The problem i face with my project is that i am not able to do update..the registration form does not contain a data grid and i want the message to be displayed in the text boxes of the respective fields when i give the phone no(primary key)....and after i insert a record and try to insert another record and if i leave any field blank it is throwing me an exception"Failed to convert parameter value from a String to a Int32."provide me a solution for this man......
|
|
|
|
|
finished The project man.Thanks for making me work with the project,otherwie i would have sit idle and sought for help.The project is working wonderfull.
|
|
|
|
|
finished The project man.Thanks for making me work with the project,otherwie i would have sit idle and sought for help.The project is working wonderfull.
Thanks
|
|
|
|
|
finished The project man.Thanks for making me work with the project,otherwie i would have sit idle and sought for help.The project is working wonderfull.
Thanks.....
|
|
|
|
|
finished The project man.Thanks for making me work with the project,otherwie i would have sit idle and sought for help.The project is working wonderfull...
Thanks.....
|
|
|
|
|
I am using a keyboard hook to stop most if not all the keys on the keyboard but i am getting this message:
CallbackOnCollectedDelegate was detected
Message: A callback was made on a garbage collected delegate of type 'Client!KeyboardHook+HookHandlerDelegate::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.
any ideas how to solve it?
Luis E Tineo S
|
|
|
|
|
Error messages are so informative these days, that it almost gets too easy.
You have the solution handed to you in the error message already:
"When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called."
You have thrown away your reference to the delegate. Don't do that.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I'm porting my application from Window Forms to WPF, and as soon as i managed to get the first things working i run into a Random problem. I get series of several identical results in a row in WPF(the code is the same from Window Forms(where it works), i only needed to modify stuff related to getting the resource path and setting the image control). I can't see why this is happening it's totally unrelated to the code apparently. The way it's set now it can be seen when running the app and seeing identical sets of stars along the columns(it's filled that way).
Get the project here:
http://files.filefront.com/WPFMyMoOrar/;9061030;/fileinfo.html
edit:solved: it was reseeding so fast that it was getting the same time seed(so i moved the initialization of the random object to class scope), interesting that this problem didn't exist in Window Forms.
-- modified at 3:21 Saturday 17th November, 2007
|
|
|
|