Visual Basic 6 Black Book:Windows Common Dialogs
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
var end = document.cookie.indexOf (";", j);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(j, end));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
var m1='';
var gifstr=GetCookie("UsrType");
if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; }
document.write(m1+m2+m3);
Keyword
Title
Author
ISBN
Publisher
Imprint
Brief
Full
Advanced Search
Search Tips
Please Select
-----------
Components
Content Mgt
Certification
Databases
Enterprise Mgt
Fun/Games
Groupware
Hardware
IBM Redbooks
Intranet Dev
Middleware
Multimedia
Networks
OS
Prod Apps
Programming
Security
UI
Web Services
Webmaster
Y2K
-----------
New Titles
-----------
Free Archive
To access the contents, click the chapter and section titles.
Visual Basic 6 Black Book
(Publisher: The Coriolis Group)
Author(s): Steven Holzner
ISBN: 1576102831
Publication Date: 08/01/98
function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}
function bookMarkit()
{
var url="http://www.itknowledge.com/PSUser/EWBookMarks.html?url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();
}
Search this book:
Previous
Table of Contents
Next
Showing Windows Help From A Visual Basic Program
You can display a Windows Help file (.hlp) with the Common Dialog controls ShowHelp method. To use this method, you first set the Common Dialog controls HelpCommand property to one of the following settings, and the HelpFile property to the actual name of the Help file to open.
Here are the possible settings for HelpCommand:
cdlHelpCommand&H102&; executes a Help macro.
cdlHelpContents&H3&; displays the Help contents topic as defined by the Contents option in the [OPTION] section of the HPJ file. This constant doesnt work for Help files created with Microsoft Help Workshop Version 4.0X. Instead, you use the value &HB to get the same effect.
cdlHelpContext&H1&; displays Help for a particular context. When using this setting, you must also specify a context using the HelpContext property.
cdlHelpContextPopup&H8&; displays in a pop-up window a particular Help topic identified by a context number defined in the [MAP] section of the HPJ file.
cdlHelpForceFile&H9&; ensures WinHelp displays the correct Help file. If the correct Help file is currently displayed, no action occurs. If the incorrect Help file is displayed, WinHelp opens the correct file.
cdlHelpHelpOnHelp&H4&; displays Help for using the Help application itself.
cdlHelpIndex&H3&; displays the index of the specified Help file. An application should use this value only for a Help file with a single index.
cdlHelpKey&H101&; displays Help for a particular keyword. When using this setting, you must also specify a keyword using the HelpKey property.
cdlHelpPartialKey&H105&; displays the topic found in the keyword list that matches the keyword passed in the dwData parameter if there is one exact match.
cdlHelpQuit&H2&; notifies the Help application that the specified Help file is no longer in use.
cdlHelpSetContents&H5&; determines which contents topic is displayed when a user presses the F1 key.
cdlHelpSetIndex&H5&; sets the context specified by the HelpContext property as the current index for the Help file specified by the HelpFile property. This index remains current until the user accesses a different Help file. Use this value only for Help files with more than one index.
Often, you want to open a Help file to its contents page, and so youd set the HelpCommand property to the cdlHelpContents constant. Be careful, however, that constant doesnt work with some Help files (those constructed with the Microsoft Help Workshop Version 4.0X), so check if ShowHelp works properly before releasing your program. The cdlHelpContents constant works with fewer Help files than you might thinkin fact, it wont open the main Windows Help file itself, windows.hlp, correctly. Instead, you must use a special value, &HB:
Private Sub Command1_Click()
CommonDialog1.HelpCommand = &HB
CommonDialog1.HelpFile = "c:\windows\help\windows.hlp"
CommonDialog1.ShowHelp
End Sub
The result of this code appears in Figure 11.13. Here, were opening the Windows main Help file to its contents page.
Figure 11.13 Opening Windows Help from a Visual Basic program.
Our ShowHelp example is a success. The code for this example is located in the helpdialog folder on this books accompanying CD-ROM.
Previous
Table of Contents
Next
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.
Wyszukiwarka
Podobne podstrony:
10 (370)370 Nabycie akcji własnych w celu umorzeniaDALI EVIDENCE 370366 370 rmciy6xw7hogk2i5dmpdjo75hhomvn5tnxcidhy370,23,artykul365 368368 czy pospolity grzyb moze byc przyczyna rakaDon Pendleton [The Executioner 368] Crisis Nation13 (368)366 370 7sudo6cexwxdszmthslnwwqejxrzhqmu72eeyxawięcej podobnych podstron