|
-
Feb 10th, 2000, 06:56 AM
#1
Thread Starter
Lively Member
Hi all! I’m building a test engine for new employees for my company using VB 6.0 in Visual Studio 6.0. The last thing I need to do is put about 20-30 pages of text info about the company into the program for the new employees to read over, then take a test on. What’s the best, most secure way to get this text into the VB app to be read by the new employees? Can I use HTML pages & have them viewed by a customizable browser I build into the VB app? If so, can the HTML pages be packaged with the program when it’s compiled? Or should I use a text file, which the app can access If so, how do I protect the text file from being read? ? Or is there a way to use Acrobat pdf files within the app? Thanks in advance for any answers/help I can get!
-
Feb 10th, 2000, 09:14 PM
#2
Hyperactive Member
You can do you pages in HTML no problem and have you VB app open it up in the standard Web Browswer (IE5 for exmaple)
I use something like this
Place this code in a command button for something
Call RunShellExecute("Open", "c:\help\default.htm", 0&, 0&, SW_SHOWNORMAL)
Then
Sub RunShellExecute(sTopic As String, sFile As Variant, sParams As Variant, sDirectory As Variant, nShowCmd As Long)
' runs a program to shell
Dim success As Long
Dim hWndDesk As Long
Const SE_ERR_NOASSOC = &H31
success = ShellExecute(hWndDesk, sTopic, sFile, sParams, sDirectory, nShowCmd)
End Sub
Place this in a module
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirecttory As String, ByVal nShowCmd As Long) As Long
------------------
Thanks in advance for any help provided.
-
Feb 10th, 2000, 09:16 PM
#3
-
Feb 10th, 2000, 09:43 PM
#4
Why not using a res file. you can use the resource addin app for it.
The Legend Will Return.
-
Feb 11th, 2000, 10:01 PM
#5
Thread Starter
Lively Member
[QUOTE]Originally posted by kayoca:
[B]Why not using a res file. you can use the resource addin app for it.
Already thought of that, but guess what? A string resource file is limited to 256 characters only!(according to Microsoft) SO that won't work, unfortunately. Parkes, how do you associate the HTML files with your VB project when you're compiling it? Thanks for the help, guys!
-
Feb 12th, 2000, 09:13 AM
#6
Member
here is one way:
when you run the setup wizard utility thingy, at the the end it asks you for "other files" to distribute with it. Just select your .HTML files there.
Then it compresses everything and makes a SETUP.EXE
in the code, give the path to the HTML file as:
Code:
if right$(app.path, 1) <> "\" then
htmlfile$=app.path & "\"
else
htmlfile$=app.path
end if
htmlfile$ = htmlfile$ & "file001.html"
assuming that the HTML files are stored in the same folder as the EXE file (which is found by app.path)
I believe you can also "Add..." a "related file" in VB similar to the way you add forms. I've seen it done, but never done it myself. This is really unnecessary though, as long as you install the HTML files with the rest of the program.
------------------
Rapmaster
-
Feb 13th, 2000, 03:49 AM
#7
Thread Starter
Lively Member
Oh MAN! I't CAN'T be that simple! <sg> So all I need to do is build the text into an HTML file then just add it to the project? That's great! Thanks Rapmaster! Altho I feel kinda silly, since I couldn't find that answer in ANY of the VB books I've got-OR at MSDN. I guess they don't tell you about the easy stuff! Thanks again Rapmaster.
-
Feb 13th, 2000, 06:51 AM
#8
Member
you don't even have to add it to the project. There is no need for the HTML file to be listed in the VBP file. Just make sure you distribute the HTMLs with the final EXE and install them in the same folder (or at least to a subfolder of it)
------------------
Rapmaster
-
Feb 13th, 2000, 11:40 AM
#9
So Unbanned
It'ld probably be better just to use RTF format textbox!!!
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|