Hi, I am working on a personal vb.net project that will allow me to capture a full-sized image of a given web page. I've been working on this for a few of days and have not found a method that is 100% reliable. Here's what i have tried so far... [U]METHOD #1 - Using WebBrowser Control and CopyFromScreen[/U] Problem: Fails to capture the entire content of the page if part of it is off screen, obscured, or requires scrolling. [CODE] Private Sub btnCopyScreen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopyScreen.Click Const ScrollbarWidth = 18 ' Initialize a new …

Member Avatar
Member Avatar
+1 forum 10

Quite a while ago, I made [URL="http://www.daniweb.com/code/snippet217147.html"][B]this[/B][/URL] snippet. This code is basically the same, except that it adds animation. This method of blitting is very fast assuming you don't use a surface that's too large. On a 500 x 500 surface, I managed 350fps using only 0-1% of the cpu. This snippet may appear much slower because of the amount of CPU it's applying to each pixel, but the blitting itself is very fast. Also, don't forget that an average game will only redraw parts of the window that need redrawing, this redraws the whole surface every time. So, as …

Member Avatar
Member Avatar
+1 forum 13

After trying to manipulate PNG files and failing miserably discovering that the standard GDI doesn't provide support for any PNG parameters decided to provide some basic image manipulation functions built into .Net that I came across on my investigations. 1. Adjust Image Quality 2. Flip Image Horizontally 3. Flip Image Vertically 4. Rotate Image (90 Degree Step) This Source Uses 4 buttons, A HScrollBar and A PictureBox.

Member Avatar
Member Avatar
+1 forum 1

Lately, I was reading [this snippet](http://www.daniweb.com/software-development/python/code/453788/moon-phase-at-a-given-date-python) by vegaseat. I thought, why not do it in C#? But I would also like to add lattitude and logitude in the celestial calculations and draw a picture of the moon at that moment and location. Now the calculations can get a bit involved but are doable. So first I did a little try out about the drawing of a moon phase picture. Code for the main drawing method is given here. Just call it from a Paint event. A litte project file for a test app is included in a zip file as …

Member Avatar
+1 forum 0

I got win32 application, that runs a infinite for loop, which increment a value inside the loop. the problem am having is that my application become unresponsive and uses alot of CPU when compiled. case IDM_ROTATION: for(int i = 0; i < 4; i++) { i = 0; rotation += rotationIncrement; InvalidateRect(hWnd, NULL, TRUE); UpdateWindow(hWnd); } break; How can i fix this?, I just want a loop or timer that increment my rotation variable every second.

Member Avatar
Member Avatar
+0 forum 4

In my project, I have created around 12 custom controls(checkbox,radiobutton,editbox,progressbar,scrollbar,button etc...). Custom painting is done in all controls for the extended look and feel using Pen,Brushes,Graphics, GraphicPath,Images,Region and Bitmaps ect. After the use of these objects, I have disposed the objects using the Dispose() method. I am using these controls in a System.Windows Form. When I am contiously showing and closing the Form causes an increase in the GDI objecs each time. I have checked the GDI object count using Task Manager and confirmed the GDI leak in the form. My question is, how can I manage this GDI leak? …

Member Avatar
Member Avatar
+0 forum 3

Hi all! I need to intercept GDI function to save painted screen to hard drive. I have tried Microsoft Detours. Everything is good, but I need 64-bit version (Detours Professional do support but it costs much). Is there any 64-bit alternatives to Detours Professional?

Member Avatar
Member Avatar
+1 forum 9

Hi, I am trying to draw some rectangles by pressing the mouse button and dragging. Each time a new rectangle is being drawn, the previous one disappears. The question is how can I avoid this? I am programming in C. Thanks!

Member Avatar
Member Avatar
+0 forum 3

I am developing a electrical application. I need to present the user with controls like resistor, capacitor etc. How can I create such controls in VB.NET? Can I use GDI or WPF for this? If possible then how?

Member Avatar
+0 forum 0

ok so im trying to use double buffer to make smooth animation but i can't get it to work here is the code for my drawing [CODE] VOID onPaint(HDC hdc,HWND hWnd) { HDC hDC=GetDC(hWnd); HDC memDC = CreateCompatibleDC(hDC); HBITMAP hMemBmp = CreateCompatibleBitmap(hDC,300,300); HBITMAP hOldBmp = (HBITMAP)SelectObject(memDC,hMemBmp); Graphics graphics(memDC); Pen pen(Color(255, 0, 0, 255)); graphics.DrawEllipse(&pen, sf , 0, 25, 25); // now that you've drawn on the offscreen map, go ahead // and put it on screen. BitBlt(hDC, 0, 0, 300, 300, memDC, 0, 0, SRCCOPY); // Always select the old bitmap back into the device context SelectObject(memDC, hOldBmp); DeleteObject(hMemBmp); DeleteDC(memDC); …

Member Avatar
+0 forum 0

Hi to all, In my project I need to display an arrow moving when the user press the START button & it need to stop when stop button is pressed. The moving area of arrow is fixed .ie, consider 100 pixels for the arrow movement. Once it reaches the end it has to start from the first. I've the image of arrow at 4 different location(To display simultaneously).Once 4th image is displayed i need start from 1st image. My teacher told to use both GDI+ and Timer(separate program) to do this. Can somebody give some snippets(both models GDI-Timer) to clear …

Member Avatar
Member Avatar
+0 forum 1

hi i am using delphi 2009. i am looking to have a grid on the form, and draw a 2D shape from lines on that grid and have it rotate around a central point. first of all i would like to ask what would be the best method to do this, would it be to use OpenGL or Standard GDI. is there any VCL Components for delphi 2009 i can use that automatically place a grid and allow me to draw on it at set coordinates. i can draw basic lines using the [Code] procedure TForm1.FormPaint(Sender: TObject); begin Canvas.MoveTo(20, 15); …

Member Avatar
Member Avatar
+0 forum 1

The End.