摘要:在添加代码的时候,只能添在TextArea的最后面,无法在光标之前插入,获得TextArea中的位置,但是如果TextArea中有很多内容的时候,会显得很闪烁。其代码如下。 function getPos(obj) { obj.focus(); var workRange=document.selection.createRange(); obj.select(); va...
阅读全文
摘要:<SCRIPT LANGUAGE="JavaScript"> var s; s += "\r\n网页可见区域宽:"+ document.body.clientWidth; s += "\r\n网页可见区域高:"+ document.body.clientHeight; s += "\r\n网页可见区域宽:"+ document.body.offsetWidth? +" (包括边线的宽)...
阅读全文
摘要:利用上了windows api,当一个窗体激活的时候会给另外一个发消息,具体实现如下:using System; using System.Windows.Forms; using System.Runtime.InteropServices; namespace WindowsApplication43 { public partial class Form1 : Form { Form...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;namespace WaveLib{ public class AudioMixerHelper { public const int MMSYSERR_NOERROR = 0; public co...
阅读全文