با سلام به تمامی عزیزان
جواب سوال یکی از دوستان
چگونه فرم بدون caption را drag کنیم
این هم کدش
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call ReleaseCapture
lngReturnValue = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End Sub
بچه ها یک سایت به ما بدین که بتونم در آن برنامه ها م را آپلود کنم (تو قسمت نظرات )
من نمیتونم دیگه اینچا آپلود کنم
اینجا را فیلتر کردن
اگر سوالی داشتین من در خدمتم
فعلا بای
سلام دوباره
امروز میخوام یک سرس بگزارم که بتوانید با آن رزولیشین را تغییر دهید
کنید Past اول یک ماژول به فرم خود اضافه کنید بعد این کد را در ماژول خود
کد ماژول:
Declare Function EnumDisplaySettings Lib "user32" _
Alias "EnumDisplaySettingsA" _
(ByVal lpszDeviceName As Long, _
ByVal iModeNum As Long, _
lpDevMode As Any) As Boolean
Declare Function ChangeDisplaySettings Lib "user32" _
Alias "ChangeDisplaySettingsA" _
(lpDevMode As Any, ByVal dwFlags As Long) As Long
Declare Function ExitWindowsEx Lib "user32" _
(ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Public Const EWX_LOGOFF = 0
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
Public Const EWX_FORCE = 4
Public Const CCDEVICENAME = 32
Public Const CCFORMNAME = 32
Public Const DM_BITSPERPEL = &H40000
Public Const DM_PELSWIDTH = &H80000
Public Const DM_PELSHEIGHT = &H100000
Public Const CDS_UPDATEREGISTRY = &H1
Public Const CDS_TEST = &H4
Public Const DISP_CHANGE_SUCCESSFUL = 0
Public Const DISP_CHANGE_RESTART = 1
Type DEVMODE
dmDeviceName As String * CCDEVICENAME
dmSpecVersion As Integer
dmDriverVersion As Integer
dmSize As Integer
dmDriverExtra As Integer
dmFields As Long
dmOrientation As Integer
dmPaperSize As Integer
dmPaperLength As Integer
dmPaperWidth As Integer
dmScale As Integer
dmCopies As Integer
dmDefaultSource As Integer
dmPrintQuality As Integer
dmColor As Integer
dmDuplex As Integer
dmYResolution As Integer
dmTTOption As Integer
dmCollate As Integer
dmFormName As String * CCFORMNAME
dmUnusedPadding As Integer
dmBitsPerPel As Integer
dmPelsWidth As Long
dmPelsHeight As Long
dmDisplayFlags As Long
dmDisplayFrequency As Long
End Type
بعد از کپی کردن کد ماژول این کد را به فرم خود اضافه کنید
' change the resolutoin By : VB1365 @ Yahoo.com
' Only Pray For Me to Exemption Of Military !!!!! My CHANCE !!!!!
' For My Friend Ali Modarresi
' My Private WebSite : www.esnaashary.persianblog.com
Private Sub Command1_Click()
Dim DevM As DEVMODE
'Get the info into DevM
erg& = EnumDisplaySettings(0&, 0&, DevM)
'We don't change the colordepth, because a
'rebot will be necessary
DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT 'Or DM_BITSPERPEL
Select Case ComRes.ListIndex
Case 0
DevM.dmPelsWidth = 640 'ScreenWidth
DevM.dmPelsHeight = 480 'ScreenHeight
Case 1
DevM.dmPelsWidth = 800 'ScreenWidth
DevM.dmPelsHeight = 600 'ScreenHeight
Case 2
DevM.dmPelsWidth = 1024 'ScreenWidth
DevM.dmPelsHeight = 768 'ScreenHeight
End Select
DevM.dmBitsPerPel = 32 '(could be 8, 16, 32 or even 4)
' DevM.dmColor = 1
'Now change the display and check if possible
erg& = ChangeDisplaySettings(DevM, CDS_TEST)
'Check if succesfull
Select Case erg&
Case DISP_CHANGE_RESTART
an = MsgBox("You've to reboot", vbYesNo + vbSystemModal, "Info")
If an = vbYes Then
erg& = ExitWindowsEx(EWX_REBOOT, 0&)
End If
Case DISP_CHANGE_SUCCESSFUL
erg& = ChangeDisplaySettings(DevM, CDS_UPDATEREGISTRY)
MsgBox "Everything's ok", vbOKOnly + vbSystemModal, "It worked!"
Case Else
MsgBox "Mode not supported", vbOKOnly + vbSystemModal, "Error"
End Select
End Sub
Private Sub Form_Load()
ComRes.AddItem " 640 * 480 "
ComRes.AddItem " 800 * 600 "
ComRes.AddItem "1024 * 768 "
End Sub
command1به نام comman button این پروژه به یک
اظافه کنید comboبه نام یک combox ویک
حالا دیگه کار تمومه
اگر سوالی داشتین من در خدمتم
بچه این هم یک سرس خیلی باحال اگر متوجه نشدین به من حتما بگین تا براتون توظیح بدهم
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Sub Form_Activate()
Dim Cnt As Long
For Cnt = 0 To 5000 Step 10
Beep Cnt, 50
Me.Caption = Cnt
DoEvents
Next Cnt
'www.shhacker.blogsky.com
'email: vb_vb_vb_vb2005@yahoo.com
End Sub
با تبادل لینک با تمامی وبلاگ ها موافقم به من لینک بدهید من هم به شما لینک میدهم