|
Does the file open up correctly in Internet Explorer without any errors?
<?xml version="1.0"?>
<CommBaseSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<port>COM3</port>
<baudRate>2400</baudRate>
<parity>none</parity>
</CommBaseSettings>
seems to open up correctly.
Regards
Senthil
_____________________________
<font face="Verdana" size=1><a href="http://blogs.wdevs.com/senthilkumar">My Blog</a> | <a href = "http://www.codeproject.com/script/articles/list_articles.asp?userid=492196">My Articles</a> | <a href = "http://geocities.com/win_macro">WinMacro</a></font>
|
|
|
|
|
Hi
I have a status bar in my main form. This status bar displays different text. I need to display a tooltip with a text (on mouse over) if the text is too large to fit into the status bar - if it's not completely visible (similar functionality as in Visual Studio). How do I determine if the length of the text string is larger than the current width of the status bar panel? Currently I'm using, e.Graphics.MeasureString, to compare length of the string in pixels to the length of the status bar panel in pixels, but that hasn't been giving me the the results I wanted.
Thank you in advance
-- modified at 16:58 Monday 12th September, 2005
|
|
|
|
|
Hi, im moving a .xls file to another directory, but if this file exists i want to rename it and still move it. For example, if i have a ex.xls in a directory and im trying to move another file with the same name, i want to rename it like to ex1.xls and move it. How can i do this? any ideas?
Thanks in advance.
|
|
|
|
|
|
a simple function as such should do the trick.
void MoveMe(string filename)
{
int x = 1;
string newfile = filename;
while(System.IO.File.Exists(newfile) == true)
{
String[] tmp = filename.Split(Convert.ToChar("."));
newfile = tmp[0] + x + "." + tmp[1];
x++;
}
System.IO.File.Move(filename, newfile);
}
-- modified at 13:45 Monday 12th September, 2005
|
|
|
|
|
do the variables filename and newfile includes the directory?
|
|
|
|
|
in this case, yes. The file name is split at the "." in the filename.
So if filename = C:\Autoexec.bat then newfile = c:\Autoexec1.bat
Because of design, if a file name consists of more than one period, you will receive unexpected results.
|
|
|
|
|
Hello all
I am starting a mailer application project in c# using Visual Studio .Net. As I need to learn more about the process of sending emails (e.g email message structures, SMTP Protocol etc.) , I would appreciate it if you could send a few links to relevant reading material and examples.
And equally important - I need to know which classes and assemblies deal with sending email messages (I saw something about microsoft.uddi.dll in the Visual Studio help).
Will appreciate any help,
Thanks,
Gal
|
|
|
|
|
|
That's great, it will really help me get started.
Thanks a lot.
Gal
|
|
|
|
|
Hi,
I would like to build an application for both smartphones and pdas running windows mobile 2003 or 2005. what is the best practice to develop such application?
regards,
rnv
|
|
|
|
|
|
In the C# books I've read, drawing objects such as pens, brushes, etc are usually created in a using declaration in OnPaint(). I don't see anything wrong with this as it seems to be more resource friendly but I've heard others say these objects should be cached, such as storing them as instance fields. Are there any guidelines for going one way versus the other?
|
|
|
|
|
The only guidelines I can suggest are:
1) How many times a second are you going to repaint your form? If your writting an analog clock that repaints itself every 50 milliseconds, you'll want to create your pens and brushes once and cache them so you're not creating and destroying them a couple hundreds times per second. If you only repaint the form when Windows tell you to, then you could probably get away with creating and destorying your pens and stuff on demand.
2) If you're painting alot of static stuff. In the clock example, the clock face and hands don't change between any repaints. Just the positions of certain items change. In this case you could get away with caching your drawing objects. If you're painting dynamic data that frequently changes the colors of what your drawing between repaints, then you'll have to create and destroy your drawing objects on demand.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks Dave,
Those are some good examples of when caching might be useful.
|
|
|
|
|
Hello everyone,
I am working on a data acquisition project. Every 1/5 second I read data from a device. It's delivered in a two dimesional array. I want to put samples in a file every 2 seconds. Is there a way to add a twodimensional to another twodimensional array?
I did only find the CopyTo, but it only supports onedimensional arrays.
Software: Visual Studio 2003 C#
Thanks in advance,
Souza
|
|
|
|
|
Is it a 2D array or a jagged array ? If a jagged array, I think you add them one single dimensions array at a time.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello Christian,
You are right about the jagged array. But I get the smples in a 2d array. And there is nothing there can be changed about that. Thanks for your post anyway.
Souza
|
|
|
|
|
How to get acces to each element of the array, which is a member of the class, on which we are using reflection?
|
|
|
|
|
so in example:
Class Test
{
public int[,] a = new int[4,4];
void fun()
{
Type ClassType = typeof(Test);
FieldInfo[] Values = ClassType.GetFields();
foreach(FieldInfo val in Values)
{
???
}
}
}
|
|
|
|
|
|
I have to make a de/serialization similar to XML, but my own
Nevertheless, there is one more problem. During reflection I may have some different arrays of different types (not only int32, but also double, char, etc).
That`s why i cannot declare
int[,] reflecteda = aField.GetValue(this) as int[,];
The information about type of the array is hidden in aField.FieldType which gives eg. "System.Int32[,]". How to declare the needed array, which type is hiden there?
tnx in advance
|
|
|
|
|
Dear All,
I am trying to call a function from an Intel dll that's originally written in C/C++.
It's original prototype is :
HIGHGUI_API IplImage* cvvLoadImage( const char* filename );
I have marshalled it as :
[DllImport("highgui.dll")]
[return : MarshalAs(UnmanagedType.Struct)]
unsafe public static extern IplImage * cvvLoadImage(string filename);
when I try to run it ,I get the following error.Does anyone know how can I fix that?
Error: Cannot take the address or size of a variable of a managed type ('IplImage')
I have marshaled the originally struct IplImage into :
[StructLayout(LayoutKind.Sequential)]
unsafe public struct IplImage
{
....
};
Best Regards,
E.A.
|
|
|
|
|
i'm working in aproject doing something loke massenger of msn and i wanna form popup to the user when another message to the user
i do the code put the form show in normal way i wanna it
appear sequencly
|
|
|
|
|
Hello,
I have a dataset, and I want to sum up the values from certain column to a certain column (for example, rom comumn 3 to column 7).
So, is there a way of getting the index of the column?
Sort of row[0][column].Index, or something like that?
Thank you
|
|
|
|