|
can i increase the array a runtime,like in vb,redim keyword do, is it possible in c#,
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
|
sir in 2.0?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: sir in 2.0?
You just do yourself what the Resize method does; create a new array and copy the values to it.
---
single minded; short sighted; long gone;
|
|
|
|
|
ok thanks
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
It's actually in .NET 2 and beyond, so it's available now.
David Anton
http://www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
C++ to VB Converter: converts C++ to VB
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
You can't resize an array in .NET.
Create a new array and copy the items to it.
(That's what the ReDim command does in VB.NET.)
---
single minded; short sighted; long gone;
|
|
|
|
|
ok thanks
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
hi i want to read the pen drive autorun file and want to add my own file there at startup.
Secondly from where can i get information about what happens when any drive is double-clicked.
thanx in advance
|
|
|
|
|
Hey ya'll
Has anyone ran across this error in VS2005? WTF?
"The designer loader did not provide a root component but has not indicated why."
As a general rule doesn't display this message the designer just doesn't display anything so I have to reload it after every change?
Thanks,
Mike
Life is not measured by the number of breaths we take, but by the
moments that take our breath away. "George Carlin"
|
|
|
|
|
I get the following error when trying to reference my .exe project:
Error 3 The type or namespace name 'FormAAACS' could not be found (are you missing a using directive or an assembly reference?) C:\BBB.cs 45 9 CCCLib
There is already a reference to the Library but when I try to pass information from my Library to my .exe project the compiler doesn't recognize the "using BBB(namespace)" for the .exe project.
I appreciate any help, thanks in advance.
Michael
|
|
|
|
|
an EXE or DLL project can refer to another DLL project by:
- adding a reference in the Solution pane
- and adding a using statement, mentioning the required namespace
AFAIK an EXE or DLL project can not refer to another EXE project.
If that does not help, watch the file name and line number of the error message.
And make Visual display line numbers !!!
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
The problem is that I have a dll which is a member of the same solution as the exe project, but the dll does not recognize the exe, yet the exe recognizes the dll.
|
|
|
|
|
Ok, I got a piece of code and I can't seem to compile it... I don't quite know how to ask the question so here goes. I have the following code:
public interface X : _Collection
{
[DispId(0)]
Y this[object ]
{
get;
set;
}
}
Where Y is another interface.
I get an 'Identifier expected' message when I compile. Can anyone explain this code and a possible solution?
Thanks!
|
|
|
|
|
You have forgotten to give the argument in the indexer a name.
Y this[object index]
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello friends,
I’m trying to elaborate one program capable of create one image based on RGB data.
In this case, I receive RGB values one by one (i.e. serial) … for example,
for (int posX = 0; posX < 200; posX++)
{
______for (int posY = 0; posY < 200; posY++)
______{
____________color = Color.FromArgb(r, g, b);
____________bitmap.SetPixel(posX, posY, color);
______}
}
Where bitmap is 200x200 image and r, g and b contains the RGB values received in serial. But this is too slow ...
So I ask if there is anyone that have a better way to do this ... for instance, if there is any class that build three arrays (R, G and B) and define them as one image, instead of building the image pixel by pixel.
Thank you so much for your attention ... best regards,
Iuri Figueiredo :->
|
|
|
|
|
Hi,
are you receiving the pixel values over a serial line ?
if so 200 * 200 * 3 = 120KB assuming 8-bit per color component.
At say 9600 Bd (=1000 B/s) this will take 2 minutes to transfer.
If your data source is much faster than that, the lack of speed
would be caused by the SetPixel method itself; there is a faster
approach using unsafe code and pointers.
There are some fine articles on this, search for "image" and
author "Christian Graus".
But first tackle your image source sitation !
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Well, to be honest, the data will arrive from one CMOS camera with JPEG encoder:
http://www.sparkfun.com/commerce/product_info.php?products_id=7906
I don’t have this working for know (because I’m waiting for this component), but I was figuring out how I would receive the data. They say that:
“The Parallel Video Interface (PVI) generates the video output of the TC5747. The interface consists of a vertical frame-start signal and a 10-bit parallel data bus with clock and qualify signals. It supports parallel and serial modes of operation. The PVI produces a clock signal (the CLK_OUT pin), a 10-bit data bus, DOUT[9 ] and qualifying signals that are synchronous to that clock. On each determining edge of CLK_OUT, a single data byte is transferred on the data bus, if qualified by the VALIDH signal. The DOUT[9 ] bus carries either the Bayer grid data, the YUV 4:2:2 output data, the RGB data (RGB565, RGB666 or RGB444) or JPEG code according to the TCIF_OUTPUT_FORMAT host command.”
So it seems that RGB data come at 10-bit parallel … however, I still don’t understand the difference between RGB data and JPEG data.
|
|
|
|
|
Hi,
sounds quite different already. This is how I understand it:
you buy/get a camera (or is it just a CMOS chip, or possibly a chip+lens ?), it has
a "PVI" interface (which I never heard of). And it will provide an image in JPEG format.
The good thing is:
JPEG is a file format for storing compressed images. If you have a JPEG file
(typically the extension is .jpg or .jpe or .jpeg) then you can simply obtain the
image using: Bitmap bm=Image.FromFile(filepath); or Image.FromStream(stream);
Hence you are not involved in individual pixels, in RGB, and all the gory details.
The bad thing is: your PC does not speak PVI, does it ?
Googling "Parallel Video Interface" only gives about 600 hits; you may want to read some,
but my first impression is PVI is not an official standard, so you may not be able
to buy an interface board that plugs into your desktop PC, or a box that converts PVI
to something more familiar that is available on your desktop or notebook.
So you better ask whoever offers the camera to also offer the PC interface, including
both the hardware board or box AND the driver to work with it; it should offer an API,
which probably will be an unmanaged API, so you would then need a wrapper that
applies P/Invoke to it, before you can use it in .NET
I think you can safely forget Bitmap.SetPixel() for now, and should start solving
your interface problem first.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I think the product he's talking of is the CMOS camera hardware, designed to work in an embedded device with a microcontroller (i.e. mobile phone camera)
He should check out the SparkFun forums, they and quite good and someone may have already worked out his solution.
I have no blog...
|
|
|
|
|
Exactly
I will use a PIC (microcontroller) to send CMOS camera data trough Ethernet (TCP/IP Protocol) in order to see captured images. Since they guarantee that this camera send image with RGB values or JPEG data, I would like to know in advance if anyone know what’s the difference between them.
Anyway, what happens if I choose to build an image with RGB values? Is there any suggestion to speed the process? (Remember that this time I receive 10 RGB values at one time).
Best regards and thank you so much for your precious patient
Iuri Figueiredo :->
|
|
|
|
|
hi,
help me...
in my Asp project, there is 80 RadioButton in the
Default.aspx page.
I want to set the All text of RadioButton from My DataBase.
I select a Data table from My DataBase with 80 rows.
But I don`t Want to set Text with this format :
RadioButton1.Text = dt.Rows[0][0];
RadioButton2.Text = dt.Rows[0][1];
.
.
.
RadioButton80 .Text = dt.Rows[0][80];
I want to Use this codes :
RadioButton rb;
for(int i=1 ; i < 81 ; i++)
{
rb = (RadioButton)this.FindControl("RadioButton" + i );
rb.Text= dt.Rows[0][i].ToString();
}
But there is error with Details : Object reference not set to an instance of an object.
why???
please help me to find correct way.
|
|
|
|
|
There is no reason to start a new thread; did you read my earlier reply and try it ?
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi,
help me...
in my Asp project, there is 80 RadioButton in the
Default.aspx page.
I want to set the All text of RadioButton from My DataBase.
I select a Data table from My DataBase with 80 rows.
But I don`t Want to set Text with this format :
RadioButton1.Text = dt.Rows[0][0];
RadioButton2.Text = dt.Rows[0][1];
.
.
.
RadioButton80 .Text = dt.Rows[0][0];
I want to Use this codes :
RadioButton rb;
for(int i=1 ; i < 81 ; i++)
{
rb = (RadioButton)this.FindControl("RadioButton" + i );
rb.Text= dt.Rows[0][i].ToString();
}
But there is error with Details : Object reference not set to an instance of an object.
why???
please help me to find correct way.
|
|
|
|
|
pariisa wrote: rb.Text= dt.Rows[0][i].ToString();
i-1
please read and apply my sig !
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|