Win7登入介面自定義工具

2022-08-16 12:42:09 字數 2679 閱讀 8158

本工具vs2008  原始碼:

//程式截圖如下

說明:前前後後,花了乙個下午,終於完成了本工具的編寫。本工具在win7旗艦版32位系統

的**,我對其進行了改進,增加了檢測檔案大小的功能,使其更加穩定,不容易出錯,

**相比之下,也更清晰,容易閱讀和理解了,在此感謝這位不知名的朋友。

程式原理:

1)找到登錄檔項:

hkey_local_machine\software\microsoft\windows\currentversion\authentication\logonui\background

2)將background下的oembackground的雙位元組值(假如沒有,可本身 新建乙個)設定為1

3)然後將某張jpg命名為:backgrounddefault.jpg

4)將backgrounddefault.jpg複製到c:\windows\system32\oobe\info\backgrounds,重啟系統即可看到效果了

5)恢復預設的系統時,將oembackground的雙位元組值設定為0即可

//本工具只是將1到5用程式寫出來而已,原理很簡單啦^_^!...

//截圖如下

//本程式主要**如下:

//瀏覽按鈕

void cwin7loginfacemodifydlg::onbnclickedbtnbrowse()

//啟用修改和恢復按鈕

getdlgitem(idc_btn_modify)->enablewindow(true);

getdlgitem(idc_btn_recover)->enablewindow(true);

}//修改win7登入介面按鈕

void cwin7loginfacemodifydlg::onbnclickedbtnmodify()

//獲取系統目錄x:\windows\system32,其中x為系統盤

tchar sys32path[256];

::getsystemdirectory(sys32path,256);

//建立目錄x:\windows\system32\oobe\info\backgrounds

//該目錄用於存放win7登入介面的背景,其中x為系統盤

//shcreatedirectoryex當目錄存在時什麼也不做,目錄不存在時

//就新建乙個目錄,用它可以新建多級目錄,

//如果建立的資料夾目錄有的中間目錄不存在,shcreatedirectoryex可以建立,

//而createdirectory(ex)則做不到這一點。

cstring bckpath;

bckpath.format(_t("%s\\oobe\\info\\backgrounds"),sys32path);

shcreatedirectoryex(afxgetmainwnd()->m_hwnd,bckpath,null);

//將背景複製到x:\windows\system32\oobe\info\backgrounds

//其中x為系統盤

//修改登錄檔

hkey hkey;

dword y=1;

regopenkey(hkey_local_machine,

_t("software\\microsoft\\windows\\currentversion\\authentication\\logonui\\background"),

&hkey);

regsetvalueex(hkey,_t("oembackground"),0,reg_dword,(byte*)&y,sizeof(dword));

regclosekey(hkey);

//鎖定螢幕檢視效果

winexec("cmd /c \"%windir%\\system32\\rundll32.exe user32.dll,lockworkstation\"",sw_hide);

}//恢復預設登入介面按鈕

void cwin7loginfacemodifydlg::onbnclickedbtnrecover()

//退出程式按鈕

void cwin7loginfacemodifydlg::onbnclickedbtnexit()

JDBC 自定義工具類 實現登入

一 配置檔案 jdbc1.properties url 本地資料庫位址 user 資料庫的賬號 password 資料庫的密碼 driver 註冊位址 url jdbc mysql localhost 3306 db1?servertimezone gmt 2b8user root password...

自定義工具類01

ftputil ftpclient 工具類 idutils 生成一切id 的策略的工具類。可以使用他生成名稱 jsonutils 物件與json 格式轉換的工具類 public class ftputil 切換到上傳目錄if ftp.changeworkingdirectory basepath f...

(sandbar dll)C 自定義工具條

td.sandbar.menubar menubar td.sandbar.sandbarmanager sandbarmanager td.sandbar.container topsandbardock td.sandbar.view private void form1 load object...