Solved

HTML CODE?

Posted on 2003-11-07
13
243 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
  • 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 20 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now