- This topic has 10 replies, 2 voices, and was last updated 17 years ago by Admin.
-
AuthorPosts
-
October 12, 2006 at 7:54 pm #188341AdminAdministrator
I know in html u can use href=”http://www.example.com” to open a webpage. But lets say u have an html or htm file in ur PC and want to open it in ur PC. Like lets say i make a page in html and i want a button to click and it will open the page thats stored on ur PC. How do i do this? Also, can i open a file like a exe file this way? Can i open all files in my PC using html script?
Also, how would i do this in VB?
October 12, 2006 at 8:30 pm #188351AdminAdministratorso…you wanna open said file from ur browser, right?
October 12, 2006 at 9:24 pm #188350AdminAdministratorright…..
OK here’s what im trying to do…
I’m going to make a prog that will make organizing my files easier.
I want to make a link in the html files that will open up a file on my PC.
and then I want those html files to be shown in the web browser in my prog.
So then i will open up my prog n click the link of the file i want to open and it will open the file (whatever the file may be).
How would i do this. I dont know the code for it.
October 12, 2006 at 9:39 pm #188349AdminAdministratoryou lost me at ‘right…’ lol i dont understand what you’re trying to create this script in…
October 12, 2006 at 10:17 pm #188348AdminAdministratori need to know how to open files stored on ur PC using html AND VB.
cus: in the html page will be the links to the files on my PC. So i can click the link and the file will open. And i need THAT html page to be show in my VB WebBrowser. But that page will not be hosted. It will be stored on my PC. So i need the VB code to open the file from my PC also.
Is this clear? i need both the VB and the html code to open a file thats in ur PC. 😀
October 12, 2006 at 10:32 pm #188347DepartureMemberyes you can, and there is even little progs that will generate the html page for you, you just select the directorys, and the programs will scan them for files and generate the html page
October 12, 2006 at 10:46 pm #188346AdminAdministratorwhat is the name of that program? what should i type wen i google search it?
Also, I this program will solve the html issue, I still need to know how to open a file from a VB WebBrowser as i stated….cus that html will not be hosted…it will be stored on my PC.
P.S. I signed up for ur forum.
October 13, 2006 at 3:20 am #188345AdminAdministratorthanks for the codes u IM’d me Ghost…..
in the html code
text
it will not load any files that are on the desktop. and it will not load other html pages that r in my pc. But it will load files stored in the Program Files directory.
Also in the VB code:
WebBrowser1.Navigate "file:///C:/urfile"
it will only load files that r stored in program files directory and will not load other html pages that r stored in my PC.
What is the reason for this? Although for wat im doing i can deal with only loading stuff from the Program Files Directory but i need it to load html pages too. It wont load html files. 😕 How do i do this? In VB and html.
Also:
How would i make it so wen i click a button or label it will load the file or html? 8) 😉
October 13, 2006 at 3:39 am #188344AdminAdministratorok, i think the reason that its only opening the program files is because you didnt change the directory…maybe 😛 😛
try this in the html file
Click
where ‘username’ is the username that ur on (i.e. ‘Administrator’)
try that…if it works, then do the same in vb…
now, as far as html goes, it should open the files locally, not in ur browser…it will only open folders in your browser…
in vb, the ‘WebBrowser’ control will only open web pages…such as .html .htm .php and so on…hence ‘webbrowser’ 😀 im not sure if it will open folders tho, but it should…
in vb, to make it load the folder when you click a command button or label, just move that ‘WebBrowser1.Navigate’ from form load to either ‘Command1_click’ or ‘Label1_click’ or something to that affect…didnt i already tell you that on aim? hehe
P.S. i corrected ur html code 🙄
October 13, 2006 at 11:12 pm #188343AdminAdministratorum….it opens text files n picture files IN the web browser…and exe files open like they always do. Um..i cant get it to open html files for some reason….I changed the html to the documents n settings/username thing n it works now…but why wont it open html files.. 😕
October 14, 2006 at 2:09 am #188342AdminAdministratorhmm…weirdness…for some reason, i cant put the internet control in the project…it says cannot find ieframe.dll but its there…i shall have to check on that…but when i do, ill get back to ya…cuz it should load html files…
-
AuthorPosts
- You must be logged in to reply to this topic.