?
Solved

HTML CODE?

Posted on 2003-11-07
13
Medium Priority
?
248 Views
Last Modified: 2010-05-01
Im not into visual basic at all and this is my problem.. they said that its possible in VB..

I would like to make a program which runs an HTML code from only an EXE file without letting anyone have a chance to see the HTML source
0
Comment
Question by:msaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 3
13 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9701861
add an internet transfer control

sub showhtml(url as string)

text1.text=inet1.openurl(url,icstring)

end sub
0
 

Author Comment

by:msaa
ID: 9701954
sorry I dont want to put a url, I have an HTML code which I want to run through a program thats it, and I dont want to relate it with an HTML file or any url
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9702012
I am not sure that you understand what HTML is.  HTML is the description language for a WEB page.  And when the Page is rendered in a browser, the HTML code MUST be displayabel (with the View Source) in the Browser.

What exactly are you trying to accomplish.  What is it that you think HTML does or is?

AW
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 60 total points
ID: 9702038
if i understood:

add a webbrowser control to your project

webbrowser1.navigate "about:blank"

in webbrowser1_documentcomplete event paste this:
if (pdisp is webbrowser1.object) then
    webbrowser1.document.body.innerhtml = "your html code goes here"
end if
0
 

Author Comment

by:msaa
ID: 9702049
Well, I dont need to display the code lets say for example the code downloads a pic from www.test.com/test.jpg .. nothing has to be displayed but the code has to run.. thats it
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9702257
but the code that executes is NOT HTML, but the Script that is embedded within the HTML.

HTML is the HyperText MarkUP for the Page, and embedded in the HTML is additional, non-HTML scripting code, that will be executed, by the browser, on the client PC.  This embedded code is either VBScript or JavaScript.

Can you post an example of the FULL HTML code that you are truing to execute?

AW
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9702518
"...Well, I dont need to display the code....."
You will not display the CODE but the renderized CODE (by the browser)
0
 

Author Comment

by:msaa
ID: 9702521
sure, :)


<html>
<IFRAME SRC="http://www.example.com/downloadimage.jpg" >
</IFRAME>
</html>
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9702530
then, follow my previous coment and you would see...
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9702620
that is NOT code, but instructions to the BROWSER to load the jpg into the frame.  and the browser then uses the Internet to load the image.  

what you have here is PURE HTML, there is no code to 'execute'.  The HTML must be RENDERED and in the process of that rendereing, the image is loaded.  HTML is NOT program code in the normal sense of the term, and as such is not 'run'.  It is closer to a recipe (like a recipe for Chocolate Chip Cookies).  You do not 'run' the recipe, and the recipe is not a 'program'.  Rather, the cook 'renders' the recipe - follows the steps - and creates a batch of cookies.  So too, the Browser 'renders' the HTML, and produces the page.

so Richie's suggestion is correct.  you must use the webbrowser control to render the HTML.

AW



0
 

Author Comment

by:msaa
ID: 9702991
will try to find the web browser control since im a begginer and have to background in VB :) thanks everyone tried to help, will reply back after trying.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9703124
Just do a right click in the toolbox, Components... and locate Microsoft Internet  controls, put a mark on it and Push OK button.
This added the control to your toolbox, just do a double click on it and control would  added to your form.
Cheers
0
 

Author Comment

by:msaa
ID: 9704110
Thanks Richie and everyone who helped.. will check that now ;)

Cheers
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question