Solved

HTML CODE?

Posted on 2003-11-07
13
241 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
Comment Utility
add an internet transfer control

sub showhtml(url as string)

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

end sub
0
 

Author Comment

by:msaa
Comment Utility
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
Comment Utility
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
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 20 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
"...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
Comment Utility
sure, :)


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

Expert Comment

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

Expert Comment

by:Arthur_Wood
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks Richie and everyone who helped.. will check that now ;)

Cheers
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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 …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 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

10 Experts available now in Live!

Get 1:1 Help Now