posts - 124,  comments - 29,  trackbacks - 0

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 天书 阅读(2624) | 评论 (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();
}

服务程序的入口参数TPSVCINFO
服务程序返回结果--- tpreturn()
posted @ 2009-02-12 10:55 天书 阅读(400) | 评论 (0)编辑 收藏
C# code
            this.comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
posted @ 2009-02-05 10:20 天书 阅读(3278) | 评论 (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 天书 阅读(20703) | 评论 (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 天书 阅读(789) | 评论 (0)编辑 收藏
     摘要: 在MonitorWnd.cs类中:事件处理函数://tabControl1是Form窗体中创建的控件,也就是UI线程中创建的控件 //要在事件处理函数中动态的创建TabPage,这个事件处理函数是被另一个read线程调用的  private void MonitorWnd_Load(object sender, EventArgs e)    &...  阅读全文
posted @ 2008-11-19 09:25 天书 阅读(2002) | 评论 (0)编辑 收藏

                readThread = new Thread(new ThreadStart(Read));
                readThread.IsBackground = true;
                readThread.Start()
posted @ 2008-11-19 09:11 天书 阅读(1067) | 评论 (0)编辑 收藏
如果要做在程序里面,用WEBBROWSER,如果要打开IE让单独运行,用Process.Start("")你机器上的IE程序即可

Process 命名空间 :  using System.Diagnostics;
posted @ 2008-11-14 09:56 天书 阅读(2504) | 评论 (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 天书 阅读(137) | 评论 (0)编辑 收藏
     摘要: 调用过程://初始化  始终开着服务器端进程监听有没有发消息过来的客户       private void MutualWnd_Load(object sender, EventArgs e)        {    ...  阅读全文
posted @ 2008-11-08 10:53 天书 阅读(811) | 评论 (0)编辑 收藏
仅列出标题
共13页: 1 2 3 4 5 6 7 8 9 Last 

<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

常用链接

留言簿(5)

随笔档案

文章分类

文章档案

好友的Bolg

搜索

  •  

最新评论

阅读排行榜

评论排行榜