|
I'm trying to do a custom draw on listview items, when a listview is in large icon mode. I've found lots of samples, one here on codeproject, but none seem to be geared towards the icon mode. The problem I'm getting is i'm not getting given an 835 (CUSTOMDRAW) message in the WndProc function, which the listview sends to itself (reflected message), I only get an 870 in it, which is a NOTIFY message.
I basically want to right my own listview that customises the large icon view of a listview, so for example, I could do a photo gallery with descriptive text underneath each item.
If anyone can point me in the right direction, that'd be much appreciated. I've hit a bit of a brick wall with it.
|
|
|
|
|
smallguy78 wrote:
The problem I'm getting is i'm not getting given an 835 (CUSTOMDRAW) message in the WndProc function, which the listview sends to itself (reflected message), I only get an 870 in it, which is a NOTIFY message.
Why you doing that? Just set the OwnerDraw property to true, and use the MeasuerItem and DrawItem overrides.....
top secret xacc-ide 0.0.1
|
|
|
|
|
Listview doesn't have MeasureItem and DrawItem, which is why I need to use p/invoke to do it.
There's a few examples out there, like I said, none of which work with large icon view.
|
|
|
|
|
|
With the help of ListViewEx's implementation, I've got it working. The NOTIFY message is being called ok, and the -12 (CDDS_ITEMPREPAINT) is also being called. It's all painting okay, so if anyone ever needs to do this, send me an email and I can help out (I'm doing large icons listview though, remember)
My only problem is the rectangle I'm getting back doesn't contain any width information (the Right property is the same as the Left, x same as y). I can work around this as I'm doing a custom draw, but it's a tad annoying.
|
|
|
|
|
I want to delete a file for an image but before deleting it the image is shown in a picturebox control so when i try to delete the file it tells me tht this file already in use
i tried the following but gives the same Error
First Trial
pictureBox.Image.Dispose();
Second Trial
pictureBox.Image = null;
GC.Collect()
but both trials failed
thx
|
|
|
|
|
Try to load your image from the file by using streams and then close the stream before you want to delete the file.
www.troschuetz.de
|
|
|
|
|
hi there
i have a Form Whit a DataGrid on it
in the datagrid i have a lot of data
when the Form is load
i want to see in the datagrid the last data that enterd
the last page
i dont want to scroll down the datagrid scroller any time the form is loaded
i want it to be automaticely .
how can i do it ?
thanks ... i hope somebady to help me
i am in c# - my DB is Accses
|
|
|
|
|
Set the DataGrid's CurrentRowIndex property to the number of Items in the DataGrid's DataSource property - 1. Minus one, because the row index starts at zero.
e.g.:
datagrid1.CurrentRowIndex = ((DoCastHereToTypeOfDataSource)datagrid1.DataSource).Count - 1 //Count could be Length if you use an array
|
|
|
|
|
hi,
Now i am trying to use Microsft Chat control 6.0 (COM) into my C# application. I want to bind lot of numeric data with chart control. I don't have any prior experience with vb. And i can't find any material which will give alteast little about this idea.
What about you ? You know any material which deal these senario....
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
sreejith ss nair wrote:
And i can't find any material which will give alteast little about this idea.
Yeah i feel the same dealing with COM stuff. Docs are there, but extremely well hidden. Advice: PRAY!
top secret xacc-ide 0.0.1
|
|
|
|
|
hi,
who hide that all userful stuffs. Microsoft ????
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Hi gurus!
The problem domain:
1. C# defined xml comment tags are 'summary' 'remarks' etc.
2. I have decided/defined new xml tags I want to use in the same manner.
3. I want the VS developers in my company to see my tags listed in the ListItems box (Intellisense) when they click '<'.
My solution directions:
1. If there's a file/template where VS defines its tags - I'd add mine.
2. If there's a way to attach to Intellisense events and to add my tags before it shows the ListItems box, I'd write an add-in.
Known solutions which are irrelevant for me:
I've seen on the web an add-in which opens a context menu. This is not what I'm searching for, since it is not transparent to the user...
Thank,
Kfir
|
|
|
|
|
How can I disable all keys including Ctrl+alt+Del , Alt+Tab and Windows Keys when a user is interacting with my form? I have a borderless form which covers the entire screen and I have to probhit the user from getting out from it.
Thanks,
|
|
|
|
|
You cannot normally disable Ctrl+Alt+Del because it's the Secure Attention Sequence, used for bringing up the Windows Security dialog.
You can stop many other keys from having their usual effects using a keyboard hook.
Paul DiLascia documents how to do it - in C++ - in this MSDN Magazine column[^].
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Apparently if you replace one of the system
DLLs on NT based system you can bypass
control-alt-del but I forget the name
of the DLL in question. If you google
for NT Admin Tips you might find it
and where to get the replacement DLL.
I'd advise against this modification
without client permission though.
|
|
|
|
|
Yuo can't disable the Ctrl-Alt-Del sequence unless you write your own GINA.DLL and replace the system version with yours.
You also can't write the new GINA in C# either...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi code guys!
1. I've an application with web browser control. I want to access all the text from loaded page.
I've used mshtml. but don't have any idea how to implement it.
2. Loaded page refreshes after every 2 minutes. Is there any event to detect refresh method of the page.
|
|
|
|
|
Recently I was creating a WinForms application. I made several seperate projects - each with a different GUI.
One of the thigns I noticed is that at random - win form apps like to delay themselves when dragging the main form around.
Try this out for yourself. make a form drag some lightweight components on there and then compile it..
make a few more with the same components - you might note - one is faster - meaning more responsive with dragging than the other.
my question is this - why is this happening and how can it be prevented??
comments? questions?
ive been beating my head against the wall trying to find out why.
Danny!
|
|
|
|
|
Hi,
MS Outlook has a cool control that's a combobox, a textbox and a label. The combobox selection (marked with a check) shows in the label and the value goes into the textbox. The control is used to select which TYPE of phone number (home,mobile...) to allow the user to alter in the textbox.
I know I could build a similar control, but I'm hoping that the control is available in some type of common control dll. Is it? Or something similar?
thanks,
Deanna
|
|
|
|
|
I just finished my calculator in C# but i've found a bug which i don't know how to solve. When i do calculation ( 3,1-3 ) i get answer 0,0999999
rather than get the correct answer 0,1.
I heard that early versions of windows had this bug in their calculator...I will paste here some code where the problem might be,
but i am not entierly sure if it is this peace of code.
/*******************************************/
private float changeTextToNumber()
{
string text = textBox1.Text.ToString();
float returnNum = float.Parse(text);
rensa = true;
return returnNum;
}
/*******************************************/
|
|
|
|
|
|
I have no solution regarding your question, but some annotations to your code snippet.
1. You don't need to call ToString for the Text property as it already returns a string.
2. Put the call to Parse into a try block to catch exceptions if your textbox displayed no valid numeric string.
www.troschuetz.de
|
|
|
|
|
Use the decimal data type. It's a 128 bit number with 28-29 significant digits.
Marc
|
|
|
|
|
Thank you for the answers. I will try them and if/when i solve the problem i will tell you guys what was wrong.
|
|
|
|