|
I'll second that. It was the third WPF book I bought, and it's by far the best. The Nathan and Sells books aren't bad, but this one is streets ahead - so much so that I also bought the e-book version.
|
|
|
|
|
Good answer. Right on the mark.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Thanks
|
|
|
|
|
Hi
i created an application that take parent of other applications useing the SetParent() method, the problem is that the chiled application menu stop working when i open the child through the parent application.
can anyone help thanks.
Mohammad Al Hoss
Development To Me Is A Pleasure more than a Job
|
|
|
|
|
Hi,
One small help..
need to change the scroll bar color in a panel (windows application, C#)
Any simple n small sample needed.(m a newbie... )
Thanks in advance
Newbie
|
|
|
|
|
The scrollbar is styled based on the OS. To customize it you will have to manually paint the scrollbar yourself by creating a new control inheriting from Scrollbar.
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 Blog
|
|
|
|
|
Hi
I am trying to set up a year calendar, which initially seemed an easy thing to do using the monthcalendar in .net 2005. It is to display an employees absences for the year.
However, delving into it, it looks like there is no way of changing the back colour of a number of days within the year. On top of this, I would require different colours to represent different absence types.
I have looked around the net and have seen examples on codeproject, but nothing that allows the calendar to expand to a year (4x3 months) and to represent absence type by different background colours.
Does anyone have any idea how to do this or point me in teh right direction?
thanks
Dean
|
|
|
|
|
You can write your own custom control.
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 Blog
|
|
|
|
|
I was under the impression that you can't derive from this control. I read it somewhere on msdn, that it cannot be overridden. I haven't got time to rewrite a calendar control from scratch!
your answer wasn't very helpful.
|
|
|
|
|
Nope - you can inherit from the control. If you look at the documentation here[^] you will see that it clearly tells you that it can be inherited and that you would need to override the OnPrint method.
|
|
|
|
|
|
Genius - I take it that's repayment for Computer says no.
|
|
|
|
|
Has anyone created or seen an extension of the existing splitter panel that supports an "unlimited" number of panels?
If now, any hints on how to do it would be appreciated!
|
|
|
|
|
Daniel Jansson wrote: an "unlimited" number of panels?
What do you mean? Like 100 Rows and 100 columns? After a certain number of rows and columns it starts to sound like a job for something else like a grid or whatever, rather than a split panel control.
led mike
|
|
|
|
|
More like either 100 rows or 100 columns, but not that amount, more like 5 rows or columns.
I want the user to be able to resize and show/hide the different rows / columns easily.
The tablelayoutpanel can't be resize by default right?
|
|
|
|
|
Daniel Jansson wrote: I want the user to be able to resize and show/hide the different rows / columns easily.
To accomplish 5 or 6 rows or columns you could use nested SplitContainers. Let me be clear, I am not advocating that, I don't know near enough about the problem you are trying to solve to suggest any solution.
led mike
|
|
|
|
|
Hello,
when a key is pressed in a win form, it receives "key down" message. That event can be traced in WndProc function where another parameter indicates what key was pressed.
But the problem is discerning the left and the right control, shift or alt keys. Do you know how to find out whether right or left key was pressed?
|
|
|
|
|
As far as I know there's no visible difference on left and right shift keys in .net event data. However, you can try using native WM_KEYDOWN notification and see if it shows the difference.
|
|
|
|
|
Hi Paul,
I think you can find the information you need by coding a KeyDown event handler and examining the KeyEventArgs.Modifiers property. This returns a bitwise combination of values from the Keys enumeration which differentiates the right and left keys. The Alt keys are named LMenu and RMenu so you might easily miss those if you don't read the Keys documentation really carefully.
Alan.
[EDIT] Just tested this and the modifiers property doesn't return the left and right information, just plain Keys.Control, Keys.Alt etc.
|
|
|
|
|
Hi again,
thanks for your replies. KeyEventArgs.Modifiers can't discern left and right controls, I tried. The same concerns WM_KEYDOWN . 'Wparam' value passed with WM_KEYDOWN is surprisingly identical not only for e.g. control key. I'm wondering why pressing right alt (RMenu) resulted in the same event code as pressing a control key.
However, I came across some info about native methods in winapi programming, with which left and right keys can be discerned. These are:
GetAsyncKeyState() and GetKeyState()
They return the state of a certain key with needed distinction. With some indirect code, it is possible to find out whether left or right key was pressed.
But there comes the problem again (mentioned above): when I press right alt, firstly, the WndProc method gets a message as if the left control was pressed. Secondly, a KeyDown message for right alt is passed. Why is that so strange?
|
|
|
|
|
Good to know. Did you check lParam if WM_KeyDown. I understood from documentation that it should show the difference:
lParam
...
24
Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
Mika
|
|
|
|
|
Can you let me know where did you find that information?
Well, there is a difference but the value is never 1.
For instance, on right alt down, there are two stages as I described.
At first lparam = 1900545. Nextly, it is 557318145. Can it be dependent on the keyboard type?
However you've got a point. I'll put more attention to lparam. But still, I don't know why pressing right alt causes sending two separate keydown messages. First for control, then for alt.
|
|
|
|
|
Sure: WM_KEYDOWN Notification[^]
The value depends on many factors so the number may be significantly different at different keystrokes (or when the key is repeated and so on)
I'm not absolutely sure about this but I've understood that right Alt isn't only alt but it's combination of Alt+Ctrl (that is also the reason for naming it Alt Gr and not only Alt)
Mika
|
|
|
|
|
Now I see what they mean with those numbers and value of 1. It is about specified bits inside lparam. No wonder that it has stranges values.
You've helped me much so far, thanks. I'll post here when I come to something reasonable.
Paul
|
|
|
|
|
You're welcome
I'd be glad to hear when you resolve your problem or if new problems arise
Mika
|
|
|
|