|
hello all
i'm new to the world of directX and directShow.
i need to draw shapes on video.
does anyone know how to do that? where should i begin?
thanks
eyal
|
|
|
|
|
I would think that you could get the device context for whatever window the video is playing in and draw on there as normal - however, don't quote me on this.
My Music | My Pics | My Articles
BlackDice
|
|
|
|
|
Last painter wins... and around the back stretch it's DirectX by a nose!
|
|
|
|
|
|
DirectShow does all the rendering of the video media correct? Even if you got the handle to the device context it is using and try to draw on it you just have a race condition (last painter wins) don't you?
|
|
|
|
|
so what is the best way to do it?
|
|
|
|
|
I suppose you could z-order windows so your new shapes are actually in a different window on top of the window that the video is renedered in. Just wild thoughts... I have no experience doing anything with DirectShow.
Another approach could be altering the media stream content to contain the new shapes.
|
|
|
|
|
Hi,
I'm struggling with the following problem:
I have a large unmanaged buffer, allocated with VirtualAlloc for performmance reasons. I use this buffer to load prepared bitmap image data into it.
For displaying, I tried to instantiate a bitmap object the following way:
<br />
<br />
<br />
Bitmap bmp = new Bitmap(Width, Height, Width * 4, System.Drawing.Imaging.PixelFormat.Format32bppPArgb, new IntPtr((void*)BufPtrStart.ToPointer());<br />
<br />
Usually, as I understood, creating a bitmap this way should not allocate any memory through the GC. But in my tests I found that memory is allocated anyway. Interestingly it isn't the size the bitmap has uncompressed in memory, but it is a significant amount.
Does anybody have similar Effects and knows the cause ?
Bye,
Florian
-- modified at 11:45 Wednesday 21st June, 2006
|
|
|
|
|
I'm writing an app that will talk to a USB device. I wonder how can I check that i have lost my USB connection just like in windows.
Donkaiser
|
|
|
|
|
Hi,
I tried to send mail from c# windows application but i am unable to send the mail.i am getting the following error.
An unhandled exception of type 'System.Web.HttpException' occurred in system.web.dll
Additional information: Could not access 'CDO.Message' object.
The code i wrote is
System.Web.Mail.MailMessage mailMsg = new MailMessage();
mailMsg.From ="chand.p@icinfotech.com";
mailMsg.To = "chand.p@icinfotech.com";
mailMsg.Priority = MailPriority.High;
mailMsg.Subject = subject;
mailMsg.Body = body;
mailMsg.BodyFormat = System.Web.Mail.MailFormat.Html;
MailAttachment sFile = new MailAttachment(attachment);
mailMsg.Attachments.Add(sFile);
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(mailMsg);
reply me if any one know the solution for this problem.
|
|
|
|
|
Unless your local machine is the mail server you will need to set SmtpServer to a valid address, maybe something like mail.mycompany.com or 234.10.44.20
|
|
|
|
|
hi thanks for replying me.
i have used my company mail server but i am receiving the same error.i tried this in vs2003 but in vs2005 it is working fine.
|
|
|
|
|
If you are using VS2005 you should use the System.Net.Mail namespace, System.Web.Mail has been deprecated.
|
|
|
|
|
Yes,i used System.Net.Mail namespace in vs2005.Do you have any alternate solution for my problem?if any,please kindly reply.
|
|
|
|
|
I don't realy see that you have a problem. It works with VS2005 but not with VS2003, so the obvious answer is to use what works. Is there a reason why it needs to work using .NET 1.1?
|
|
|
|
|
Hi,
I have my web services in c#
a VC client makes a call to this Web service -> Web Method
The signature of the Web method looks like
[Web Method]
public void retrieveData(string SampleString){}
Now Say the client sends "VC+" as the sample string to the above web method
In the web method, the samplestring is received as "VC " and not "VC+"
( The + char is getting replaced with space character )
how to solve this problem?
thanks in advance
chandru
|
|
|
|
|
Hi
I have an ArrayList of objects and I want to loop thru the ArrayList. For each object I want to give the user options of how to configure/change values in the object.
So basically what I would like to happen is that for each of the objects in the ArrayList the system must wait for the user to make changes and press a button to "Proceed". Once the button is clicked the loop must continue to the next object. I cannot use a MessageBox because I have quite a few RadioButtons that give the user options for configuring the objects.
Any suggestions of how to go about this? Perhaps using threading?
Thanks
Kobus
|
|
|
|
|
try maybe the following:
1) Add a Windows Form to your project where you add all the different options. The fast and dirty way says that you make all your textboxes, radiobuttons etc not private but internal or public. Lets call the formfor our purpose frmEditor
2) Now in the area where you want to loop over your array to the following:
for (int i = 0; i < myArrayList.Count; i++) {
mycustomobject co = (mycustomobject ) myArrayList[i] ;
frmEditor f = new frmEditor();
f.txtValue.Text = co.SomeValue;
f.chkCheckBox.Checked = co.SomeBoolean;
f.ShowModal();
co.SomeValue = f.txtValue.Text;
co.SomeBoolean = f.chkCheckBox.Checked;
}
I wrote this code without having VS in front of me, so just check the syntax.
-- modified at 8:54 Wednesday 21st June, 2006
|
|
|
|
|
gnjunge wrote: frmEditor f = new frmEditor();
For performance reasons I would place this line before beginning the for loop.
|
|
|
|
|
|
You could display your options dialog modally (ShowDialog) that way the loop will be blocked until the dialog is dismissed, then continue on. There are of course more elegant solutions, but this will get the job done.
|
|
|
|
|
Having a window pop open immediately after closing the previous one would probably be very annoying to most users. Think about it, how many apps have you used where it keeps opening the same window over and over again, just to display different values? Probably not many.
IMO, you should create the dialog and pass it the ArrayList. Have it traverse the list, displaying one object's values at a time. When the user has processed every item, then close the window. That approach would also make it easy to allow the user to navigate backwards in the list too (perhaps you'd have two navigation buttons, "Previous" and "Next"). That should give a much less jarring and obnoxious user experience.
Just a thought...
Josh
-- modified at 9:47 Wednesday 21st June, 2006
|
|
|
|
|
Hi,i can not change this statement in VB.NET to C#.Could everyone helpme?
Dim strCompanyName as String<br />
strCompanyName = CType(dgItem.FindControl("lblCompanyName"), Label).Text
with "dgItem" is DataGridItem and "lblCompanyName" is the id of a label (server control).I've tried this
Label lb=(Label)dgItem.FindControl("lblCompanyName");<br />
Response.Write(lb.Text);
but it did not work.Thanks for all replies.
|
|
|
|
|
The code you posted looks correct, do you get any specific error? What do you mean by "but it did not work."
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
I want to retrieve the text of that label but it does not print the text so i say it didnt work.The syntax is correct but the result is not.Thanks for your reply
|
|
|
|