- 博客(55)
- 资源 (1)
- 收藏
- 关注
转载 Winform图片局部放大效果
转载地址: http://blog.youkuaiyun.com/catshitone/article/details/41513915【C#】winform 图片局部放大类似淘宝 整体效果:有两个picturebox控件,name默认没有修改。其
2017-12-12 17:24:26
2868
1
原创 LabView 队列的使用,以及VI之间的传值
队列能有多个入口,但只能有一个出口(因为同一个元素只能出一次)。不然以后的出队列就得不到元素。2:主VI与子Vi 之间传值:1,通过全局变量。2,通过控件的引用,通过把控件的指针传到子VI,那么子VI修改该指针的属性,就能修改主VI里面控件的值。
2015-08-04 17:29:13
13216
转载 重绘Button控件
分享到一键分享QQ空间新浪微博百度云收藏人人网腾讯微博百度相册开心网腾讯朋友百度贴吧豆瓣网搜狐微博百度新首页QQ好友和讯微博更多...百度分享public partial class ShapeButton : Button{publicShapeButton(){InitializeCompo
2015-08-02 00:29:58
1525
转载 C# 操作office
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 Ex
2015-06-25 22:24:55
432
转载 以鼠标为中心对图片进行放大,此文是转载的,楼主看到不怪
在WPF里面实现以鼠标位置为中心缩放移动图片在以前的文章使用WPF Resource以及Transform等技术实现鼠标控制图片缩放和移动的效果里面,介绍了如何在WPF里面移动和放大缩小图片,程序也支持使用滚轮的方式缩放图片。然而前面文章里介绍的缩放功能只能以图片中心为原点来实现,但是这种功能往往并不是客户想要的,我们看图片的时候,往往都喜欢以鼠标放在图片的焦点为原点进行图片的缩放
2015-06-11 23:42:32
3207
转载 C# 坐标系平移
八、坐标系的变化与图形变换private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; g.FillRectangle(Brushes.White, this.ClientRectangle);
2015-05-11 23:47:12
3797
原创 sql 插入数据库
string name1 = name.Text; string score = textBox1.Text; string adress = textBox2.Text; //string sql = string.Format("insert into student v
2014-12-09 22:03:10
444
转载 C#调用非托管函数参数为Void* 时,方法
Void SampleSend FeedbackThis sample demonstrates how to pass data to an unmanaged function that expects avoid pointer as an argument. The sample provides two solutions. The Voi
2014-09-15 00:35:13
2331
转载 C#WIN32API调用
一. 基础知识 Win32 API是C语言(注意,不是C++语言,尽管C语言是C++语言的子集)函数集。C#语言与C语言是完全不同的(除了语法上比较像),所以,要想用C#语言调用C语言的Win32 API,要费上一番周折。首先我们就要准备一些基础知识。1. Win32 API函数放在哪里? Win32 API函数是Windows的核心,比如我们看到的窗
2014-09-14 23:52:09
528
转载 C#消息常量
C# 重写WndProc 拦截 发送 系统消息 + windows消息常量值(1) #region 截获消息 /// 截获消息 处理XP不能关机问题 protected override void WndProc(ref Message message) { switch (message.M
2014-09-14 23:08:27
919
转载 C# 构子的实现
工具/原料Visual Studio(本文使用VS2013,其他版本亦可)。基础知识1使用钩子之前,需要使用SetWindowsHookEx()函数创建钩子,使用完毕之后要UnhookWindowsHookEx()函数卸载钩子,“钩”到消息后操作系统会自动调用在创建钩子时注册的回调函数来处理消息,处理完后调用CallNextHookE
2014-09-14 17:58:03
411
转载 C#坐标提取
VC里面有一个WM_NCMOUSMOVE这个消息,后来发现C#里面有一个WinProc(),从里面可以响应此鼠标的非工作区移动消息,而且通过获取标题栏的宽度来锁定鼠标响应位置。部分代吗如下: protected override void WndProc(ref Message m) { base.WndProc(ref m);
2014-09-14 17:13:47
1013
转载 C# 自定义消息
关于C#中使用消息获取Message.LParam所包含的数据(2007-03-23 15:44:04)转载▼标签:杂谈分类:技术人生关于C#中使用消息获取Message.LParam所包含的数据在C#中也可以使用Windows 消息,包括系统消息和自定义消息。对于自定义消息中,对于LParam可以在发中或者接收过
2014-09-14 17:02:03
789
转载 dll调用
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;using ClassLibrary1;namespace ConsoleApplication1{ class Progr
2014-09-08 20:47:03
649
转载 Linux initrd 制作与压缩
cpio格式 initrd 的解压与压缩cexoyq 2012-04-24 21:55 1.解压 initrd # file initrd.`uname –r`.img (察看格式,不同的linux操作系统,这个文件格式也有不同,这个文件格式可能是cpio 也可能是ext2) 如果是cpio格式 :# mkdir /mnt/tmp# cd /mnt/tmp# cpio
2014-09-02 21:41:14
683
转载 剪贴板操作
void CClipBoardDlg::OnButtonSend() { // TODO: Add your control notification handler code here if(OpenClipboard()) { CString str; HANDLE hClip; char *pBuf; EmptyClipbo
2014-08-12 17:47:20
393
转载 MFC 常用数据类型转化
CString可以转换为基本类型LPCTSTR,LPCTSTR根据项目编码可以是const char*或者const wchar_t*;string可以用c_str()转换为const char*,stringw可以用c_str()转换为const w_char*。而CString和string/w都重载了=赋值操作符,可以把char*或者wchar_t*字符串赋值给CString或者string
2014-08-05 23:15:03
507
转载 C#多线程
View ColorizedCopy to ClipboardPrintImports SystemImports System.ComponentModelImports System.ThreadingImports System.Windows.FormsPublic Class Form1 Inherits Form ' This delegate en
2014-07-18 09:47:52
369
转载 Lambda
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ public delegate void MyFirstDelegate(string i); public delegate vo
2014-07-17 00:17:47
369
原创 C#03
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ public delegate void MyFirstDelegate(int i,int j); class Program
2014-07-16 23:59:36
372
原创 C#02
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ public delegate void MyFirstDelegate(int i,int j); class Program
2014-07-16 23:37:51
334
转载 C# 委托01
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ public delegate void MyFirstDelegate(string messge); class Program
2014-07-16 23:20:54
346
原创 MFC 响应自创按扭的消息
// ButtonView.cpp : implementation of the CButtonView class//#include "stdafx.h"#include "Button.h"#include "ButtonDoc.h"#include "ButtonView.h"#ifdef _DEBUG#define new DEBUG_NEW#undef
2014-07-15 19:15:06
464
原创 WIN 32 文本
#include#include"SystemMetri.h"#include"stdio.h"LRESULT CALLBACK MyPro( // pointer to previous procedure HWND hWnd, // handle to window UINT Msg, // message
2014-07-15 19:11:01
387
原创 win32 SDK 响应按扭消息
#include#includeHDC hdc;POINT pt;BOOL fDraw;LRESULT CALLBACK ChildPro( HWND , // handle to window UINT , // message WPARAM , // first messa
2014-07-15 19:05:36
396
转载 (size_t)&(((s*)0)->m) 的理解
#define offsetof(s,m) (size_t)&(((s *)0)->m) 看了半天没弄懂,空指针怎么会不出错的,他们说没有写入操作,即没有 mov x, dword ptr []。找了下别人的理解,最详细的如下:((s *)0):强制转化成数据结构指针,并使其指向地址0;((s *)0)->m:使该指针指向成员m&(((s *)0)->m):获取该成员m的地
2014-07-15 15:02:49
2103
原创 Mat to CString
#include "StdAfx.h" #include "ImageUtility.h" ImageUtility::ImageUtility(void) { } ImageUtility::~ImageUtility(void) { } // 实现cv::Mat 结构到 CImage结构的转化 void ImageUtility::MatTo
2014-07-14 21:38:17
714
原创 OpenCv Mat 对象应用到MFC
void MatToCImage(Mat & mat, CImage & cImage) { int width = mat.cols; int height = mat.rows; int channels = mat.channels(); cImage.Destroy();//这一步是防止重复利用造成内存问题
2014-07-14 21:36:10
497
原创 Opencv lesson1
#include #include #include using namespace cv; using namespace std; #pragma comment(lib,"opencv_highgui249d.lib")int main( int argc, char *argv[]) {/*if( argc != 2) { cout
2014-06-20 18:19:51
383
原创 函数参数是类对象时,特殊的用法!
#include"iostream"using namespace std;const class A{public: A() {}; int c; void set(){ int a=10; } void display(){ cout }}; cl
2014-06-20 18:06:16
533
转载 linux驱动的入口函数module_init的加载和释放
linux驱动的入口函数module_init的加载和释放分类: Linux驱动 2009-12-02 23:20 10922人阅读 评论(3)收藏 举报modulelinuxlinux内核restcallback编程 就像你写C程序需要包含C库的头文件那样,Linux内核编程也需要包含Kernel头文件,大多的Linux驱动程序需要包含下面三个头文件
2014-06-09 20:36:57
445
原创 MFC,基类构造函数THIS指针指向的是子类
#include"iostream"using namespace std;class student{public: student *p; student(){ p=this; }virtual void display(){ cout}};class student1:public student{public:
2014-04-27 12:00:01
517
原创 带缺省值的构造函数
#includeusing namespace std;class student{public: int score; int age; student(int score=20){ this->score=score; } /* student(int score){ this->score=score; } 基类构造函数的参数,有缺省
2014-04-27 10:49:38
1742
原创 Grid View
package com.example.girdview;import android.content.Context;import android.view.View;import android.view.ViewGroup;import android.widget.BaseAdapter;import android.widget.GridView;import
2014-03-16 10:31:03
451
原创 对java 内部类成员变量引用的思考
class test{ public static void main(String argv[]) { new a().setHandler(); new a().new b().display();//这儿打印的结果是hack,而不是jiangpeng. 所以一个非静态的变量,在不同的函数中,指向不同的内存。 在静态变量中,所有程
2014-03-02 17:01:32
584
转载 IP地址的获取
class ip { public static String getIp(){ try{ for(Enumeration enumeration=NetworkInterface.getNetworkInterfaces();enumeration.hasMoreElements();) { NetworkInterface intf=enumeration.next
2014-02-22 15:29:46
547
转载 java 抽象类
class test { public static void main(String argv[]){ Person p=new Chinese(); p.introduce(); p.eat(); }}abstract class Person{ Person(){ Syst
2014-02-18 14:30:54
565
原创 java 类里面定义接口的使用2
class test{ public static void main(String arv[]){ D d=new D(); A.b ab=new C(); d.display(ab); d.display(new A.b() { @Override public void fun() {
2014-02-18 14:00:24
491
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人