473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

create looping domain with performclick and timer

I wanted to create a looping domain in VB that will automatically find the word "next" in a presentation, click it using possibly performclick or other action, and take a screen capture and save it to file. Below is the screen capture part of the code, I wanted to know how to expand it:

Expand|Select|Wrap|Line Numbers
  1.  RenderTargetBitmap rendertarget = new RenderTargetBitmap((int)element.RenderSize.Width,
  2.                         (int)element.RenderSize.Height, dpix, dpiy, PixelFormats.Default);
  3.             // Render the element on screen.
  4.             rendertarget.Render(element);
  5.  
  6.             BitmapEncoder bmpe;
  7.  
  8.             // Select the image format.
  9.             switch (format)
  10.             {
  11.                 case ImageFormats.PNG:
  12.                     {
  13.                         bmpe = new PngBitmapEncoder();
  14.                         break;
  15.                     }
  16.                 case ImageFormats.BMP:
  17.                     {
  18.                         bmpe = new BmpBitmapEncoder();
  19.                         break;
  20.                     }
  21.                 case ImageFormats.JPG:
  22.                     {
  23.                         bmpe = new JpegBitmapEncoder();
  24.                         break;
  25.                     }
  26.                 default:
  27.                     {
  28.                         bmpe = new PngBitmapEncoder();
  29.                         break;
  30.                     }
  31.             }
  32.  
  33.             bmpe.Frames.Add(BitmapFrame.Create(rendertarget));
  34.  
  35.             // Create a MemoryStream with the image.
  36.             // Returning this as a MemoryStream makes it easier to save the image to a file or simply display it anywhere.
  37.             Stream fl = new MemoryStream();
  38.             bmpe.Save(fl);
  39.  
  40.             fl.Close();
  41.  
  42.             return fl;
  43.         }
Mar 26 '13 #1
1 1359
Rabbit
12,516 Expert Mod 8TB
Is this VB6 or VB.Net?
Apr 4 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Dan | last post by:
I've created a pocketpc app which has a startup form containing a listview. The form creates an object which in turn creates a System.Threading.Timer. It keeps track of the Timer state using a...
5
by: perspolis | last post by:
Hi every body I want to know that it's possible to create a sub domain in my domain with c#? I own a site and want to create sub domain programmatically.. thx in advance
2
by: Dica | last post by:
i don't really want to set up web applications to run off http://localhost as we generally try to keep all of our company projects in one central spot on our primary domain controller which is...
10
by: Ryan | last post by:
I'm creating a website that monitors the status of servers using My.Computer.Network.Ping. I'm looking for a way to fire off my Ping() function every second or so. I see a Timer control...
1
by: Manso | last post by:
Hi, We want to create a generic request timer that will inject the time it took to render each page as a HttpModule. We want to be able to inject this just before the finishing </body> tag but I...
1
by: Sergey via DotNetMonster.com | last post by:
Is it possible to programmatically create a sub-domain in the MS DNS server? -- Message posted via http://www.dotnetmonster.com
1
by: Dhagash | last post by:
I have one domain.that is let say Dhagash. now i want to create subdomain in dhagash. It is dhagashsub. Now if i m writing www.dhagashsub.com. How will it redirect. or is there any script...
3
epots9
by: epots9 | last post by:
This is my first time working on a server, and yesterday we received our server so i tried to create a domain. I let it auto config the first time, then when i tired to setup a vista computer to...
16
by: Peter Oliphant | last post by:
Note that although this involves SAPI, it is more a question about Timers and event handlers. I wrote a Speech Recognize handler (SAPI), and put some code in it to enable a Timer. It would not...
1
by: Eran Hefer | last post by:
With SharePoint timer jobs you can create & execute processes on a daily / hourly / minutely basis. After deployment, the timer job definition executes your custom code. The easiest (and more...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.