|
Hello All!
I have an ActiveX control embeded into my application (made by Sony) that allows me to view a video stream from a IP/network camera. It all works perfectly and I can specify IP of camera, hit a button to start stream and in the ActiveX box that appeared when I installed and created instance of ActiveX control, I can see my streaming video. There is also a command with the control that allows me to save a single frame (JPEG image) to the hard drive.
The problem is that I want to write so code to work with the image and display an overlay on the image. Since it is an activeX control I am limited to what I can do to the streaming image (unlike if it were a picture box). Does anybody have any ideas?
I would like to either:
1. Capture the video stream from the control and populate it in a picturebox for editing and overlay.
2. Go ahead and tell the control to save the image every second and have the picturebox refresh the newest saved image in the monitored folder. (I only need 1fps for what I want to do so it doesn't have to be terribly fast).
3. Similar to number 2 but save images to memory instead of hard drive (to improve performance and since I really don't need to save them to hard disk).
The background is that I want to overlay text on the image to tell statistics about the image (such as width, height, amount of pixels, etc...) and I have all of that code working just fine if I load in a image that was captured using open file dialog but I want to show this overlay automatically and real time (at least once per second).
Is this possible?
Thanks,
Mike
|
|
|
|
|
Hi,
I have a Delphi VCL App with a COM Server that I need to consume in a c# exe. How do I add the Delphi exe/tlb to this c# app. At the moment when I try to add a reference to the Delphi exe or tlb, I receive a message that the file is not a valid assembly or COM component.
Regards
Andrew
|
|
|
|
|
Hey Guys
I have a remote control with its censor
(PIXEL-VIEW (TV-Tuner) card's remote and sensor)
the censor is connected with audio jack so i can easily connect the censor in any sound card pin
now i want to read this censors input in c#
i think i must connect this censor in my sound cards LINE-IN pin or in MIC pin
now i want to know how to reach the sound cards pin to detect input in c# 2.0
i tried to search but haven't ound any helpfull resource so plz help
Thanks in Advance
|
|
|
|
|
The tv tuner card probably uses an audio jack as a matter on convenience, not because the IR receiver outputs any form of audio.
Bear in mind that the IR receiver will need a power source, which is usually provided, through the audio style jack, by the TV tuner card. You may have trouble trying to get power through the sound card ports.
The TV tuner card will probably be using some of the (presumably stereo) audio style jack pins for powering the IR receiver, and some others (maybe just 1) for the data.
I have no blog...
|
|
|
|
|
Hi,
Can someone tell me how to convert a string of HTML to display on an aspx page?
Example:
string strHTTP="HTTP://www.yahoo.com";
TextArea1.Value = Server.HtmlEncode(strHTTP);
Why will the above not return as a link on a aspx page?
Thanks....
zxcvbnm
|
|
|
|
|
Why on earth would it ?
HTMLEncode converts strings to HTML valid strings. For example, if I type in a strong tag here : this is strong text , the input from the textbox to the CP site is not HTML encoded, so you see the result of the HTML tag. I need to type > in order to show a > in my text. Presumably the 'Ignore HTML tags in this message (good for code snippets)' checkbox calls Server.HTMLEncode, or something similar, to do this conversion for me automatically.
To render a link, use a linkbutton, or just an anchor tag.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
I am trying to convert Excel file to XML using C#. And the name of the Excel file is Contacts.xls and the SheetName is Contacts.
OleDbcmdSource.CommandText = "SELECT * FROM [" + Contacts + "$]";
The above code is where it gives me an error. I get an error that the name Contacts does not exist in the current context.
This is my Web.Config code: <connectionstrings>
<add name="ExcelConnectionString" connectionstring="Data Source=C:\Contacts.xls;Extended Properties=Excel 8.0;HDR=No;IMEX=1;Provider=Microsoft.Jet.OLEDB.4.0;">
|
|
|
|
|
Your code should read:
OleDbcmdSource.CommandText = "SELECT * FROM [Contacts$]";
'Contacts' is being used like a variable. If you have not declared a variable called 'Contacts' in your code, the compiler is going to throw an error.
Paul
|
|
|
|
|
Hi Paul,
Thank You so much for replying. Now the Contacts error does not show up but
I get an error on the following code:
OleDbadpSource.Fill(dsSource);//The error says OleDbException was unhandled by user code. Don't know what that means
My full code is as follows:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
BindData();
}
private void BindData()
{
DataSet dsLoginSourceGrid = GetLoginDataSet();
GridView1.DataSource = dsLoginSourceGrid.Tables[0];
GridView1.DataBind();
}
private string GetConnectionString()
{
string strConnectionString = ConfigurationManager.ConnectionStrings["ExcelConnectionString"].ToString();
return strConnectionString;
}
private DataSet GetLoginDataSet()
{
string ConnectionString = GetConnectionString();
OleDbConnection sqlconSource = new OleDbConnection(ConnectionString);
OleDbCommand OleDbcmdSource = new OleDbCommand();
OleDbcmdSource.Connection = sqlconSource;
OleDbcmdSource.CommandType = CommandType.Text;
OleDbcmdSource.CommandText = "SELECT * FROM [Contacts$]";
OleDbDataAdapter OleDbadpSource = new OleDbDataAdapter(OleDbcmdSource);
OleDbadpSource.SelectCommand = OleDbcmdSource;
DataSet dsSource = new DataSet();
OleDbadpSource.Fill(dsSource);
return dsSource;
}
}
|
|
|
|
|
An exception has been raised when you try to fill the DataSet.
What are the details of the error?
The error may be caused because you don't appear to be opening your connection. Add a line 'sqlconSource.Open();' after the line where you create an instance of your connection object. You may also want to consider wrapping your connection in a 'using' block so that it is closed and disposed automatically when it goes out of scope.
Paul
|
|
|
|
|
It tells me "Could not find installable ISAM" Further "OleDbException was unhandled by user code"
View Detail tells me System.Data.OleDb.OleDbException {"Could not find installable ISAM."}
|
|
|
|
|
What is the connection string you are using? I think the information in your original post got truncated...
Paul
|
|
|
|
|
<connectionstrings>
<add name="ExcelConnectionString" connectionstring="Data Source=C:\Contacts.xls;Extended Properties=Excel 8.0;HDR=No;IMEX=1;Provider=Microsoft.Jet.OLEDB.4.0;">
This is my Connection String from Web.Config file
|
|
|
|
|
This doesn't look right. Your connection string should look something like this:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
Have a look at the following link to get more help with creating connection strings to Excel files:
http://www.connectionstrings.com/?carrier=excel
Paul
|
|
|
|
|
<connectionstrings>
<add name="ExcelConnectionString" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Contacts.xls;Extended Properties=Excel 8.0;HDR=Yes;IMEX=2"
="">
I changed it as it shows above. But the error is still there.
|
|
|
|
|
There still must be something wrong with your connection string.
Have you definitely got the syntax right?
Paul
|
|
|
|
|
What is this thing called DSN. Do I need to enter the excel spreadsheet in a DSN to make this thing work?
|
|
|
|
|
I cannot find the syntax error though.
|
|
|
|
|
|
No, that link is related to Visual Studio 6.0 SP4.
If you are not sure whether you can create a connection to an Excel file, try creating a Univeral Data Link (UDL) file. You can do this by creating a new text file on your desktop and then changing its extension to .udl. If you then double-click the file, you will be able to configure the connection. When you have finished configuring the connection, you can get the connection string by opening the .udl file in a text editor.
Paul
|
|
|
|
|
The title may not be right, but I don't know how to call it. I want to know how to make a class adapt to a particular of control at run time. I am building a rich textbox control similar to the one below.
http://www.codeproject.com/cs/miscctrl/richtextboxextended.asp
Everything works fine, but I don't want the control to adapt to the richtextbox at the time I am building it. I want the users to choose specific textbox when they drag the component to the form. In that case, when they drag the control to the form, only the toolbar portion will show, not the text area. From the toolbar property, they can choose the richtextbox to associate the component with. I want this type of functionality, in that case the richtextobx can be located anywhere in the form. It does not have to be located right below the toolbar.
|
|
|
|
|
I added a public value something like that
set { RichTextBox = value; }
From the control, I set the richtextbox visibility to false. I built it; it seemed to work fine. Now, when I dragged the control to the form, then dropped a richtextbox to test it. I can see a combo in the property where I can select that richtextbox name. However when I selected it, the program exited abruptly which seemed to be an exception to me.
|
|
|
|
|
I think you can debug the designer by opening up a second instance of VS and attaching the debugger to the instance you want to debug through Debug > Attach to Process, this should let you know more about the exception.
|
|
|
|
|
Hi all,
Well, i've got quite a trivial problem. In my case, the Form.Designer.cs file which should appear as if linked to the Form.cs file (as in 1 in the image) along wih the resx file in the solution explorer, has sort of broken the link (shown in 2 in the image). This means, the only file associated with the Form.cs is the Form.resx file, and the Form.Designer.cs stays out of it.
Here's how my solution explorer appears.
http://aravindaonline.atspace.com/sample.jpg
Consequently, the formatting of the Form are not visible in the development mode although it is seen during run time...
I just need to know how to link this back...;)
I'm sure this is way too easy for you all...
Thanx in advance!!!
A
|
|
|
|
|
I had the same problem before
and just add the Form.Designer.cs file to the project and it worked normally again (it seems you have the file too, because it works in the runtime as you said)
hope it's going to work for you too.
good luck
|
|
|
|