473,791 Members | 3,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP! Need to convert HTML Page To image

Hey all,

I know this has been done using C++ (I have one with source code), but I
don't know C++ that well. Does anyone know of a C++ to C# converter? -
OR - does anyone know to to retrieve a web page as an image (not get an
image from a web page)? I need to do this for an application I am working
on (non-comercial) and can't seem to find any code or hints on how to do
this.

Thanks for any help!

Chad
Nov 16 '05 #1
5 4091
Chad,

If you have C++ code, thats enough to use it in C#. Couple of ways to try
that

1. Use Dll import and try to get the access to function
2. Or register it as COM and add a reference to c# project
3. Or you can code as Unsafe c#

--
Shak
(Houston)
"Chad A. Beckner" <Ch*********@Pr ospectiveLink.c om> wrote in message
news:uu******** *****@TK2MSFTNG P10.phx.gbl...
Hey all,

I know this has been done using C++ (I have one with source code), but I
don't know C++ that well. Does anyone know of a C++ to C# converter? -
OR - does anyone know to to retrieve a web page as an image (not get an
image from a web page)? I need to do this for an application I am working
on (non-comercial) and can't seem to find any code or hints on how to do
this.

Thanks for any help!

Chad

Nov 16 '05 #2
The problem is that I can't use the C++ implementation of it, I *must* have
a C# or VB .NET version of it (sorry).

Chad

"Shakir Hussain" <sh**@fakedomai n.com> wrote in message
news:e1******** ******@TK2MSFTN GP11.phx.gbl...
Chad,

If you have C++ code, thats enough to use it in C#. Couple of ways to try
that

1. Use Dll import and try to get the access to function
2. Or register it as COM and add a reference to c# project
3. Or you can code as Unsafe c#

--
Shak
(Houston)
"Chad A. Beckner" <Ch*********@Pr ospectiveLink.c om> wrote in message
news:uu******** *****@TK2MSFTNG P10.phx.gbl...
Hey all,

I know this has been done using C++ (I have one with source code), but I don't know C++ that well. Does anyone know of a C++ to C# converter? -
OR - does anyone know to to retrieve a web page as an image (not get an
image from a web page)? I need to do this for an application I am working on (non-comercial) and can't seem to find any code or hints on how to do
this.

Thanks for any help!

Chad


Nov 16 '05 #3
P.S. The file is an exe file, I at least need it to be a .dll file.

Thanks!

"Chad A. Beckner" <Ch*********@Pr ospectiveLink.c om> wrote in message
news:Ot******** ******@TK2MSFTN GP11.phx.gbl...
The problem is that I can't use the C++ implementation of it, I *must* have a C# or VB .NET version of it (sorry).

Chad

"Shakir Hussain" <sh**@fakedomai n.com> wrote in message
news:e1******** ******@TK2MSFTN GP11.phx.gbl...
Chad,

If you have C++ code, thats enough to use it in C#. Couple of ways to try
that

1. Use Dll import and try to get the access to function
2. Or register it as COM and add a reference to c# project
3. Or you can code as Unsafe c#

--
Shak
(Houston)
"Chad A. Beckner" <Ch*********@Pr ospectiveLink.c om> wrote in message
news:uu******** *****@TK2MSFTNG P10.phx.gbl...
Hey all,

I know this has been done using C++ (I have one with source code), but
I don't know C++ that well. Does anyone know of a C++ to C#
onverter? - OR - does anyone know to to retrieve a web page as an image (not get an image from a web page)? I need to do this for an application I am

working on (non-comercial) and can't seem to find any code or hints on how to do this.

Thanks for any help!

Chad



Nov 16 '05 #4
Chad,

If you have source code available in C++, its better you convert exe to dll.

If you just have exe, and if it accepts command line arguments, you can
still launch it in hidden mode using Process class.

--
Shak
(Houston)


"Chad A. Beckner" <Ch*********@Pr ospectiveLink.c om> wrote in message
news:Ot******** ******@TK2MSFTN GP11.phx.gbl...
The problem is that I can't use the C++ implementation of it, I *must* have a C# or VB .NET version of it (sorry).

Chad

"Shakir Hussain" <sh**@fakedomai n.com> wrote in message
news:e1******** ******@TK2MSFTN GP11.phx.gbl...
Chad,

If you have C++ code, thats enough to use it in C#. Couple of ways to try
that

1. Use Dll import and try to get the access to function
2. Or register it as COM and add a reference to c# project
3. Or you can code as Unsafe c#

--
Shak
(Houston)
"Chad A. Beckner" <Ch*********@Pr ospectiveLink.c om> wrote in message
news:uu******** *****@TK2MSFTNG P10.phx.gbl...
Hey all,

I know this has been done using C++ (I have one with source code), but
I don't know C++ that well. Does anyone know of a C++ to C#
onverter? - OR - does anyone know to to retrieve a web page as an image (not get an image from a web page)? I need to do this for an application I am

working on (non-comercial) and can't seem to find any code or hints on how to do this.

Thanks for any help!

Chad



Nov 16 '05 #5
Hi Chad,

the only solution I have is to capture the Control of eg Internet Explorer
that display the web page and save it.. Here's a snibbit:

[DllImport("User 32.DLL")]

public static extern IntPtr GetActiveWindow ( );

[DllImport("gdi3 2.dll")]

private static extern bool BitBlt(IntPtr hdcDest,int nXDest,int nYDest,int
nWidth,int nHeight,IntPtr hdcSrc,int nXSrc,int nYSrc,System.In t32 dwRop);

[DllImport("User 32.dll")]

public extern static System.IntPtr GetDC(System.In tPtr hWnd);

[DllImport("User 32.dll")]

public extern static int ReleaseDC(Syste m.IntPtr hWnd, System.IntPtr hDC);
//modified to include hWnd

private void Capture()

{

IntPtr hWnd = GetActiveWindow ();

Form frm = (Form)Form.From Handle(hWnd);

if(frm != null)

{

Control c = frm.ActiveContr ol;

if(c != null)

{
System.IntPtr srcDC = GetDC(c.Handle) ;

Bitmap bm = new Bitmap(c.Width, c.Height);

Graphics g = Graphics.FromIm age(bm);

System.IntPtr bmDC = g.GetHdc();
BitBlt(bmDC,0,0 ,bm.Width,bm.He ight,srcDC,0,0, 0x00CC0020 /*SRCCOPY*/);

ReleaseDC(c.Han dle, srcDC);

g.ReleaseHdc(bm DC);

g.Dispose();

bm.Save([FILENAME]);

}

}

}

Regards,

Munir Husseini

iCOMcept GmbH

www.icomcept.com

"Chad A. Beckner" <Ch*********@Pr ospectiveLink.c om> schrieb im Newsbeitrag
news:uu******** *****@TK2MSFTNG P10.phx.gbl...
Hey all,

I know this has been done using C++ (I have one with source code), but I
don't know C++ that well. Does anyone know of a C++ to C# converter? -
OR - does anyone know to to retrieve a web page as an image (not get an
image from a web page)? I need to do this for an application I am working
on (non-comercial) and can't seem to find any code or hints on how to do
this.

Thanks for any help!

Chad

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
6561
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help Workshop program: hcw.exe that's included with Visual Basic. This exact same file compiled perfectly with no notes, warnings or errors prior to reformatting my system. Prior to the reformatting, I copied the help.rtf file onto a CD and checked the box to...
2
6487
by: Sudheer Kareem | last post by:
Dear All Please tell me how to assosiate help files with my Vb.net Project. Regards Sudheer
3
3367
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With numarray, help gives unhelpful responses:
2
2552
by: John Baker | last post by:
I find it highly annoying that MS Access tries to go online when I want to look at the help files. Is there a way to configure it so it just looks at my local helpfiles when I hit F1?
27
2827
by: Bruce Dodds | last post by:
I recently started using Access 2003 for the first time. I wanted to pass on some comments about the Help system to Access MVPs who frequent this board. I'm doing this in the hope that some of what I say may be passed on to Microsoft. Microsoft has implemented a combination local and web based help system in Access 2003. The local Help installed on your hard drive is fast, but the content is abbreviated. For really useful help you have...
3
2453
by: stuart_white_ | last post by:
I've just upgraded from Python 2.3.3 to Python 2.4.2, and, although the new version of Python seems to be running correctly, I can't seem access the help from the interpreter. On Python 2.3.3 --------------- Python 2.3.3 (#51, Dec 18 2003, 20:22:39) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time
4
1475
by: jerry.ranch | last post by:
Say, on a data entry form a "HELP" cmbBUTTON that bounces the user off to word file that has help, or is there some other way to do it (like a label object with help on another form) Thanks Jerry
8
3238
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both including search the internet for help, but the help is worthless. Any ideas?
0
2895
by: hitencontractor | last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003. I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About. The application calls MS Excel, so the scenario is that I am supposed to see the Excel Menu bar, FILE EDIT VIEW INSERT ... HELP. I am able to see the menu bar, but in case of Help, I see the Help of Excel and help of my application, both as a submenu of help. ...
6
2882
by: priyajohal | last post by:
#include<fstream.h> #include<process.h> #include<stdlib.h> #include<conio.h> #include<string.h> #include<dos.h> #include<ctype.h> #include<stdio.h> void setup() void help();
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.