|
I'm not using a graphics object.
Image.FromFile("blah");
|
|
|
|
|
Change the resolution on your display and check the properties again.
Bo Hunter
|
|
|
|
|
when creating a DataTable,is it possible to set the column.wdth for
a DataColumn to zero?
Thanx
|
|
|
|
|
I would imagine it would generate an error, but the biggest question is why would you want to?
Rocky Moore <><
|
|
|
|
|
e.g. i got 4 dataColumns "name","surname","age","konfession"
i want dataColumn "konfession" to fade out/fade in on click
i know how it goes using TableStyles but i want it with DataTable
Thanx
|
|
|
|
|
perhaps column.visible = false would be better? Not sure what you are trying to do though. However, setting the width to 0 should usually work (saying that without having tried).
Greets!
|
|
|
|
|
It will not work as You want. The best solution is to use TableStyle/ColumnStyles and set/reset MappingName for instance.
Hi,
AW
|
|
|
|
|
what about setting one row in a dataRow to readonly = true?
Thanx
|
|
|
|
|
Try to override Edit() method in all ColumnStyles (works) or BeginEdit in Table Style (not sure).
protected override void Edit(CurrencyManager cm,int row,Rectangle rc,bool rdo,string itxt,bool vis)
{
if(!myReadOnly) base.Edit(cm,row,rc,rdo,itxt,vis);
}
Hi,
AW
|
|
|
|
|
As soon as I add an implementation for the interface IEnumerable to my class, like this:
<br />
public class TableLayout : IEnumerable<br />
{<br />
public IEnumerator GetEnumerator()<br />
{<br />
return (IEnumerator) this;<br />
}<br />
<br />
the serializer complains with the message:
"There was an error reflecting type 'TableEditConfig'"
when reading the XML file into the class.
If I comment out the interface stuff it all works fine, does anyone know why please?
|
|
|
|
|
Add an XmlInclude attribute to your class
[XmlInclude(typeof(TableEditConfig))]
You should also make sure that TableEditConfig is marked as [Serializable()]
HTH
Shaun
|
|
|
|
|
just a curious question , with having coded in vb for a while i want to be sure that c# isn't gonna be here today , gone tommorrow.
switch(twinsOnWay)
{
case ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
break;
|
|
|
|
|
I think it's fairly safe to say that C# is certainly going to be around for the long haul... over here in the UK a massive number of companies that I'm aware of are making large investments in moves to .NET and thankfully C#... (unfortunately one or two consultancy reports indicating that the move from VB to VB.NET would be considerably less painful than to C# has really hurt the .NET name in some areas...)
I did actually think that MS were going to start moving VC++ into retirement but it looks like they are still investing heavilly in Managed C++ so it's nothing but choice for developers... (MS obviously hedging bets!! )
If you look at the roadmap for C# the future looks quite compelling... next stop... generics!!!
Shaun
|
|
|
|
|
I am sure we will see VB/Java/C# for ages to come. C# however is the only standardized language of the three langauges.
As a C++ programmer, moving to C# is fairly natural. It reminds me of my last major jump in lanaguages in 80's when I moved from Assembler to C. Moving to C++ was not much of a transition. In the early days of C, it seemed bulky and kind of slow since compared to Assembler but it added a lot of RAD development to our world at the time. For many things C was fine, but for some things you had to revert to Assembler where absolute speed was required. At the time, OS's were built with Assembler. Now they are usually built in mostly C/C++.
With C#, there is a lot of changes from C++, and it can seem slow for somethings and may require MC++. But in the future more things will move that direction and speed will increase as will computer speed.
One thing I am waiting to see happen, since C# is a standard, is a form of C# scripting added to browsers. May not have the entire .NET frameworks, but could still work well to handle client side code. I get turned off having to resort to Javascript when I code client side.
I am sure that no person can say that it will remain for sure or not, but the same goes for any language. During the last six months, I have heavily used C# and enjoy it as a language. There are a few things I would change but I can live with them.
C# gives you much of the ease that VB programmers have been used to for years without the stigma of being BASIC. As for as .NET is concerned though, it does not matter much which language you use, but the job listings for C# programmers are usually higher.
Rocky Moore <><
|
|
|
|
|
<br />
switch(twinsOnWay)<br />
{<br />
case ("twins on the way"):<br />
MessageBox.Show("for mr and mrs dynamic","twins on the way");<br />
break;<br />
--->Syntax Error - line4 ( missing } )
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
the } isnt missing;P i just use that many lines on my profile signature on message boards. there's more code in the actuall form;)
switch(twinsOnWay)
{
case ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
break;
|
|
|
|
|
hi does anyone know if there's an equivalent to the Split function in c# ?
|
|
|
|
|
See String.Split and Regex.Split.
Kant wrote:
Actually she replied back to me "You shouldn't fix the bug. You should kill it"
|
|
|
|
|
cheers , although i'm struggling with it a bit, if i want to seperate the first space in a row of text, how would it be done? all i can find is info on arrays of stuff ( eg: i want to split this line "hello i'm a test" , so that all i get is "i'm" ) but all i've managed to find is some really complex stuff on msdn about splitting whole lines
in vb6 / vb.net i've always been able to do this...
Dim text as string
text = Split("hello i'm a test",chr(32))(1)
/// bringing back the "i'm" bit
any ideas?
|
|
|
|
|
Both the C# version and the VB6 version return an array, you are just accessing a specific element of that array in your example.
This should work:
string word = "hello i'm a test".Split(' ')[1];
To be more verbose, you are setting the variable word to the first element in the array returned by calling the Split method on the string "hello i'm a test".
The large downfall with the .NET version of Split is that it only splits on characters not strings. I don't think this is a problem with Regex's but I don't know for sure.
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
dynamic wrote:
Dim text as string
text = Split("hello i'm a test",chr(32))(1)
Code this on C# as:
string text = string.Split("hello i'm a test", ' ')[1];
Kant wrote:
Actually she replied back to me "You shouldn't fix the bug. You should kill it"
|
|
|
|
|
cheers guys that worked great
i've only decided this week to make a move over from vb6 / vb.net to c# so it's all new , although i'm beginning to grasp the concepts a bit now.
thanks a lot.
|
|
|
|
|
using System;
namespace testString
{
class testString
{
public static void Main(string[] args)
{
string secondword = "";
string text = "hello i'm a test";
string[] fragments = text.Split(new char[] {' '});
if( fragments.Length > 2 )
{
secondword = fragments[1];
}
Console.WriteLine(text + "\n" + secondword);
}
}
}
This will return i'm.
|
|
|
|
|
You can use the code sample I posted above just to test and see it write out the second word to the command line. Alternatively, here is a method you can add to your class or a utility class to just get the second word. This will return the 2nd word, or a zero-length string if there is no 2nd word. Yes I was bored Time to sleep now.
private string GetSecondWord(string TextIn)
{
string secondword = "";
string[] fragments = TextIn.Split(new char[] {' '});
if( fragments.Length > 2 )
{
secondword = fragments[1];
}
return secondword;
} Happy To Help,
Joe Mozelesky
imoz technologies, llc :: powered by imoz
|
|
|
|
|
I would like to know the procedure for Printing WinForm Controls, both Built-in and Custom Controls.
BETTER TO BURN OUT THAN TO FADE AWAY - Anonymous
|
|
|
|