|
Why dont you edit my post then.
I dont like being called gullible either. I didnt say I believed him, I just asked a question here.
|
|
|
|
|
I need to be able to conditionally compile some code based on the compiler version, but I've been unable find any compiler defined symbols let alone something with the compiler version. If anyone know where these are defined I sure would appreciate you letting me know. Thanks
|
|
|
|
|
C# doesn't have any predefined symbols. There is nothing that specified the version of the .NET Framework or compiler version at compile-time. Also, macro's using the preprocessor directives are not supported. This is because there is no real preprocessor in the C# compiler, it's kind of "simulated".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
I wanna simulate keypress in a directx application.
I thought I'd use PostMessage for this, but how can I get it's handle? There's no caption, so FindWindow
doesn't work, and because it's a fullscreen application, I can't get the handle
with spy++ neither.
Any1 knows any way to do this?(without using applications that put it into a window)
Thanks
-- modified at 14:53 Wednesday 14th September, 2005
|
|
|
|
|
Hello,
I am trying to make a program where I can get curve data points after placing a few points on screen and having the Windows GDI Draw a curve from those few points. I already have the program done to the point where I can place points and draw a curve, but now I want to be able to get the data of many points on that drawn curve. So if I place five points, and let the GDI draw the curve I would like to be able to get around 100 data points that lay on that curve. Does anyone know where I could get this functionality in C#. I have been searching online for a while. I wish the GDI would just have a function where I could just get all the points it uses to draw the curve but I don't think that is built in.
Thanks for your help,
Michael Brown
|
|
|
|
|
need to split into an array string where delimeter is "ftp://";
(please note that I can not change
"ftp://" to single char, and I have no idea how many ftp sites there might be
to extract, could be one, could be 100's or 1000's)
|
|
|
|
|
Why can't you replace the "ftp://" with a "|" or something and then do the split?
|
|
|
|
|
Regular Expressions.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i am trying to use my own calendar class derived from the abstract calendar class in System.Globalization i need my custom calendar because what i want is ethiopian calendar, the calensar works OK, but the problem is there is no culture specified by microsoft for ethiopian (Amharic) Language so i've gotten away by using other culture and changing editable parts of it for globalization,localization of the application; now the problem is i can not assign a calendar for any culture, i need it for local date conversion & automatic formatting is there any way to get around this.
|
|
|
|
|
I was waiting for a reply any of u guys never run to this...
|
|
|
|
|
I have different date formats for eg.
1) dd-MM-yyyy
2) MM-dd-yyyy
user can prefer to have one format in the preferencess tab.
and he enters a date 06/05/2005
in format a i have to read it as 06-May-2005 ie 20050506T00:00
in format b i have to read it as 05-Jun-2005 ie 20050605T00:00
How do i say that read the date as per the specified format.
Is it possible to have a function like
public datetime ParseExact_Custom(strDate,strInputFomrat,strOutputFormat)
{
............
//what should i do here ??
//if you can convert them to "s" also would be greate.
}
if any body please could help me i will be thank full
Vinay Bhushan.S
Vinay Bhushan.S
|
|
|
|
|
From MSDN:
The following sample demonstrates the ParseExact method.
string strMyDateTime = "2/16/1992 12:15:12";<br />
<br />
System.DateTime myDateTime =<br />
System.DateTime.Parse(strMyDateTime);<br />
<br />
System.IFormatProvider format =<br />
new System.Globalization.CultureInfo("fr-FR", true);<br />
<br />
string strMyDateTimeFrench = " 16/02/1992 12:15:12";<br />
<br />
System.DateTime myDateTimeFrench =<br />
System.DateTime.Parse(strMyDateTimeFrench,<br />
format,<br />
System.Globalization.<br />
DateTimeStyles.NoCurrentDateDefault);<br />
<br />
string[] expectedFormats = {"G", "g", "f" ,"F"};<br />
myDateTimeFrench = <br />
System.DateTime.ParseExact(strMyDateTimeFrench,<br />
expectedFormats,<br />
format,<br />
System.Globalization.<br />
DateTimeStyles.AllowWhiteSpaces);<br />
---
b { font-weight: normal; }
|
|
|
|
|
I know this is in the MSDN
but i dont want to apply any culture here i have two very specific date formats and i have to treate the string in that format as date.
is there a possibility or i have to write a custom split join and create a new date object form them or its possible to format andy given string in any format.
Regards
Vinay
|
|
|
|
|
The CultureInfo object contains a DateTimeFormatInfo object that tells the parser how to parse the string. You can use just a DateTimeFormatInfo object as format provider, and create the object with any settings you like.
---
b { font-weight: normal; }
|
|
|
|
|
Hello,
How can I change the colour of the rows in the datagrid, depending on the row number?
Thank you,
|
|
|
|
|
Hi,
i've developed an application that makes use of crystal reports... when i test the ap on a machine that only has the .NET framework installed i get the following error
"Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304' or one of its dependancies. The system cannot find the file specified."
i guess this means that the referenced assemblies are not being included/generated/ copied to the output directory... in either case, how do i overcome this set back??
i always assumed that if i developed an app that used Crystal reports that when i deploy, the IDE (VS2005 in my case), would create the necessary assemblies...
any jelp would be great,
Thanks
Afzal "AV-E" Hassen
|
|
|
|
|
Unsure about vs2005, but in vs2003, you need to include the assemblies in the setup/deployment package.
When you do this, you have to enter the license key you got when you registered crystal reports. This get built into the package. When the package is installed on another pc, all the relevant files for CR are installed aswell.
Check out http://www.crystaldescisions.com There's some knowledgebase stuff in the support section explaining how to do it.
Andy
|
|
|
|
|
Hi there,
I'm creating a Windows Forms Application that primarly uses User and other derived Controls in order to extend their properties.
One of the property is a collection - the type is derived from System.Collections.CollectionBase. The type of the elements is a class which only contains some data elements.
To have a user friendly selection in the property grid of Visual Studio a type converter class is implemented for both - the collection and the elements class. The Serializable-Attribute is set too, and the ToString-Method is overriden for the elements class.
The controls using the classes described above works fine in the Forms Designer except cut or copy an element into the clipboard produces a message box with the text
The type MyApplication.Controls.MyControl in Assembly ... is not marked as serializable.
FYI: The collection and item class is defined in a sepparate Assembly and the Controls are also in a different Assembly.
Any suggestions are welcome
Thanks in advance
Horst
|
|
|
|
|
Hi there.
I'm fiddling around with arrays and i need to collapse (re-arrange) an array. Currently i have no clue how to do it, so if anyone could help out with a little example or some hints i would be thankful.
An example of what i want to do:
---------------------------------
An array containing 5 elements
1 - 2 - 3 - 4 - 5
If i remove element index 3 from the array i want the index of element 4 to change to 3 and the index of element 5 to chance to 4. How is this possible?
Thanks alot in advance!
|
|
|
|
|
Create a temp array, copy all the other elements to it, then assign the temp to the old array.
|
|
|
|
|
Take a look at the ArrayList.
|
|
|
|
|
I have a simple class:
public class Test
{
public Test()
{
}
public string name;
public int age;
}
and part of the code used in de/serialization:
Test c;
Test a = new Test("martinez", 21);
Test b = new Test("kate", 20);
TextWriter tw = new StreamWriter("c:/text.txt");
System.Xml.Serialization.XmlSerializer ser = new System.Xml.Serialization.XmlSerializer(typeof(Test));
ser.Serialize(tw,a);
ser.Serialize(tw,b);
tw.Close();
TextReader tr = new StreamReader("c:/text.txt");
c = (Test)ser.Deserialize(tr);
tr.Close();
And here pops an error
An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll
Additional information: There is an error in XML document (12, 3).
, why I can`t deserialize an object from that file?
Further question - may I keep different sort of objects in one file? If so, how to check if read object is the one I was looking for?
thank you for any help
|
|
|
|
|
Hi,
i have developed a user control, when i put the user control with a larger size from its originalone on a form, only the original size is shown, it is like when a picture is shown in a picturebox with property streach set to false.
I want to do streach the user control to the size it is on the form &
i want a lebel to be 8 pixel down fromits top no mater what is its size on the form (i want to control the locations of the internal control)
Can anyone help me
Regards,
Arus
|
|
|
|
|
hi
im trying to create a number of radiobutton in runtime.
int i = 0;<br />
while (TempString != null)<br />
{<br />
if (TempString.Length > 3) <br />
{<br />
RadioButton rbNew = new RadioButton ();<br />
rbNew.Name = (rbNew.Name.ToString() + i.ToString());<br />
rbNew.Text = TempString;<br />
rbNew.Visible = true;<br />
pnVSSProjects.Controls.Add(rbNew);<br />
<br />
}<br />
i++;<br />
<br />
}
but it only create the first RadioButton and not the others.
please help.
thanks
Have a nice Day
-- modified at 8:37 Wednesday 14th September, 2005
|
|
|
|
|
liqnit wrote:
RadioButton rbNew = new RadioButton ();
rbNew.Name = (rbNew.Name.ToString() + i.ToString());
rbNew.Text = TempString;
rbNew.Visible = true;
pnVSSProjects.Controls.Add(rbNew);
You're not setting the Top and Left properties of the controls you're creating to move them around the container they're in. This means that each one is being put in the exact same place, so the first one created is the only one you actually see. All the others are behind it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|