Click here to Skip to main content
15,888,401 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to shift delete button from data grid Pin
Xmen Real 4-Mar-09 20:26
professional Xmen Real 4-Mar-09 20:26 
QuestionWebDAV for C# Pin
satsumatable4-Mar-09 18:23
satsumatable4-Mar-09 18:23 
AnswerRe: WebDAV for C# Pin
keesvdb10-Aug-09 22:20
keesvdb10-Aug-09 22:20 
Questiongetting response from the web service Pin
prasadbuddhika4-Mar-09 16:20
prasadbuddhika4-Mar-09 16:20 
AnswerRe: getting response from the web service Pin
Christian Graus4-Mar-09 19:33
protectorChristian Graus4-Mar-09 19:33 
GeneralRe: getting response from the web service Pin
Spunky Coder4-Mar-09 21:20
Spunky Coder4-Mar-09 21:20 
AnswerRe: getting response from the web service Pin
Guffa4-Mar-09 20:08
Guffa4-Mar-09 20:08 
QuestionC# for non C# programmer Pin
matty2desmara4-Mar-09 14:36
matty2desmara4-Mar-09 14:36 
Hi, I'm not fluent with C# (but i some how got forced into doing this). After form1 loads the user supplies information (Ip address, username ...etc), presses button 1, this connects them to a specialized video recorder. I then call the ExportImage() method to save the current frame to a bmp in a specified location.

What i would like to do is automatically go to ExportImage() every 5 seconds. The only way i can get it to call ExportImage() again is to press the button.

Any suggestions?

Thanks
Matt



static void Main() 
		{
			Application.Run(new Form1());
           

		}


	
        private void button1_Click(object sender, System.EventArgs e)
        {

            

            IDVRSystem system = SystemFactory.FindOrCreateSystem<idvrsystem>(cmbSystem.Text, 18772, txtUserID.Text, txtPassword.Text);
            system.Open();
            if (system.ConnectionStatus == Integral.Client.Sources.ConnectionState.LoggedIn)
            {

                mRecorder = system.Recorders.FindByIPAddress(txtRecorder.Text);
                if (mRecorder != null)
                {

                    // Sometimes a camera is not renderable because it is not 'detected.'
                    // we'll just keep rendering until we get a successful render.
                    foreach (IStream stream in mRecorder.Cameras)
                    {
                        mInfo = stream.Render(picVideo);


                           if (mInfo != null)

                             break;
                    }

                    //Console.WriteLine("button method");

                    //ExportImage();

                }

            }


        }
        
        
        private void ExportImage()
		{

            Console.WriteLine("Export Image Method");

            Bitmap bmp;
            double aspectRatio;

            
                System.Threading.Thread.Sleep(500);

                mInfo.VideoOverlay.GetCurrentImage(false, out bmp, out aspectRatio);
                Image img = bmp.GetThumbnailImage(800, 600, null, IntPtr.Zero);
                img.Save(@"C:\Test.bmp");
                img.Dispose();
                bmp.Dispose();
            
            
          }


</idvrsystem>

AnswerRe: C# for non C# programmer Pin
Marc Clifton4-Mar-09 14:43
mvaMarc Clifton4-Mar-09 14:43 
GeneralRe: C# for non C# programmer Pin
matty2desmara5-Mar-09 10:15
matty2desmara5-Mar-09 10:15 
GeneralRe: C# for non C# programmer Pin
Marc Clifton5-Mar-09 10:31
mvaMarc Clifton5-Mar-09 10:31 
QuestionHow to edit File Summary Info ??? Pin
S K Y4-Mar-09 14:32
S K Y4-Mar-09 14:32 
AnswerRe: How to edit File Summary Info ??? Pin
Yusuf4-Mar-09 14:52
Yusuf4-Mar-09 14:52 
GeneralRe: How to edit File Summary Info ??? Pin
S K Y4-Mar-09 15:39
S K Y4-Mar-09 15:39 
GeneralRe: How to edit File Summary Info ??? Pin
Yusuf4-Mar-09 17:20
Yusuf4-Mar-09 17:20 
GeneralRe: How to edit File Summary Info ??? Pin
S K Y4-Mar-09 17:57
S K Y4-Mar-09 17:57 
GeneralRe: How to edit File Summary Info ??? Pin
S K Y4-Mar-09 17:59
S K Y4-Mar-09 17:59 
AnswerRe: How to edit File Summary Info ??? Pin
Fired.Fish.Gmail4-Mar-09 15:51
Fired.Fish.Gmail4-Mar-09 15:51 
GeneralRe: How to edit File Summary Info ??? Pin
S K Y4-Mar-09 16:00
S K Y4-Mar-09 16:00 
GeneralRe: How to edit File Summary Info ??? Pin
Fired.Fish.Gmail4-Mar-09 16:45
Fired.Fish.Gmail4-Mar-09 16:45 
GeneralRe: How to edit File Summary Info ??? Pin
S K Y4-Mar-09 20:50
S K Y4-Mar-09 20:50 
QuestionComponent design context menu Pin
damichab4-Mar-09 12:47
damichab4-Mar-09 12:47 
AnswerRe: Component design context menu Pin
Curtis Schlak.4-Mar-09 15:13
Curtis Schlak.4-Mar-09 15:13 
GeneralRe: Component design context menu Pin
damichab4-Mar-09 15:28
damichab4-Mar-09 15:28 
QuestionConvert a pdf file to picture format with the best quality Pin
abbd4-Mar-09 12:08
abbd4-Mar-09 12:08 

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.