C#小问题
各位大侠,小弟想写一个在后台发送飞信的程序,用的是sms.api.bz的代理。
程序本身是不难,代码如下:
C# code:
Process p = new Process();
p.StartInfo.FileName = "http://sms.api.bz/fetion.php?username=151*********&password=******&sendto=151*******&message=短信内容";
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.Start();
虽然有这句p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;但程序运行时还是会弹出一个ie窗口,怎样才能不显示ie窗口?
有没有其他的办法??比如说不用Process类,而用别的东西??
自己组http协议?
没弄过飞信, 帮顶一下.
用webbrowser控件吧,把它放到一个窗体里,隐藏这个窗体就可以了。
这个,问李一男
能调用API吧?如果用C++可以这样:
C/C++ code:
char *pURL = "http://sms.api.bz/fetion.php?username=151*********&password=******&sendto=151*******&message=短信内容";
HINSTANCE ShellExecute(NULL,"open", pURL, NULL, NULL, SW_HIDE);
上面写错了,这样
C/C++ code:
char *pURL = "http://sms.api.bz/fetion.php?username=151*********&password=**
相关问答:
//C 接口
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//我在C#中声明
//调用C DLL 中的函数
[DllImport("OCRapi.dll&quo ......
在数据库中有张表,有id,name两列,id 是主键,没有设置自增属性,在程序中取出这张表放入datatable,在这个datatable中插入一条记录,当更新数据库时提示id列不能为空,请问该怎么解决?
给它一个值!!主键不能为空 ......
我在form1中的某个方法让form2窗体出现
那么这个时候怎么关闭form1而不关闭form2呢?
Form2 f=new Form2();
f.Show();
this.Close();
引用
Form2 f=new Form2();
f.Show();
this.Close();
这样的话整个程 ......
以下是一段JavsScript脚本,但运行时总会产生 “Microsoft JScript 运行时错误: 'null' 为空或不是对象”异常,大家帮看一下。
<form id="form1" runat="server">
< ......