|
Colin Angus Mackay wrote: You might want to spend some time thinking
That's not how it's done. You just drag n drop and click a bunch-o-stuff until "it works"
If it works, do it.
If it works, do it it works.
seems to probably
If it ^ work s, do it it ^ works
(and might work again )
Gogito egro sum (although, admittedly, that is an assumption )
|
|
|
|
|
Colin Angus Mackay wrote: In short, think about what anchoring actually does. There is no one-size-fits-all to apply to all controls. You actually have to think about how you want the form laid out.
and once you go beyond a very basic layout and want something like a proportional split between two elements instead of having one fixed and the other doing the resizing you have to start writing some manual code in the onResize event anyway.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Design the controls runtime, according to its left,right,top,bottom and with respect to different controls already present their according to your need.
Imran
|
|
|
|
|
I read in configs from XML and one element is converted to an ENUM
enum SOURCETYPE
{
XML,
SQL
}<pre> //all error checking removed (for a laugh)
//other bits removed but you'll get the idea
SOURCETYPE _myType;
string myString = myXmlNode.Attributes.GetNamedItem("type").Value;
switch (myString.TrimEnd().ToUpper())
{
case "SQL":
_myType = SOURCETYPE.SQL;
break;
case "XML":
_myType = SOURCETYPE.XML;
break;
}
Is there a better / quicker / more CSharpish way of doing this? If I had loads of types it would be a big case statement to change "TYPE" to SOURCETYPE.TYPE.
"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.
|
|
|
|
|
hi
SOURCETYPE _myType = Enum.Parse(typeof(SOURCETYPE), myString);
regards
|
|
|
|
|
Yeah - I just done what I tell others to do and googled. You can vote me a '1' on purely on hypocrisy grounds alone!!
Thanks though. Good to have it confirmed.
"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.
|
|
|
|
|
In your case a 4 is enough of a punishment. But don't do this again.
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
|
|
|
|
|
I feel duly humbled.
while (true)
Console.WriteLine( "I will google before posting a question..." );
"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.
|
|
|
|
|
Hypocrite. I should have googled first.
SOURCETYPE type = (SOURCETYPE)Enum.Parse(typeof(SOURCETYPE), myString);
"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.
|
|
|
|
|
Here's reminder.[^]
-----
If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
God is the only being who, to rule, does not need to exist. -- Charles Baudelaire
|
|
|
|
|
lol that's a funny image
"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."
--Rich Cook
|
|
|
|
|
Hi all,
Could you please let me know if how can i generate the following piece of code using CodeDOM
public System.Int64 X
{
get
{
System.Int64 A = (System.Int64 )this["@B"];
return A;
}
}
I am not able to generate the following line:
System.Int64 A = (System.Int64 )this["@B"];
Thanks,
Ramesh
|
|
|
|
|
Why not delete your previous post now that you have provided a more detailed question
only two letters away from being an asset
|
|
|
|
|
Hi can anybody help me how to display a logo onto a windows form.
Actullay i am embbading media player into a winform,on this player i want to display my own logo.I think of using picture box bt i couldn't find any property like transperancy, or opacity for this picturebox.I am working on .net2.0.
Any assistance would be greatly appreciated.
|
|
|
|
|
Hello,
If you add the bitmap to the BackGroundImage property of your PictureBox (or Form), you could use the MakeTransparent method of Bitmap class, like this.
Bitmap YourBmp = new Bitmap(yourFormOrPictureBox.BackgroundImage);
YourBmp.MakeTransparent(YourBmp.GetPixel(0,0));
yourFormOrPictureBox.BackgroundImage = YourBmp;
-- modified at 9:14 Thursday 9th August, 2007
All the best,
Martin
|
|
|
|
|
what is "this" ? what is "Img" ?
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
|
|
|
|
|
Ooooops
Changed it.
All the best,
Martin
|
|
|
|
|
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
|
|
|
|