代码改变世界

vv

2013-04-02 18:43 by RuMing, 323 阅读, 0 推荐, 收藏,
摘要:#include "windows.h"#include "stdlib.h"#include "string.h" //对函数进行申明LRESULT CALLBACK WndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);BOOL InitWindowsClass(HINSTANCE hInstance);BOOL InitWindows(HINSTANCE hInstance,int nCmdShow);//程序入口, WinMain函数int WINAPI Win 阅读全文

Windows编程:模块

2013-03-30 10:47 by RuMing, 195 阅读, 0 推荐, 收藏,
摘要:窗口类的定义: 1 //窗口类的定义 2 BOOL InitWindowsClass(HINSTANCE hInstance) 3 { 4 WNDCLASS wndcls; 5 6 wndcls.cbClsExtra=0; 7 wndcls.cbWndExtra=0; 8 wndcls.hbrBackground=(HBRUSH)(GetStockObject(WHITE_BRUSH)); 9 wndcls.hCursor=LoadCursor(NULL,IDC_ARROW);10 wndcls.hIcon = LoadIcon(NULL,"E... 阅读全文

新闻发布系统总结

2012-06-16 20:27 by RuMing, 281 阅读, 0 推荐, 收藏,
摘要:1:读取相应的值传递给 labelView Code 1 SqlCommand cmd2 = con.CreateCommand(); 2 cmd2.CommandText = "select nNewsContent,nNewsTitle,cNewsAuthor,dPublishTime,vImagePath,iHits from News where iNewsId = " + newsid; //sql语句文本 后面+新闻ID号 3 4 SqlDataReader reader2 = cmd2.Exe... 阅读全文

登陆页面

2012-05-16 23:18 by RuMing, 283 阅读, 0 推荐, 收藏,
摘要:1 protected void Button1_Click(object sender, EventArgs e) 2 { 3 string userID = TextBox1.Text; 4 string userPASSWORD = TextBox2.Text; 5 6 string conStr = System.Configuration.ConfigurationManager.ConnectionStrings["NewTestConnectionString"].ConnectionString; 7 8 ... 阅读全文

asp.net获取ip

2012-05-16 21:27 by RuMing, 265 阅读, 0 推荐, 收藏,
摘要:命名空间:usingSystem.Net;前台代码:1 用户IP地址:2 <asp:Label ID="UserIP" runat="server"></asp:Label>3 4 用户域名:5 <asp:Label ID="UserDNS" runat="server"></asp:Label> 后台实现页面:1 protected void Button1_Click(object sender, EventArgs e)2 {3 string IP = Requ 阅读全文

MSMQ操作相关

2012-05-13 22:34 by RuMing, 203 阅读, 0 推荐, 收藏,
摘要:1:创建队列public void CreateQueue(string queuePath) { try { if (!MessageQueue.Exists(queuePath)) { MessageQueue.Create(str); MessageBox.Show("创建队列成功!"); } else {... 阅读全文

使用对象操作数据库

2012-05-13 13:48 by RuMing, 189 阅读, 0 推荐, 收藏,
摘要:配置文件内容:<connectionStrings> <add name="StudentInfoConnectionString" connectionString="Data Source=TANGPRO;Initial Catalog=StudentInfo;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> 代码页内容://调用配置文件中的连接对象 string cons 阅读全文

WCF,MSMQ

2012-05-13 10:52 by RuMing, 179 阅读, 0 推荐, 收藏,
摘要:Interfaceusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.Runtime.Serialization;namespace OrderInterface{ //服务契约 [ServiceContract] public interface IOrder { //向队列中插入数据 [OperationContract] void In... 阅读全文

wcf微软列子

2012-05-13 10:48 by RuMing, 168 阅读, 0 推荐, 收藏,
摘要:Serviceusing System;using System.Collections.Generic;using System.Linq;using System.Text;//添加的引用using System.ServiceModel;using System.ServiceModel.Description;namespace Microsoft.ServiceModel.Samples { [ServiceContract(Namespace = "http://Microsoft.ServiceModel.Samples")] /*定义一个名为 ICalc.. 阅读全文