Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
AnswerRe: Check if user can write and delete from a directory Pin
Not Active25-Jul-10 15:37
mentorNot Active25-Jul-10 15:37 
GeneralRe: Check if user can write and delete from a directory Pin
RCoate25-Jul-10 20:07
RCoate25-Jul-10 20:07 
GeneralRe: Check if user can write and delete from a directory Pin
RCoate25-Jul-10 20:25
RCoate25-Jul-10 20:25 
GeneralRe: Check if user can write and delete from a directory Pin
Not Active26-Jul-10 1:22
mentorNot Active26-Jul-10 1:22 
AnswerRe: Check if user can write and delete from a directory Pin
PIEBALDconsult25-Jul-10 18:58
mvePIEBALDconsult25-Jul-10 18:58 
GeneralRe: Check if user can write and delete from a directory Pin
RCoate25-Jul-10 20:06
RCoate25-Jul-10 20:06 
GeneralRe: Check if user can write and delete from a directory Pin
PIEBALDconsult26-Jul-10 3:02
mvePIEBALDconsult26-Jul-10 3:02 
QuestionCapture streaming video - (create bitmap) Pin
Mark H Bishop25-Jul-10 11:41
Mark H Bishop25-Jul-10 11:41 
Our watershed group has an IP camera that serves a video stream via a java applet. When we navigate to the camera's web page we see the video streem. The front end of thecode behind the camera's serving page is Is included below.

I am writing a C# Windows Application that has a webbrowser control that navigates to the page. I want to capture still images with a timer tick event. Right now, I have an hack that does a copy from screen on the webbrowser control:


Bitmap BMP_now = new Bitmap(webBrowser1.ClientSize.Width, webBrowser1.ClientSize.Height);
Graphics g = Graphics.FromImage(BMP_now);
g.CopyFromScreen(this.PointToScreen(webBrowser1.Location), new Point(0, 0), webBrowser1.ClientSize);
g.Dispose();


This cumbersome approach has the major drawback that the windows form must always be topmost. There's gotta be a better way.


Here's the source behing the IP Camera's page:
lt;html>
<head>
<TITLE>TRENDnet | CS-7835E0(TV-IP100)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<link rel="stylesheet" href="style.css" type="text/css">
<script language="JavaScript"> 
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
 
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
 
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type=text/css> 
A:link {FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: ff6600; FONT-FAMILY: arial,geneva,sans-serif}
A:visited {FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: ff6600; FONT-FAMILY: arial,geneva,sans-serif}
.org-news {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: ff6600; FONT-FAMILY: arial,geneva,sans-serif}
</style>
</head>
 
<script language="JavaScript"> 
function Init() {
    if ((navigator.appName != "Netscape") &&
        (navigator.userAgent.indexOf('Opera') == "-1"))
    {
       window.setInterval("ShowFrameRate()", 1000);
    }
}
 
function ShowFrameRate() {
    if (1)
    {
       var fFrameRate = cvcs.GetFrameRate();
       window.status = "Frame:" + fFrameRate.toString() + " fps";
    }
    cvcs.GetRealTimeData() ;
    CurrentTime.innerHTML = cvcs.GetTimeString();
    GetTrigger();
}
 
function GetTrigger() {
    if (cvcs.GetImageUpload() == 1) {
       ImageUpload.innerHTML = "[ON]";
    }
    else {
       ImageUpload.innerHTML = "[OFF]";
    }
    if (cvcs.GetImageEmail() == 1) {
       EmailImage.innerHTML = "[ON]";
    }
    else {
       EmailImage.innerHTML = "[OFF]";
    }
}
</script>

AnswerRe: Capture streaming video - (create bitmap) Pin
Mark H Bishop26-Jul-10 12:31
Mark H Bishop26-Jul-10 12:31 
Questionconvert an array of string Pin
mrkeivan25-Jul-10 10:59
mrkeivan25-Jul-10 10:59 
AnswerRe: convert an array of string Pin
harold aptroot25-Jul-10 11:05
harold aptroot25-Jul-10 11:05 
AnswerRe: convert an array of string Pin
Luc Pattyn25-Jul-10 11:20
sitebuilderLuc Pattyn25-Jul-10 11:20 
AnswerRe: convert an array of string Pin
PIEBALDconsult25-Jul-10 12:10
mvePIEBALDconsult25-Jul-10 12:10 
GeneralRe: convert an array of string Pin
Luc Pattyn25-Jul-10 12:55
sitebuilderLuc Pattyn25-Jul-10 12:55 
GeneralRe: convert an array of string Pin
PIEBALDconsult25-Jul-10 13:02
mvePIEBALDconsult25-Jul-10 13:02 
QuestionSecure storage Pin
L Viljoen25-Jul-10 9:02
professionalL Viljoen25-Jul-10 9:02 
AnswerRe: Secure storage Pin
Eddy Vluggen25-Jul-10 9:28
professionalEddy Vluggen25-Jul-10 9:28 
GeneralRe: Secure storage Pin
harold aptroot25-Jul-10 9:45
harold aptroot25-Jul-10 9:45 
GeneralRe: Secure storage Pin
Eddy Vluggen25-Jul-10 10:05
professionalEddy Vluggen25-Jul-10 10:05 
GeneralRe: Secure storage Pin
harold aptroot25-Jul-10 10:08
harold aptroot25-Jul-10 10:08 
GeneralRe: Secure storage Pin
Eddy Vluggen25-Jul-10 10:41
professionalEddy Vluggen25-Jul-10 10:41 
GeneralRe: Secure storage Pin
harold aptroot25-Jul-10 10:43
harold aptroot25-Jul-10 10:43 
GeneralRe: Secure storage Pin
Eddy Vluggen25-Jul-10 11:00
professionalEddy Vluggen25-Jul-10 11:00 
GeneralRe: Secure storage Pin
L Viljoen25-Jul-10 20:52
professionalL Viljoen25-Jul-10 20:52 
GeneralRe: Secure storage Pin
L Viljoen25-Jul-10 20:51
professionalL Viljoen25-Jul-10 20:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.