110,967
社区成员
发帖
与我相关
我的任务
分享
public class SelectionChangedEventArgs : EventArgs
{
Range m_range;
public SelectionChangedEventArgs(Range axSht)
{
m_range = axSht;
}
public Range Range
{
get { return m_range; }
}
}
public delegate void SelectionChangedHandler(Object sender, SelectionChangedEventArgs e);
//SelectionChanged事件
public event SelectionChangedHandler SelectionChanged;
protected virtual void OnSelectionChanged(Object sender, SelectionChangedEventArgs e)
{
if (SelectionChanged != null)
{
SelectionChanged( sender,e );
}
}
private void axSpreadsheet1_SelectionChange(object sender, EventArgs e)
{
AxSpreadsheet p = (AxSpreadsheet)sender;
Range r = p.Selection;
SelectionChangedEventArgs s = new SelectionChangedEventArgs(r);
if (p != null)
{
OnSelectionChanged(p, s);
}
}
<body bgcolor='#223344'>
<object id="ss"
classid="clsid:9551B223-6188-4387-B293-C7D9D8173E3A" OnSelectionChanged="SelectChange(这里怎么写?)">
</object>
</body>
</HTML>
<SCRIPT LANGUAGE="JavaScript">
<!--
function SelectChange(???)
{
alert("aaaa");
}
//-->
</SCRIPT>
<object id="helloworld"
classid="clsid:9551B223-6188-4387-B293-C7D9D8173E3E" codebase="Self.cab#version=1,3,0"
>
</object>
<input type="button" onclick="alert(helloworld.GetDefaultPrintStatus())" value="GetDefaultPrinterStatus">