製作托盤閃爍

2021-04-03 01:28:43 字數 1671 閱讀 4262

using system;

using system.drawing;

using system.windows.forms;

using system.componentmodel;

using system.collections;

using system.io;

using system.xml;

using system.text;

using system.runtime.interopservices;

namespace jy_pudownform

system.collections.hashtable htmsg = new hashtable();

system.windows.forms.notifyicon _notify;

private bool _isbicker = false;

system.drawing.icon _icon;

system.windows.forms.timer t;

system.collections.queue mreceiver = new queue();

message msg = new message();

///

/// 獲取圖示是否在閃爍

///

public bool isbicker

}public void m_changeicon(system.drawing.icon icon)

bool tm;

///

/// 接收到資訊時候閃爍,也可以用在登入時候

///

///

///

public void m_receive(system.drawing.icon icon,string id,string msg,bool tm)

if(!mreceiver.contains(id))

if(htmsg.containskey(id))

else

t.enabled = true;

_isbicker = true;

}private void t_tick(object send,eventargs e)

return;

}if(_notify.icon.equals(_icon))

else}}

///

/// 獲取第乙個對話人,可以用在登入以後停止閃爍

///

///

public string m_getuserid(out message msgs)

return temp;

}return "";

}public int msgcount

}public int msgcontbyid(string id)

public string m_getcode

else}}

}public class message

public system.drawing.icon icon;

public string userid;

public string msgcontent;

public system.collections.arraylist msgs = new system.collections.arraylist();}}

托盤製作心得

製作的主要涉及到的 api只有 shell notifyicon 雖然 api只有乙個,但是這個 api的引數的資料結構可是看的讓人很煩的。notifyicondata typedef struct notifyicondata tchar szinfotitle 64 tip 視窗標題 dword...

製作閃爍文字

建立乙個類 繼承textview,利用lineargradient shader和matrix完成乙個動態閃爍文字效果 首先,在onsizechanged 方法中進行一些物件的初始化,並根據view的寬設定乙個lineargradient 漸變渲染器。override protected void ...

MFC製作閃爍燈

lightdlg.h 定義成員變數 cbitmap m image 2 int m ibitmap cdc m dc bool m bstart 屬性欄 新增訊息 wm timer lightdlg.cpp 建構函式 m image 0 loadbitmap idb bitmap1 m image ...