欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
用VB制做可換圖片的屏幕保護程序


‘一個(gè)Filelistbox控件:File1

‘以下是代碼
‘聲明
Private Declare Function SetWindowPos Lib “user32“ (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function ShowCursor Lib “user32“ (ByVal bShow As Long) As Long
Private Declare Function ShowWindow Lib “user32“ (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_SHOWMAXIMIZED = 3
Dim kaiguan As Boolean
Dim PictureNum As Long

Private Sub Form_Load()
ShowWindow Me.hwnd, SW_SHOWMAXIMIZED
kaiguan = False
Timer1.Interval = 2000
File1.Path = “C:\Documents and Settings\All Users\Documents\My Pictures\示例圖片“  ‘放置圖片的文件夾
File1.Pattern = “*.jpg;*.bmp;*.gif“  ‘圖片格式
Form1.Picture = LoadPicture(File1.Path & “\“ & File1.List(PictureNum))  ‘先載入第一張
File1.Visible = False
PictureNum = 1
ShowCursor False
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3 ‘窗體在最上面
End Sub

‘按鍵 和鼠標使程序結束
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If kaiguan Then End
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If kaiguan Then End
End Sub

‘換圖片
Private Sub Timer1_Timer()
If kaiguan = False Then
Timer1.Interval = 2000
kaiguan = True
End If
picturefile = File1.Path & “\“ & File1.List(PictureNum)
Form1.Picture = LoadPicture(picturefile)
PictureNum = PictureNum + 1
If PictureNum >= File1.ListCount Then PictureNum = 0
End Sub

回答采納率達:23%(542個(gè)被采納)

評價(jià)已經(jīng)被關(guān)閉 目前有 0 個(gè)人評論

好不好

0% (0)0% (0)

其它回答 (共5條)

a_dick_102 - 大副 十二級

‘要生成文件的后綴名為scr 
‘窗體樣式要改為Me.BorderStyle = 0 
Dim X1, Y1, X2, Y2 As Integer 
Dim I As Integer 
Dim J As Boolean 
Dim K As Integer 

Dim WithEvents Label1 As Label ‘聲明一個(gè)label 
Dim WithEvents Timer1 As Timer ‘聲明一個(gè)timer 

Private Sub Form_Activate() 
I = 100 
K = 100 
X1 = Me.Width / 2 
Y1 = Me.Height / 3 
X2 = X1 
Y2 = Y1 

Rem 設置label的位置 
Label1.Top = Me.Height / 2 - Label1.Height / 2 
Label1.Left = Me.Width / 2 - Label1.Width / 2 
End Sub 

Private Sub Form_Load() 
Me.BackColor = &H0& ‘窗體的背景色為黑色 
Me.FillColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255) ‘窗體的填充色為隨機 
Me.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255) ‘窗體的前景色為隨機 
Me.DrawMode = 13 ‘窗體輸出的外觀(guān)為13 
Me.DrawWidth = 2 ‘窗體輸出的線(xiàn)條寬度為2 
Me.FillStyle = 7 ‘窗體的填充樣式為7 

Set Label1 = Me.Controls.Add(“VB.Label“, “Label1“) ‘設置label 
Set Timer1 = Me.Controls.Add(“VB.Timer“, “Timer1“) ‘設置timer 

Label1.Visible = True ‘label可見(jiàn)性為true 
Label1.AutoSize = True ‘label自動(dòng)調整大小 
Label1.BackStyle = 0 ‘label背景色為透明 
Label1.Caption = “I LOVE YOU“ ‘設置標題 
Label1.Font.Size = 60 ‘字體大小為60 
Label1.ForeColor = &HFF00& ‘label前景色為黑色 

Timer1.Enabled = True ‘timer為有效 
Timer1.Interval = 10 ‘timer時(shí)間 間隔為0.001秒 

Me.WindowState = 2 ‘窗體展開(kāi)樣式 
End Sub 

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 
Static currentX, currentY As Single 
Dim orignX, orignY As Single 
‘把當前的鼠標值賦給orignX和orignY 
orignX = X 
orignY = Y 
‘初始化currentX和currentY 
If currentX = 0 And currentY = 0 Then 
currentX = orignX 
currentY = orignY 
Exit Sub 
End If 
If Abs(orignX - currentX) > 1 Or Abs(orignY - currentY) > 1 Then 
End 
End If 
End Sub 

Private Sub Timer1_Timer() 
Me.Circle (X1, Y1), 250 ‘在窗體上畫(huà)圓 
Me.Circle (X2, Y2), 250 ‘在窗體上畫(huà)圓 

If Y1 <= Me.Height - 1200 Then ‘在指定高度運行 
X1 = X1 + K 
Y1 = Y1 - I 
X2 = X2 - K 
Y2 = Y2 - I 
I

03-17 12:51回答采納率達:23%(545個(gè)被采納)

yanjiiun007_233 - 大副 十二級

VC++可謂神通廣大,如果學(xué)到家了,或者就掌握了那么一點(diǎn)MFC,你也會(huì )感到它的方便快捷,當然最重要的是功能強大。不是嗎,從最基本的應用程序.EXE到動(dòng)態(tài)連接庫DLL,再由風(fēng)靡網(wǎng)上的ActiveX控件到Internet Server API,當然,還有數據庫應用程序……瞧,我都用它來(lái)做屏幕保護程序了。一般的屏幕保護程序都是以SCR作為擴展名,并且要放在c:\windows 目錄或 c:\windows\system 目錄下,由Windows 98內部程序調用(Windows NT 是在 c:\windows\system32 目錄下)。怎么調用?不用說(shuō)了,這誰(shuí)不知道。 

    好了,我們來(lái)作一個(gè)簡(jiǎn)單的。選擇MFC AppWizard(exe),Project Name 為MyScreensaver,[NEXT],對話(huà)框,再后面隨你了。打開(kāi)菜單Project、Settings,在Debug頁(yè)、Executable for debug session項,以及Link頁(yè)中Output file name項改為c:\windows\MyScreensaver.scr,這樣,你可以調試完后,直接在VC中運行(Ctrl+F5),便可看到結果。當然,這樣做的唯一缺點(diǎn)是你必須手動(dòng)清除Windows 目錄下的垃圾文件(當然是在看到滿(mǎn)意結果后;還有,你可借助SafeClean 這個(gè)小東東來(lái)幫你清除,除非你的硬盤(pán)大的讓你感到無(wú)所謂……快快快回來(lái),看我跑到那里去了)。接下來(lái)用Class Wizard生成CMyWnd類(lèi),其基類(lèi)為CWnd(在Base Class 中為generic CWnd)。這個(gè)類(lèi)是我們所要重點(diǎn)研究的。創(chuàng )建滿(mǎn)屏窗口、計時(shí)器,隱藏鼠標,展示圖片,響應鍵盤(pán)、鼠標等等,這家伙全包了。至于MyScreensaverDlg.h與MyScreensaverDlg.cpp文件我們暫時(shí)不管。打開(kāi)MyScreensaver.cpp,修改InitInstance()函數: 

    BOOL CMyScreensaverApp::InitInstance() 

    { 

     AfxEnableControlContainer(); 

    #ifdef _AFXDLL 

     Enable3dControls(); // Call this when using MFC in a shared DLL 

    #else 

     Enable3dControlsStatic(); // Call this when linking to MFC statically 

    #endif 

     CMyWnd* pWnd = new CMyWnd; 

     pWnd->Create(); 

     m_pMainWnd = pWnd; 

     return TRUE; 

    } 

    當然,再這之前得先 #include “MyWnd.h“ 。后面要做的都在MyWnd.h 與 MyWnd.cpp 兩文件中了。 

    下面給出CMyWnd 的說(shuō)明: 

    class CMyWnd : public CWnd 

    { 

    public: 

     CMyWnd(); 

     static LPCSTR lpszClassName; //注冊類(lèi)名 

    public: 

     BOOL Create(); 

    public: 

     // ClassWizard generated virtual function overrides 

     //{{AFX_VIRTUAL(CMyWnd) 

     protected: 

     virtual void PostNcDestroy(); 

     //}}AFX_VIRTUAL 

    public: 

     virtual ~CMyWnd(); 

    protected: 

     CPoint m_prePoint; //檢測鼠標移動(dòng) 

     void DrawBitmap(CDC& dc, int nI

03-17 12:51回答采納率達:26%(594個(gè)被采納)

chenyingmao3_104 - 大副 十二級

可以隨意增減圖片!
Private Sub P1_Click()
Static a%
a = a + 1
If a = 1 Then
Picture = LoadPicture(“圖片的路徑“)
End If
If a = 2 Then
Picture = LoadPicture(“圖片的路徑“)
End If
If a = 3 Then
Picture = LoadPicture(“圖片的路徑“)
End If
If a = 4 Then
Picture = LoadPicture(“圖片的路徑“)
End If
If a = 5 Then
Picture = LoadPicture(“圖片的路徑“)
End If
If a = 6 Then
Picture = LoadPicture(“圖片的路徑“)
End If
If a = 7 Then
a = 0
End If
If a = 0 Then
Picture = LoadPicture()
End If
End Sub

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
vb.net入門(mén)——Timer 組件的使用
話(huà)題
VB 窗體閃屏
如何用VB在窗體中實(shí)現閃爍文字
抽屜式窗體
CSDN 論壇
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久