Solved

HTML CODE?

Posted on 2003-11-07
13
244 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
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.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

820 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