尔冬橙

博客园 首页 新随笔 联系 订阅 管理

2015年1月5日 #

摘要: #define WIN32_LEAN_AND_MEAN#include #include #include #include #include #include #define WINDOW_CLASS_NAME "WINCLASS1"#define WINDOW_WIDTH 640#define... 阅读全文
posted @ 2015-01-05 21:43 尔冬橙 阅读(550) 评论(0) 推荐(0) 编辑

摘要: 要播放声音,要附加项:winmm.lib,然后包含头文件:#include 播放声音用PlaySound函数,只能播放midi和wav波形文件。#define WIN32_LEAN_AND_MEAN#include #include #include #include #include #inclu... 阅读全文
posted @ 2015-01-05 20:20 尔冬橙 阅读(553) 评论(0) 推荐(0) 编辑

2015年1月1日 #

摘要: 1 #define WIN32_LEAN_AND_MEAN 2 #include 3 #include 4 #include 5 #define WINDOW_CLASS_NAME L"WINCLASS1" 6 //窗口处理函数 7 LRESULT CALLBACK WindowProc(H... 阅读全文
posted @ 2015-01-01 18:36 尔冬橙 阅读(192) 评论(0) 推荐(0) 编辑

2014年8月17日 #

摘要: 当将自定义的Marker(含有Label)通过MarkerClusterer 管理的时候,当地图发生任何移动、缩放 的时候,Marker 的Label 就会自动消失。这个问题主要是由于百度的点聚合API的bug造成的。其实诱发这个问题的原因是在于API代码中的map.removeOverlay(ma... 阅读全文
posted @ 2014-08-17 11:05 尔冬橙 阅读(4395) 评论(3) 推荐(0) 编辑

摘要: 在WPF中使用WebBrowser控件显示网页时,经常会报脚本错误的提示,如何屏蔽掉这些错误提示呢。方法是定义如下方法: public void SuppressScriptErrors(WebBrowser wb, bool Hide) { Fie... 阅读全文
posted @ 2014-08-17 09:40 尔冬橙 阅读(1619) 评论(0) 推荐(0) 编辑

2014年8月11日 #

摘要: 有些时候,我们希望同时更新表中的多条记录,但更新的值不一样。declare @i intdeclare @j intdeclare @phone varchar(20)set @j=1 select @i=count(*) from LatestLocationDECLARE L_cursor CU... 阅读全文
posted @ 2014-08-11 22:45 尔冬橙 阅读(868) 评论(0) 推荐(0) 编辑

2013年2月16日 #

摘要: 1.引用Microsoft.DirectX.dll和Microsoft.DirectX.Directsound.dll这2个文件。2.项目属性里边,把目标平台改成X86。3.调试菜单-->异常。把Managed Debugging Assistants里的LoaderLock引发的异常去掉。4.App.Config修改下:<?xml version="1.0"?><configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supp 阅读全文
posted @ 2013-02-16 19:08 尔冬橙 阅读(272) 评论(0) 推荐(0) 编辑

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Microsoft.DirectX;using Microsoft.DirectX.DirectSound;using System.IO;using System.Threading;namespace WindowsFormsApp 阅读全文
posted @ 2013-02-16 18:58 尔冬橙 阅读(269) 评论(0) 推荐(0) 编辑

2013年2月4日 #

摘要: 在线程中,如果要暂停一定的时间,可以使用Thread的Sleep方法,让线程暂停。在微软新的win8API中,已经用Task来实现原来用线程实现的许多功能,同样,Task也有Delay方法,让程序暂停一定的时间。以下程序利用System.Threading.Timer让程序每隔间隔的时间执行回调方法:using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace TimerApp{ class Program { static void M... 阅读全文
posted @ 2013-02-04 22:32 尔冬橙 阅读(10334) 评论(0) 推荐(0) 编辑

2013年2月3日 #

摘要: 最近被xp下的一个.net程序折磨了.原来只要打开OpenFileDialog,程序的当前路径就被更改了.导致程序找不到文件.无法运行.可是在win8下运行却没有问题,不知是操作系统的bug还是.net的bug.xp系统确实到了该淘汰的地步了,太折磨人了.最后的办法是:程序开始允许,记录下当前路径:public static string currentDirectory = Directory.GetCurrentDirectory();用过OpenFileDialog之后:Directory.SetCurrentDirectory (BackGroundForm.currentDirect 阅读全文
posted @ 2013-02-03 00:02 尔冬橙 阅读(2148) 评论(0) 推荐(2) 编辑