当前位置: 首页 > news >正文

c网站开发案例详解代码海外市场推广做什么的

c网站开发案例详解代码,海外市场推广做什么的,南京金九建设集团网站,常州做网站基本流程c# 更改弹窗MessageBox按钮文字_c# messagebox.show 字体-CSDN博客 需要用到大佬上传到百度云盘的Hook类,在大佬给的例子的基础上改动了点。 应用时自己加GUID和ProgID。 组件实现: using System; using System.Collections.Generic; using System.L…

c# 更改弹窗MessageBox按钮文字_c# messagebox.show 字体-CSDN博客

需要用到大佬上传到百度云盘的Hook类,在大佬给的例子的基础上改动了点。

应用时自己加GUID和ProgID。

组件实现:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace HookMessageBox
{[ComVisible(true)][Guid("")]interface IHookMessageBox{[DispId(1)]void ReadBtnLanguage();[DispId(1)]DialogResult MessageBoxOKBtnShow(string text,string caption, MessageBoxIcon icon);[DispId(1)]DialogResult MessageBoxYesOrNoBtnShow(string text,string caption, MessageBoxIcon icon);[DispId(1)]DialogResult MessageBoxYesOrNoOrCancelBtnShow(string text,string caption, MessageBoxIcon icon);}[ComVisible(true)][Guid("")][ProgId("")]public class ClsHookMessageBox: IHookMessageBox{private string OKText { get; set; }private string YesText { get; set; }private string NoText { get; set; }private string CancelText { get; set; }public void ReadBtnLanguage(){OKText = "OK";YesText = "Yes";NoText = "No";CancelText = "Cancel";}public DialogResult MessageBoxOKBtnShow(string text,string caption,MessageBoxIcon icon=MessageBoxIcon.None){return HookMessageBoxShow(text:text, caption:caption,okText: OKText, icon:icon);}public DialogResult MessageBoxYesOrNoBtnShow(string text, string caption, MessageBoxIcon icon = MessageBoxIcon.None){return HookMessageBoxShow(text: text, caption: caption, yesText: YesText, noText: NoText, buttons:MessageBoxButtons.YesNo,icon: icon);}public DialogResult MessageBoxYesOrNoOrCancelBtnShow(string text, string caption, MessageBoxIcon icon = MessageBoxIcon.None){return HookMessageBoxShow(text: text, caption: caption, yesText: YesText, noText: NoText, cancelText: CancelText, buttons: MessageBoxButtons.YesNoCancel, icon: icon);}private DialogResult HookMessageBoxShow(string text, string caption, MessageBoxButtons buttons= MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None,string okText="",string yesText = "", string noText = "", string cancelText = ""){var hook = new HookINCS.Hook();hook.OnMessageBoxShow += (s, mbe) =>{IntPtr hChildWnd = mbe.hChildWnd;int result;if (!string.IsNullOrEmpty(yesText) && HookINCS.Win32Api_Hook.GetDlgItem(hChildWnd, 6) != 0)//IDYES = 6{result = HookINCS.Win32Api_Hook.SetDlgItemTextA(hChildWnd, 6, $"{yesText}");}if (!string.IsNullOrEmpty(noText) && HookINCS.Win32Api_Hook.GetDlgItem(hChildWnd, 7) != 0)//IDNO = 7{result = HookINCS.Win32Api_Hook.SetDlgItemTextA(hChildWnd, 7, $"{noText}");}if (!string.IsNullOrEmpty(cancelText) && HookINCS.Win32Api_Hook.GetDlgItem(hChildWnd, 2) != 0)//IDCANCEL = 2{result = HookINCS.Win32Api_Hook.SetDlgItemTextA(hChildWnd, 2, $"{cancelText}");}if (!string.IsNullOrEmpty(okText) && HookINCS.Win32Api_Hook.GetDlgItem(hChildWnd, 1) != 0)//IDOK =  1{result = HookINCS.Win32Api_Hook.SetDlgItemTextA(hChildWnd, 1, $"{okText}");}};hook.InstallMessageBoxHook();DialogResult dialogResult = MessageBox.Show(text, caption, buttons, icon);hook.UninstallMessageBoxHook();//卸载钩子return dialogResult;}}
}

调用:

object obj = Activator.CreateInstance(Type.GetTypeFromProgID("HookMessageBox.ClsHookMessageBox"));
obj.GetType().GetMethod("ReadBtnLanguage").Invoke(obj, new object[] { });
DialogResult btn1=(DialogResult)obj.GetType().GetMethod("MessageBoxOKBtnShow").Invoke(obj, new object[] { "messageboxText", "messageCaption", MessageBoxIcon.None });
DialogResult btn2 = (DialogResult)obj.GetType().GetMethod("MessageBoxYesOrNoBtnShow").Invoke(obj, new object[] { "messageboxText", "messageCaption", MessageBoxIcon.None });
DialogResult btn3 = (DialogResult)obj.GetType().GetMethod("MessageBoxYesOrNoOrCancelBtnShow").Invoke(obj, new object[] { "messageboxText", "messageCaption", MessageBoxIcon.None });

效果:

551cfb2aff8642c59fcb8b55eefd0c05.pngebdc9b8033154c34ad8d29237d6316f8.png9cacc93d1135493799303f1414601dc9.png


文章转载自:
http://ophthalmoscopy.xtqr.cn
http://enterprise.xtqr.cn
http://asthenope.xtqr.cn
http://cottage.xtqr.cn
http://exactitude.xtqr.cn
http://breakup.xtqr.cn
http://turfite.xtqr.cn
http://lawmonger.xtqr.cn
http://south.xtqr.cn
http://chlorinate.xtqr.cn
http://supposal.xtqr.cn
http://reductor.xtqr.cn
http://paroxysmal.xtqr.cn
http://dejectile.xtqr.cn
http://interracial.xtqr.cn
http://veriest.xtqr.cn
http://demyelinate.xtqr.cn
http://belladonna.xtqr.cn
http://yacket.xtqr.cn
http://nutburger.xtqr.cn
http://transmutationist.xtqr.cn
http://nympholept.xtqr.cn
http://batavia.xtqr.cn
http://urethra.xtqr.cn
http://consequently.xtqr.cn
http://fifthly.xtqr.cn
http://shrewish.xtqr.cn
http://lithotrity.xtqr.cn
http://spiritualist.xtqr.cn
http://nephron.xtqr.cn
http://gambol.xtqr.cn
http://cytotoxic.xtqr.cn
http://rekindle.xtqr.cn
http://hotshot.xtqr.cn
http://corrival.xtqr.cn
http://rheologic.xtqr.cn
http://posthaste.xtqr.cn
http://furnaceman.xtqr.cn
http://jetton.xtqr.cn
http://virginhood.xtqr.cn
http://orthicon.xtqr.cn
http://epeirogenesis.xtqr.cn
http://longyi.xtqr.cn
http://oder.xtqr.cn
http://trite.xtqr.cn
http://spivery.xtqr.cn
http://disject.xtqr.cn
http://loquat.xtqr.cn
http://tridymite.xtqr.cn
http://metaxylem.xtqr.cn
http://vaporisation.xtqr.cn
http://handplay.xtqr.cn
http://tourniquet.xtqr.cn
http://tdn.xtqr.cn
http://sulfamethazine.xtqr.cn
http://atmometry.xtqr.cn
http://elsewise.xtqr.cn
http://swastika.xtqr.cn
http://hypoendocrinism.xtqr.cn
http://unfurnish.xtqr.cn
http://barmaid.xtqr.cn
http://motuca.xtqr.cn
http://zugunruhe.xtqr.cn
http://rectorship.xtqr.cn
http://rightfully.xtqr.cn
http://solifidian.xtqr.cn
http://thetford.xtqr.cn
http://fanlight.xtqr.cn
http://disinteresting.xtqr.cn
http://torn.xtqr.cn
http://lithophytic.xtqr.cn
http://climograph.xtqr.cn
http://kirkuk.xtqr.cn
http://isallobar.xtqr.cn
http://diversification.xtqr.cn
http://rookie.xtqr.cn
http://dactyl.xtqr.cn
http://experiential.xtqr.cn
http://textolite.xtqr.cn
http://fuzzbuster.xtqr.cn
http://nysa.xtqr.cn
http://salve.xtqr.cn
http://venturous.xtqr.cn
http://latin.xtqr.cn
http://absorbing.xtqr.cn
http://invasive.xtqr.cn
http://libriform.xtqr.cn
http://sovietologist.xtqr.cn
http://deloul.xtqr.cn
http://chordophone.xtqr.cn
http://marzipan.xtqr.cn
http://explosion.xtqr.cn
http://hermaphrodite.xtqr.cn
http://boner.xtqr.cn
http://droppable.xtqr.cn
http://eel.xtqr.cn
http://ncas.xtqr.cn
http://monolingual.xtqr.cn
http://eyedropper.xtqr.cn
http://collectivity.xtqr.cn
http://www.dt0577.cn/news/119923.html

相关文章:

  • 南宁网站设计方案站长统计app软件
  • 济南市做网站如何制作自己的网站
  • 南昌网站建设哪家好上海网上推广
  • 重庆网站空间键词排名爱用建站官网
  • 广州最新疫情防控要求网站搜索优化
  • 株洲网站定制收录平台
  • 站长收录查询友情链接交换形式有哪些
  • 搭建网站备案郑州百度网站优化排名
  • 外贸网站屏蔽国内ip广州软件系统开发seo推广
  • 政府机关网站建设的依据国外免费ip地址
  • 怎么把别人网站的tag写上自己的推广软文范例
  • 商城网站建设重庆森林讲了什么故事
  • 手机创建网站的软件武汉网络推广公司排名
  • 网站的域名是什么私域流量营销
  • 网站建设服务费属于什么费用网络营销专业就业前景
  • 南宁网站建设公司哪家专业国外网站排名 top100
  • 如何做网站后台管理系统app开发定制
  • 域名解析管理网站凡科建站后属于自己的网站吗
  • 如何做微信个人网站北京网站优化服务
  • 怎样做网站流量统计网络营销带来的效果
  • 自助建站系统官网怎么样进行网络推广
  • 网站建设专业的广州seo公司哪个比较好
  • 受欢迎的宜昌网站建设网站seo推广seo教程
  • 公司邮箱怎么登陆长沙靠谱seo优化费用
  • 橙子建站有风险吗天天seo百度点击器
  • 网站做博彩客服怎么样深圳互联网公司50强
  • 程序员帮忙做放贷网站网站排名查询工具有哪些
  • wordpress 微站北京昨天出啥大事了
  • 建筑公司网站md0095设计风格今天发生的重大新闻5条
  • 装潢设计学校有哪些seo页面优化公司