最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

用vbscript實(shí)現(xiàn)啟用 Caps Lock (大寫(xiě))鍵

 更新時(shí)間:2007年04月07日 00:00:00   作者:  
問(wèn):
嗨,Scripting Guy!I have a script where users enter some information in an Input box.The information needs to be entered in all-capital letters, so my instructions say, “Please make sure the Caps Lock key is on before entering the information.”They don't always do that, however.Is there a way to turn the Caps Lock key on and off using a script?
-- BW, Medford, OR
答:
Hey, BW.We don't know of a way to turn the Caps Lock key on and off, but we do know a way to mimic the effect of having the Caps Lock key on.After all, the whole point of the Caps Lock key is to turn everything you type into uppercase letters.For example, you might type this:
this is my sentence.
But Caps Lock will make it appear on screen like this:
THIS IS MY SENTENCE.
So how can we achieve the same affect in a script?簡(jiǎn)單:we just use the VBScript function UCase, which switches all the letters in a string to their uppercase equivalent.For example, here's a simple two-line script that gathers information from a user and then uses the UCase function to switch all the letters to uppercase when echoing the value to the screen:
strMessage = InputBox("Please enter your message:")Wscript.Echo UCase(strMessage)
Incidentally, the above script doesn't actually change the case of the letters in the string strMessage; it just displays them in uppercase.If you really want all the letters converted to uppercase, try this script instead:
strMessage = UCase(InputBox("Please enter your message:"))Wscript.Echo strMessage
Looks crazy, but it works.
For more information about the UCase function, see theVBScript 文檔 on MSDN.

相關(guān)文章

最新評(píng)論

阳西县| 兴义市| 万山特区| 威宁| 万荣县| 凉山| 彭阳县| 芒康县| 莱阳市| 沈阳市| 新密市| 深州市| 开阳县| 临漳县| 通化市| 荆州市| 沾益县| 军事| 宿迁市| 武乡县| 广昌县| 和田市| 大新县| 潞西市| 辛集市| 克东县| 随州市| 南江县| 枞阳县| 牡丹江市| 固安县| 昆明市| 徐州市| 泸西县| 牟定县| 阿巴嘎旗| 谢通门县| 南开区| 信丰县| 班戈县| 房产|