|
Thank Chistian Graus
I did try with DirectShow but it do not looking for my device.
DsDevice[] capDevices;
// Get the collection of video devices
capDevices = DsDevice.GetDevicesOfCat( FilterCategory.VideoInputDevice );
Let for me any sample also it.
Thanks, Again.
sun_code
|
|
|
|
|
Is it possible to conduct unit tests for interfaces in ,net framework other than constructors, classes, methods? i would appreciate if anyone can provide a clue to me.
|
|
|
|
|
What do you mean by "unit tests for interfaces"?
Interfaces, by their very nature, will not have concrete implementations - so what are you going to test?
Cheers,
Vikram.
The cold will freeze our stares
We won't care...
|
|
|
|
|
great answer. I am not sure if the topic is user interface or interfaces. Wow it is easy to get it confusing.
|
|
|
|
|
I am assuming you are discussing the unit testing of the user interface of an application web or winform. There are open source and commercial products which address this however they are not as complete as one would hope. For the last two years I have been using the MVP pattern which allows me to provide a richer level of unit testing for the controls on the user interface.
Martin Fowler
Previous to this I used the MVC pattern which provides much of the same benifits. I have used the open source asp.net and win forms unit testing tools but they are difficult to get the level of results I was looking for.
|
|
|
|
|
I'm working with two dataSets, one I used the VSC#Express wizards and editors to make the tables, tableAdapter, and bindingSet, and the other i just used the wizard to make the dataset, and am making my own tables via code. The second uses no table adapter or binding set. The first will save it's data to disk when the program exits, while the second doesn't. With the second, I am calling AcceptChanges() on the dataSet each time I change a table or row, and while the program is running i can retrieve the data just fine. But I can't get it back next time i run the program. Any help would be appreciated.
A soft glow comes from the pit in the darkness.
The clicking noise become faster - and louder.
A wind begins to stir up from the pit, as the
creature flexes it's wings, preparing for flight.
You stare into the pit, and hear a voice say
in your mind, "If you survive the encounter,
declare it to the world."
The Code Demon Rises.
|
|
|
|
|
hi
i want to embedd exe file(s) into my app and run it from code without extract on disc, but how to do ?
note : i don't want use Assembely.Load() method because the exe file(s) maybe win32 or dotnet.
thanks
|
|
|
|
|
|
I have to determine the current scrollbar-position of a richtextbox but i don't know how.
Can anyone help me please?
|
|
|
|
|
Hi!
You'll have to send EM_GETSCROLLPOS to the RichTextBox via P/invoke.
Here's the description on MSDN.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hello everyone,
I have added Speech Recognition to an Windows Application and it works just fine when I run the Windows Application on Windows XP Operating System. The very same Windows Application faces a problem when it is run on Windows Vista since once I enable the Speech Recognition on my Windows Applications, it automatically turns ON the Speech Recognistion on the Windows Visa.
This means the commands are both used to run action in my application at the same time with Windows Vista grabbing the same command to run other stuff.
I was wondering is anyone has experinced anything like this or if there is any way to simply switch off the speech recognition fed into Windows Vista command center without disabling the speech recognition in my Windows Application?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
There is a Vista forum. Your question does not relate to C#. Please post it only in the forum where it belongs. This seems more lounge to me than anything, to be honest.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: This seems more lounge to me than anything, to be honest.
He'd be burnt to a crisp if he posted it in the Lounge.
Not saying it's right or anything, just making an observation.
Cheers,
Vikram.
The cold will freeze our stares
We won't care...
|
|
|
|
|
OK, rereading, I can see how it's sort of a programming question. The first time, not so much.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello Christian,
Thanx for the respond and as always I am grateful for all the help that I get from you guys. You are absolutely correct when you say this may be an issue related to Windows Vista. But the button line is that we are all trying to create Windows Applications using C# which can work regardless of the Operating System.
I simply thought to share my experience with the rest of you guys and see if you have experience similar problem. After all this could be something many people whom have taken advantage of Speech Recognition are going to face once Windows Vista is widely used.
As always, thank you very much for your time and have a great day.
Khoramdin
|
|
|
|
|
Hello,
I'm new to C# development and i'm stucked with one problem with the DataTable.Row.Find() method:
I have a DataSet called: 'MinhaTabela', and a DataTable called: 'Cpostais'.
This DataTable has 2 columns: 'Cpostal', and 'Localidade'.
I wrote the following code to find a record on the DataTable:
<br />
CPostais.PrimaryKey = new DataColumn[] { CPostais.Columns["cpostal"] };<br />
<br />
DataRow RegistoEncontrado = CPostais.Rows.Find("3000-001");<br />
<br />
if (RegistoEncontrado != null)<br />
{<br />
int ROW_NUMBER = RegistoEncontrado.ActualRow; <br />
<br />
Grid2.CurrentCell = Grid2.Rows[ROW_NUMBER].Cells["localidade"];<br />
Grid2.BeginEdit(false);<br />
<br />
}<br />
<br />
else<br />
<br />
{<br />
MessageBox.Show("Record not found...");<br />
}<br />
Does anyone knows how to get the row number after i find the respective record?
TIA,
Joaqui,
|
|
|
|
|
Can't you just get the cell from the row?
Grid2.CurrentCell = RegistoEncontrado.Cells["localidade"];
---
single minded; short sighted; long gone;
|
|
|
|
|
Sorry Guffa, i didn't saw your reply earlier.
No, the Row RegistoEncontrado doesn't have a Cells property, but thank you anyway.
Joaquim
-- modified at 10:18 Thursday 5th April, 2007
|
|
|
|
|
Hi all,
I use this code to fill the DataGridView but this code has error in the Underlined line
private void Form1_Load(object sender, EventArgs e)
{
DataSet1TableAdapters.ExpParamsTA ExpParamsTA= new Datam.DataSet1TableAdapters.ExpParamsTA();
ExpParamsTA.Fill(DataSet1.ExpParamsDataTable);
BindingSource Exp = new BindingSource(DataSet1, "ExpParams");
dataGridView1.DataSource = Exp;
}
Please help me
Thanks in advance
|
|
|
|
|
You only fill a dataset, it will populate the table. I will assume only one table is returned.
So something like:
ExpParamsTA.Fill(DataSet1);
DataGridView1.DataSource = DataSet1.Tables[0].DefaultView;
Hope that helps.
Ben
|
|
|
|
|
Maybe this can help.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Thanks in advance
![Rose | [Rose]](https://codeproject.global.ssl.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
I'm pretty new to multithreaded code. I understand a lot of the concepts (or think I do), but I'm extremely green in applying them.
That being said, I have a webservice that is starting three threads. These threads could finish anywhere from a few minutes to a day depending on how much data is being processed from an external DB. The situation I'm currently experiencing is that if one thread fails, I'd like to stop the other two threads in order to save resources.
Initially I was using Thread.Abort(), but I quickly realized that when catching the ThreadAbortException and aborting the other threads, that would spawn additional exceptions, which would require a new try/catch block, etc. I started googling and saw more...impolite things said about Thread.Abort() and how it's hard to determine when the exception will even be thrown.
So, I'm trying to find a way to stop my threads without using Thread.Abort. I've seen people mention using a flag or Mutex to signal the threads to stop, but naturally that means all my methods need to check for this flag in many places, and I don't see a clean way to do that. Most examples I see will do something like:
(while !stopThread)
{
// do some work
}
which is very convenient of them. How is this relevant when the work is a one-time thing, not something you'd loop through? Is there something I'm missing?
Thanks for any and all help. 
|
|
|
|
|
Shawn H wrote: How is this relevant when the work is a one-time thing, not something you'd loop through? Is there something I'm missing?
Hmm, so there's no loop in your threads? Each thread just has a sequence of steps that is performed? Could you choose some strategic places within those steps to check to see if all is well?
if(everythingOk)
{
DoSomething();
}
if(everythingOk)
{
DoSomethingElse();
}
Kind of cumbersome, but it's the only way I can think of offhand for terminating a loopless thread "naturally."
|
|
|
|
|
Hi All,
This is a very simple situation. In VB 6 a label can be specified as transparent background. How to do this in C# Windows Forms.
Thanks
|
|
|
|