Solved

HTML CODE?

Posted on 2003-11-07
13
242 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to open Waze.com/livemap from address saved in DB? 26 175
Input past end of file vbs script 9 81
DIR issue 7 50
Cannot enter table caption text in Word protected document 6 110
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

914 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