|
Hi All,
Please let me know if how to use CodeDOM in .NET to autogenerate a Const member field with initialization.... ???
Thanks,
Ramesh
|
|
|
|
|
For Eg.
If i have a class with a member field as follows:
Private Const int ID=123;
How to generate this using CodeDOM?
|
|
|
|
|
as both the groupbox and the panel accunulate the controls.so what's the difference between them
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
there are lots of similarities; a nice difference is the outline you get for free.
reading MSDN will make you discover all the differences.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi
Can anyone help me in populating the DevExpress Chart control at runtime using the datasets.
My due date is nearing, please help me out.
-----
Sapna
|
|
|
|
|
hsahjirava wrote: My due date is nearing, please help me out.
Head on over to the DevExpress forums and Support departments ASAP then. They're very good at answering questions about their products.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hsahjirava wrote: My due date is nearing, please help me out.
Congratulations. Are you wanting a boy or a girl?
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
Malcolm Smart wrote: Are you wanting a boy or a girl?
Yes.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Malcolm Smart wrote: Congratulations. Are you wanting a boy or a girl?
He's not fussy. Beggars can't be choosers.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i wrote the following code at the form load
ArrayList s;
it showed the following error
The type or namespace name 'ArrayList' could not be found (are you missing a using directive or an assembly reference?)
is there any dependency or namespace i have to include.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
hi sonia
ArratList? or ArrayList?
regards
|
|
|
|
|
Because it should be ArrayList instead. There is no ArratList in any of the standard namespaces (I can't speak for any assemblies you've written here). The ArrayList is in the System.Collections namespace.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
It's ArrayList not ArratList .
Also, you need to reference the System.Collections namespace in a using statement, or fully qualify the type, eg: System.Collections.ArrayList .
/ravi
|
|
|
|
|
Hi sonia,
i think you have problem with arraylist declaration....
you may use .....
private ArrayList mylist= new ArrayList[100];
i think it will works...
Nisar Inamdar.
Always For U
|
|
|
|
|
Nisar Inamdar wrote: private ArrayList mylist= new ArrayList[100];
This line will not compile (and im sure you didnt want an Array of 100 ArrayLists)
|
|
|
|
|
For all Framework classes MSDN states to what namespace they belong.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Sonia Gupta wrote: ArratList s;
it showed the following error
The type or namespace name 'ArratList' could not be found (are you missing a using directive or an assembly reference?)
Because there is no class named like ArratList
|
|
|
|
|
I'm looking or a neat way to draw all over the top level form of my application. I have a MDI form that contains a split container control and a variable number of child forms. I want to draw using GDI over the whole area of the form. I can do this using DrawReversibleLine but while it is adequate it is not ever so elegant and can draw in the wrong place - I could program some more to stop it doing this but I was looking for a way of using c# and gdi to draw over the whole of the form or for that matter, on any control or region.
My bit of code looks like this:
Graphics gg = this.splitContainer1.Panel2.CreateGraphics();
Pen pp = new Pen(Color.DarkTurquoise, 1);
this.Show();
gg.DrawEllipse(pp, 30, 10, 70, 50);
It draws an ellipse in panel2 of the split container and of course cannot draw anything outside of it. I want to be able to draw either over the whole split container (say) or over the whole form.
What are my chances?
Kind Regards,
Andrew Parsons.
|
|
|
|
|
If you want to draw on the form, use the form's Paint handler.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hello Luc!
I think his problem is that it will not draw his painting over(z-Order) the Controls which are placed on the Form.
Or is there a way todo so?
I once had this problem, and endet up placing an Transparent Form on top, which does the painting.
All the best,
Martin
|
|
|
|
|
Hi Martin,
I don't know what the z-order would be of existing controls and the form's own ink.
And frankly I don't care, I never paint on a Foem, I paint on a Panel, and yes if
the requirement would be to paint over existing controls, I would add a disabled
and transparant Panel in front of everything (not another Form! I try to keep things simple)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hello Luc,
Luc Pattyn wrote: z-order
I just wanted to say, infront: like the z-Order of Controls.
Has nothing todo with form's ink, off corse!
Luc Pattyn wrote: (not another Form! I try to keep things simple)
It depends on the task, if this statement is valid or not, I guess.
All the best,
Martin
|
|
|
|
|
Thanks for the replies. I'm still working on it and making some progress. If I use DrawReversibleLine which draws a nice clean line down the form over everything as I want I get a problem with it painting over other windows. This happens especially when it is partially covered by other windows and they move. My application draws a moving line that is triggered by a clock tick. At the moment I am going down the path of using DrawLine. This however will require a pretty full repaint every time the pointer moves, it will however behave properly as far as Windows is concerned.
DrawReversibleLine takes screen coordinates and will draw a line on the screen using the coordinates you give it regardless of any windows that might be partially obscuring yours. I really need the extents of the unobscured window so I can give DrawReversibleLine coordinates that only fall within the visible window. Am looking at GetUpdateRect at the moment to see what that will give me.
|
|
|
|
|
It would be helpful if I could find the part of the form/window that is actually visible at anytime and not partly obscured by other windows. DrawReversibleLine as it uses screen coordinates doesn't seems to draw right over them. Normally this would not happen but my application responds to a timer tick so paining and graphic update activity takes place when the window does not have the focus.
I have scoured the forums and sites for anything I can find on the subject but it seems that the only way to get the shape of the visible part of the window or indeed to find out if it has been partly obscured is to go through the list of all the windows on the desktop and check their details. It seems that the actual window/form itself does not know when it has been obscured.
Have found a couple of people who have had exactly the same query over the years but the thread just stopped. So perhaps they found the answer and did not log it, or realised it was insoluble (not really just complex and laborious) and did it another way.
I'm going probably going to draw on a transparent panel or directly over the form which works and politely observes the boundaries of other windows. It just involves more painting and work for the operating system whereas DrawReversibleLine just draws and undraws over the screen.
Thanks for the replies and the additional info, I feel like Edison I now know tons of ways that will not work and like Sherlock Holmes what is left is what I must use.
The couple of questions that remain are:
1) How does one get the visible region of a partly obscured window?
2) Can a window detect when it is being obscured?
Kind Regards,
Andrew Parsons (UK)
|
|
|
|
|
Hi Andrew,
aparsons_cp wrote: How does one get the visible region of a partly obscured window? Can a window detect when it is being obscured?
I see no way to get that. The Paint handler gets a Graphics which holds a clipping
rectangle (obviously not good enough to give the details), and a clip region which
is not minimal (seems to be rectangular too). I tested the clip region by feeding
some points to Region.IsVisible() and it seems to ignore cover ups.
There is no cover up event; Paint gets fired when the Control gets (partially)
uncovered, not (partially) covered.
So I am not convinced ControlPaint.DrawReversibleLine() is the right tool for you;
I understand the reversible is nice, but you clearly want to draw to a Form,
not to the screen. (Actually the whole ControlPaint class seems wrong, the
ButtonHover/Leave example also does not take into account a possible cover up).
BTW: seems like a good topic for a CP article !
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|