TAILIEUCHUNG - Microsoft WSH and VBScript Programming for the Absolute Beginner Part 17

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 17. If you are new to programming with Microsoft WSH and VBScript and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the for the absolute beginner series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical WSH and VBScript programming applications and will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book,. | Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition Creating a Splash Screen As I said adding a splash screen to your script gives you an opportunity to display your Web site game instructions or other information you think will be useful to the user. The following statements show one way of building a splash screen. The StrWelcomeMsg variable is used to define the text that will be displayed in the splash screen. The message text to be displayed is formatted using VBScript string constants to make it more attractive. Specify the message to be displayed in the initial splash screen strWelcomeMsg Welcome to the story of . vbCrLf _ vbCrLf CCC space 14 A vbCrLf _ C space 17 AAA vbCrLf _ CCCaptain A Adventure gets his super powers _ vbCrLf Welcome the user to the story MsgBox strWelcomeMsg vbOkOnly vbExclamation cGameTitle Finally the VBScript MsgBox function is used to display the splash screen. In this case the vbOkOnly vbExclamation MsgBox constants instruct VBScript to display only the OK button and the exclamation mark graphic on the pop-up dialog. In addition the cGameTitle constant has been added to display the script s custom title bar message. Collecting User Input The next five lines of code shown next use the VBScript InputBox function to collect data provided by the user. This code contains the following five questions instructions What is your name Name a place you would like to visit. Name a strange object. Type the name of a close friend. Type the name of your favorite dessert. Collect story information from the user strName InputBoxC What is your name cGameTitle Joe Blow strVacation InputBoxC Name a place you would like to visit. _ cGameTitle Nevada Chapter 4 Constants Variables and Arrays strObject InputBoxCName a strange object. cGameTitle Soda Can strFriend InputBoxCType the name of a close friend. _ cGameTitle Barney strFood InputBoxCType the name of your favorite dessert. _ cGameTitle Pickle Notice that the user is only

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.