using System.Windows.Forms;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Rendering;
public partial class ApplicationForm : Office2007RibbonForm
{
......
}
菜單加載
仿真制作 DevComponents.DotNetBar.RibbonBarMergeContainer
ribbonBar2 DevComponents.DotNetBar.RibbonBar
窗體Form直接加載菜單條
this.Controls.Add(this.仿真制作);
posted @
2009-02-19 09:46 天書 閱讀(2664) |
評論 (1) |
編輯 收藏
#include<stdio.h>
#include"atmi.h" /*TUXEDO HeaderFile*/
main(int argc, char *argv[])
{
char *buf;
long sendlen,rcvlen;
int ret;
if(tpinit(TPINIT*)NULL==-1){
......
}
sendlen = strlen(argv[1]);
if
( (buf =
(char*
)tpalloc("STRING",NULL,sendlen+1)
) == NULL
){
......
}
(void)strcpy(buf,argv[1]);
ret = tpcall("TOUPPER",(char*)buf,0,(char**)&buf,&rcvlen,(long)0);
if(ret == -1){
......
}
(void)fprint(stdout,"Retruned string is:%\n",buf);
tpfree(buf);
tpterm();
}
服務程序的入口參數(shù)TPSVCINFO
服務程序返回結(jié)果--- tpreturn()
posted @
2009-02-12 10:55 天書 閱讀(412) |
評論 (0) |
編輯 收藏
C# code
this.comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
posted @
2009-02-05 10:20 天書 閱讀(3347) |
評論 (0) |
編輯 收藏
DateTimePicker 控件的格式設置 CustomFormat屬性設置 : yyyy-MM-dd HH:mm:ss 月大寫M,分鐘小寫m,小時H代表24小時計算,h代表12小時計算yyyy-MM-dd HH:mm:ss
Format屬性設為Custom
ShowUpDown屬性設置為true
posted @
2008-12-08 15:11 天書 閱讀(20816) |
評論 (1) |
編輯 收藏
using System.Runtime.InteropServices;
{
[DllImport("user32")]
public static extern bool GetCaretPos(ref System.Drawing.Point lpPoint);
private void GetCurRowNo()
{
try
{
Point P = new Point(0);
GetCaretPos(ref P);
int Pos = txtCmdInput.GetCharIndexFromPosition(P);
m_iCurRowNo = txtCmdInput.GetLineFromCharIndex(Pos);
}
catch
{
m_iCurRowNo = -1;
}
}
}
posted @
2008-12-02 11:16 天書 閱讀(802) |
評論 (0) |
編輯 收藏
摘要: 在MonitorWnd.cs類中:事件處理函數(shù)://tabControl1是Form窗體中創(chuàng)建的控件,也就是UI線程中創(chuàng)建的控件
//要在事件處理函數(shù)中動態(tài)的創(chuàng)建TabPage,這個事件處理函數(shù)是被另一個read線程調(diào)用的 private void MonitorWnd_Load(object sender, EventArgs e) &...
閱讀全文
posted @
2008-11-19 09:25 天書 閱讀(2127) |
評論 (0) |
編輯 收藏
readThread = new Thread(new ThreadStart(Read));
readThread
.IsBackground = true;
readThread.Start()
posted @
2008-11-19 09:11 天書 閱讀(1083) |
評論 (0) |
編輯 收藏
如果要做在程序里面,用WEBBROWSER,如果要打開IE讓單獨運行,用Process.Start("")你機器上的IE程序即可
Process 命名空間 : using System.Diagnostics;
posted @
2008-11-14 09:56 天書 閱讀(2540) |
評論 (0) |
編輯 收藏
private void ReadMutualXML()
{
string strFilePath = Application.StartupPath + "\\" + "MutualConfig.xml";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(strFilePath);
XmlNode xn = xmlDoc.SelectSingleNode("Mutual");
foreach (XmlNode cxn in xn.ChildNodes)
{
if (cxn.Name.Equals("IP"))
{
m_proxyIP = cxn.InnerText;
}
else if (cxn.Name.Equals("Port"))
{
m_proxyPort = Convert.ToInt32(cxn.InnerText);
}
else if (cxn.Name.Equals("UserName"))
{
m_username = cxn.InnerText;
}
else if (cxn.Name.Equals("Password"))
{
m_password = cxn.InnerText;
}
}
}
posted @
2008-11-12 16:35 天書 閱讀(149) |
評論 (0) |
編輯 收藏
摘要: 調(diào)用過程://初始化 始終開著服務器端進程監(jiān)聽有沒有發(fā)消息過來的客戶 private void MutualWnd_Load(object sender, EventArgs e) { ...
閱讀全文
posted @
2008-11-08 10:53 天書 閱讀(827) |
評論 (0) |
編輯 收藏