|
Hi
I am using serialport comunication in my application.
I have to receive 11 lakhs data(bytes) in 15 min.
During the processing time i have to clear the buffer size.
Is it possible to clearing the Buffersize or increase the buffer size
reply need
|
|
|
|
|
hello, I have an image with properties:
Size: 1520 x 2234 pixels
DPI = 200;
size in centimetres: 19.3 x 28.4 cm
When I open that image, it doesn`t fit to my 17' screen That image fits with size in centimetres. Is it possible to open that picture with size in centimetres, but not in pixels?
Arnas
|
|
|
|
|
What do you use to open it?
---
b { font-weight: normal; }
|
|
|
|
|
string kelias;
Bitmap image1;
kelias = OpenFile();
image1 = new Bitmap(@kelias, true);
// how to set the size in centimetres?
}
//-----------------------------------------------------------------
private string OpenFile()
{
OpenFileDialog dlgOpenFile = new OpenFileDialog();
dlgOpenFile.ShowReadOnly = true;
if (dlgOpenFile.ShowDialog() == DialogResult.OK)
{
string path = dlgOpenFile.FileName;
return path;
}
return null;
}
|
|
|
|
|
The size in centimeters is hardly relevant unless you display the image in some way. How do you do that?
---
b { font-weight: normal; }
|
|
|
|
|
I display image in usual way, so I do have a big problem unless there is, maybe some way to shrink that image or something... Or what should I do? Maybe there is something I can do while scaning image, setting some properties...? I just don`t know what to do, I need to open image in real size. Maybe you can suggest something? Thanks
|
|
|
|
|
Which way do you consider to be the usual way, then? There are many different ways of displaying an image.
Most ways of displaying images are pixel based, though. If you use a pixel based method, it doesn't use the resoltion settings in the image. Then you have calculate the size in pixels that you want the image to have, and resize it.
---
b { font-weight: normal; }
|
|
|
|
|
Hello
I have one VC++.Net project & want to use it in VC#.Net project. For that i add reference oc VC++ project & it is successfully added.
But the problem is that in VC++ project there is no namespace & no class. All functions are globle. All are display in object browser. But no reference found in C# editor.
plz help me.
Regards
Divyang Mithaiwala
|
|
|
|
|
If I am not mistaken, you are trying to use VC++ code in a C# Project! Right? Well, you simply can't do that? .NET has given us Language independence but not true Language Independence! I mean, you can't use VC++ code in a C# Environment. Got it? What you could so is, compile the functions from the VC++ project into a dll and then use it from the C# project.
Hope this helps...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Actually i am not trying to use code of VC++ in VC#. But i want to use function call of VC++ in VC#. Which is successfully done if project have namespace & class. But for my condition there is no namespace & no class in VC++ project.
Regards,
Divyang Mithaiwala
|
|
|
|
|
Is the code you have written in VC++ managed?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
VC++ project is Win32 console dll.
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Divyang Mithaiwala wrote: VC++ project is Win32 console dll.
That's your problem. If you want to use a dll using Namespaces then the dll must be managed. If it is unmanaged then you will have to import the function of the dll using DLLImport. Check out articles related to calling Win32 APIs using C# in CP.
Hope this helps...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Any other method to use it. Becoz when i use it as DLLImport then at run time it will give error that "Attempt to read or write protected memory".
thanx.
Divyang Mithaiwala
|
|
|
|
|
Now I am not sure what your problem is?
Refer to this[^] and this[^] for more details on DllImport.
Hope this Helps...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
I am trying to get a Label to display the date I selected from a Calendar control. This is the code I copied from http://www.asp.net and it works. However, I want additional functions to just this. I need to:
1. The calendar is minimized until the mouse hover over it or a small button is click to activate the calendar control. (Either way is fine, as long as the calendar control is not maxed display all the time, it takes up a lot of unnecessary space.)
2. To change the date display from MM/DD/YYYY to DD/MM/YYYY
I copied my codes from www.asp.net/quickstart but it's not showing properly here so I removed the prefix of asp: here. Kindly modify the codes below. Thank you.
void Date_Selected(object s, EventArgs e) {
Label1.Text = "Selected date is: " + Calendar1.SelectedDate.ToShortDateString();
}
Calendar Example
<:Calendar id=Calendar1 onselectionchanged="Date_Selected" runat="server" />
<:Label id=Label1 runat="server" />
-- modified at 0:15 Monday 27th March, 2006
|
|
|
|
|
I think you might be better off using AJAX. Look for the Anthem lib on SourceForge.
|
|
|
|
|
I cant find the Anthem lib you mentioned in Sourceforge. I'm writing in C#, not C++. Is there no other way around it in Visual Studio 2005 itself instead of a third-party solution?
|
|
|
|
|
tanpanjang wrote: I cant find the Anthem lib you mentioned in Sourceforge.
http://anthem-dot-net.sourceforge.net/[^]
tanpanjang wrote: I'm writing in C#, not C++.
Yes this is the C# forum, I dont know why you mention that...
tanpanjang wrote: Is there no other way around it in Visual Studio 2005 itself instead of a third-party solution?
You will have to emit some form Javascript to hide the emitted object. AJAX/Anthem will take of that for you.
|
|
|
|
|
|
i have a file demo.txt And that Contain
1 29 38 29 53
2 34 53 54 34
4 54 65 23 62
5 3 23 24 25
I want get small value of a row
Example:
i read row 1 and get small value is 1
How will i do
anhtin
|
|
|
|
|
Read the line into a string and split that string on the space character. Loop through the array that you get, converting each string into an integer and checking which one is the smallest.
---
b { font-weight: normal; }
|
|
|
|
|
assume the following method in a COM
virtual void * __stdcall Print(BSTR msg){
char * buf= new char[128];
sprintf(buf,"return by print interface");
return (void *)buf;
}
how should I handle the returned pointer by the method above in C#, so that I can get the proper string set by the method?
Vincent
|
|
|
|
|
If this is COM you can't pass back memory allocated by new. You need to allocate the char array with AllocCoTaskMem(). After that you should just be able to to a Marshal.PtrToStringAnsi() call on the value.
Jared Parsons
jaredp@beanseed.org
http://jaredparsons.blogspot.com/[^]
|
|
|
|
|
Also, is it legal for void* to be an [out] parameter to a COM interface? IIRC this is not legal since COM would be unable to marshal the underlying data.
Jared Parsons
jaredp@beanseed.org
http://jaredparsons.blogspot.com/[^]
|
|
|
|