|
Perhaps but when a question is posed so vague as to say where is my null reference exception i think any little bit of help will help.
Now you are correct in that when I said d.Month I was wrong. Sometimes I say the stupidest things. Of course, that could also fall into the category of someone designing an OO language that doesn't fully support nulls until the third release.
File Not Found
|
|
|
|
|
Can anyone tell me how to use this control? Help me please...
public ListViewItem ( string[] items , System.Int32 imageIndex , System.Drawing.Color foreColor , System.Drawing.Color backColor , System.Drawing.Font font )
|
|
|
|
|
You'll really need to ask a more specific question. The ListView control can be used lots of ways. What exactly are you trying to do?
Also, have you tried reading the ?
documentation on MSDN[^]
|
|
|
|
|
I want to do drag and drop in list view.But from what i seen, drag and drop can be done for string only. Can we do drag and drop other than string?
|
|
|
|
|
shamsteady wrote: from what i seen, drag and drop can be done for string only
I'm not sure what you mean. ListView controls don't contain strings, they contain ListViewItem objects.
It is fairly simple to implement Drag/Drop behavior in a ListView. You'll need to create a new control that inherits from ListView, then override the drag/drop event handlers. This article[^]appears to explain it (I didn't read it myself...).
Good luck.
|
|
|
|
|
|
Hi,
I am wondering how one can activate a flash or a Real player from C# should we use the ActiveX layer or generate html verbose from the app and how.
Thanks for any guidance.
Mike.
If you dont know were you are,look back were you come from. (Some time one dont know how far they travelled) Next time before you complain ! Give a friendly look to your sole. (African Wisdom).
|
|
|
|
|
Hi,
How to handle errors in SMTP class using .Net.Like if it the mail bounces back how to get that message.though using catch block i can handle general exceptions while sending Mail.i need to check the type of exception like if the recipient's mail box is full(The mail would typically bounce back - how to get these type of exceptions). And i have to check if the SMTP sever is not down before sending mail.I am using .Net framework 1.1(version 2003)
-- modified at 12:39 Thursday 8th March, 2007
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
I want to edit subitem in listview, I already use labeledit=true, but it only can edit in subitem[0] or I misunderstand about labeledit. I want to edit every field in listview. Thankyou
|
|
|
|
|
Are you wanting to edit the items programmatically or through the UI?
Setting the LabelEdit property to 'true' allows the user to edit the text of the items in the list.
|
|
|
|
|
I want to edit by UI
I already set LabelEdit to 'true' but it only allow me to edit the text of the items on the first.
|
|
|
|
|
Did you subclass ListView? Or are you just using the ListView class?
|
|
|
|
|
I just using ListView Class, I create ListView in Detail mode with 4 columns. If I user LabelEdit = true I can edit text in first column, but the other I cannot change it. I want to change every columns of the selected item by clicking on item and editing text. If I have to subclass listview on my own. Can u give me some guide?
|
|
|
|
|
Ah! Now I understand.
LabelEdit only allows you to edit the item's label. All of the items in a row in a details-view listbox are properties of a single item. So, all the items in each column of row 1 are properties of ListView.Items[0]. The label property is in the first column and only the label can be edited. If you want to make the other columns editable you'll need to create a custom control that derives from ListView and add your own code. There is likely an article on CodeProject for making the other columns in a ListView editable.
|
|
|
|
|
Hi,
I've an applicaton where some Messages WndProc in main form are handled customly. There is custom non-client painting, hittest, mouse capturing and stuff... For some reason the default context menu, which should be displayd when rightclicked on non-client are is no showing (Move, Size, Minimize, Maximize, Close items) . Can you help me how to invoke the menu ?
Thanx
|
|
|
|
|
When you repaint the non-client area of the form you need to manually code how the titlebar handles events. You will have to capture the mouse when it clicks a specifc area and then use the API command SendMessage to send API window message constants to emulate events of a normal window.Add Transparent Menus and XP Titlebar Buttons to your application[^] is an article that I wrote that shows how to do this with a custom drawn help button on the title window.
Hopefully this helps.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi
Is it possible to dynamically load a Type from an assembly and knowing what type the base class is call static methods from it?
If so, how?
Cheers
|
|
|
|
|
Yes you need to know some info though:
(FullyQualifiedTypeName)Assembly.Load(AssembleName).CreateInstance(className)
If you mess up by not including the full namespace the above call will not work.
Hope that helps.
Ben
|
|
|
|
|
Well i have a textbox (actually, i have about 14) that check the input to make sure the user doesn't put any invalid characters in.
So far, the checking is done in the TextChanged event, and it checks the last character that the user typed in. But if the user pasted in some text, it would only check the last character that was put in.
So, how can i tell if something has been pasted into my textbox, rather than typed?
|
|
|
|
|
Sometimes you might want to prevent pasting into your textbox. You can do this by check keypress event and looking for Ctrl-V or Shift-Ins. Even this isn't completely foolproof, but it will cover it pretty well.
Hope that helps.
Ben
|
|
|
|
|
Thats just not practical though. I for one wouldn't want to type in 20 lines of seemingly random letters and numbers. Because thats what people will be putting in. I'll keep thinking on it.
|
|
|
|
|
I guess the next thought then is to use the key press event to check for ctrl-v or Shift-Ins and then do some extra checking on the text box after that. Checking the key press event is the only way I can think of the app knowing someone just pasted something in the text box.
Ben
|
|
|
|
|
Why don't you handle the Validating event?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hmm, apart from checking the whole textbox everytime the user changes anything, i could get the text from the clipboard, and compare it to the textbox, if i find it matches, then they just pasted it in and i check the string for invalid characters.
It'd be a little more complicated that that of course.
I could also override the paste message, and do something there. But that would require even more messing around.
|
|
|
|
|
Have you looked at using a "MaskedTextBox"?
Phil
|
|
|
|