سورس برنامه نویسی ، آموزش ، قالب وردپرس ، اسکریپت ، گرافیک ، آموزش کاربردی، دانلود رایگان ، قالب

تبليغات شما در داده باران
تبلیغات در داده باران

مجموعه سورس کدهای ویژوالبیسیک ۶ قسمت ۸

مجموعه سورس کدهای ویژوالبیسیک ۶ قسمت ۸Reviewed by داده باران on Oct 2Rating:

جهت مطالعه و دسترسی به سورس ها به ادامه مطلب مراجعه نمائید

یک کد برای ارسال pm به یاهو ۸:

Private Declare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
ShellExecute Me.hwnd, “open”, “ymsgr:sendIM?” + Text1.Text + “&m=” + Text2.Text, 0&, App.Path, 0&
SendKeys “{enter}”
End Sub

حالت کلی فرستادن pm به یا هو را من با این modul بهتون نشون می دم

دیگه خودتون یکم دستکاریش کنین و تغییرش بدین:

حالت کلی فرستادن pm به یا هو را من با این modul بهتون نشون می دم

دیگه خودتون یکم دستکاریش کنین و تغییرش بدین

Public Declare Function SetForegroundWindow Lib “User32” (ByVal hwnd As Long) As Long

Public Declare Function sndPlaySound Lib “winmm.dll” Alias “sndPlaySoundA” (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Const SND_ASYNC = &H1

Public Declare Function EnableWindow Lib “User32” (ByVal hwnd As Long, ByVal fEnable As Long) As Long

Public Declare Function FindWindow Lib “User32” Alias “FindWindowA” (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public Declare Function FindWindowEx Lib “User32” Alias “FindWindowExA” (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long

Public Declare Function GetMenuItemCount Lib “User32” (ByVal hMenu As Long) As Long

Public Declare Function GetMenu Lib “User32” (ByVal hwnd As Long) As Long

Declare Function GetCursorPos Lib “User32” (lpPoint As POINTAPI) As Long

Public Declare Function GetMenuItemID Lib “User32” (ByVal hMenu As Long, ByVal nPos As Long) As Long

Public Declare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Declare Function GetMenuString Lib “User32” Alias “GetMenuStringA” (ByVal hMenu As Long, ByVal wIDItem As Long, ByVal lpString As String, ByVal nMaxCount As Long, ByVal wFlag As Long) As Long

Public Declare Function GetSubMenu Lib “User32” (ByVal hMenu As Long, ByVal nPos As Long) As Long

Public Declare Function GetWindow Lib “User32” (ByVal hwnd As Long, ByVal wCmd As Long) As Long

Public Declare Function PostMessage Lib “User32” Alias “PostMessageA” (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Public Declare Function SendMessage Lib “User32” Alias “SendMessageA” (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Public Declare Function SendMessageLong& Lib “User32” Alias “SendMessageA” (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)

Public Declare Function SendMessageByString Lib “User32” Alias “SendMessageA” (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long

Public 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

Public Declare Function ShowWindow Lib “User32” (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Public Const BM_SETCHECK = &HF1

Public Const BM_GETCHECK = &HF0

Const HWND_TOPMOST = -1

Const HWND_NOTOPMOST = -2

Const SWP_NOSIZE = &H1

Const SWP_NOMOVE = &H2

Const SWP_NOACTIVATE = &H10

Const SWP_SHOWWINDOW = &H40

Private Declare Function Escape Lib “gdi32” (ByVal hdc As Long, _

ByVal nEscape As Long, ByVal nCount As Long, lpInData As Any, _

lpOutData As Any) As Long

Private Declare Function DeleteDC Lib “gdi32” (ByVal hdc As Long) As Long

Private Declare Function StretchBlt Lib “gdi32” (ByVal hdc As Long, _

ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, _

ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, _

ByVal ySrc As Long, ByVal nSrcWidth As Long, _

ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long

Private Declare Function SelectObject Lib “gdi32” (ByVal hdc As Long, _

ByVal hObject As Long) As Long

Private Declare Function CreateCompatibleDC Lib “gdi32” _

(ByVal hdc As Long) As Long

Private Declare Function SwapMouseButton& Lib “User32” _

(ByVal bSwap As Long)

Private Declare Function ShowCursor& Lib “User32” _

(ByVal bShow As Long)

Private Const WM_SYSCOMMAND = &H112&

Private Const SC_MONITORPOWER = &HF170&

Dim mousehide As Boolean

Dim fliphorizontal As Boolean, flipvertical As Boolean, thechange ‘declare the variables

Dim hIn As Integer

Dim Sending As Boolean, Sending2 As Boolean, stopit As Boolean

Public Const EWX_FORCE = 4

Public Const EWX_LOGOFF = 0

Public Const EWX_REBOOT = 2

Public Const EWX_SHUTDOWN = 1

Public Const CB_GETCOUNT = &H146

Public Const CB_GETLBTEXT = &H148

Public Const CB_SETCURSEL = &H14E

Public Const GW_HWNDFIRST = 0

Public Const GW_HWNDNEXT = 2

Public Const GW_CHILD = 5

Public Const LB_GETCOUNT = &H18B

Public Const LB_GETTEXT = &H189

Public Const LB_SETCURSEL = &H186

Public Const SW_HIDE = 0

Public Const SW_MAXIMIZE = 3

Public Const SW_MINIMIZE = 6

Public Const SW_NORMAL = 1

Public Const SW_SHOW = 5

Public Const VK_SPACE = &H20

Public Const WM_CHAR = &H102

Public Const WM_CLOSE = &H10

Public Const WM_COMMAND = &H111

Public Const WM_GETTEXT = &HD

Public Const WM_GETTEXTLENGTH = &HE

Public Const WM_KEYDOWN = &H100

Public Const WM_KEYUP = &H101

Public Const WM_LBUTTONDBLCLK = &H203

Public Const WM_LBUTTONDOWN = &H201

Public Const WM_LBUTTONUP = &H202

Public Const WM_MOVE = &HF012

Public Const WM_RBUTTONDOWN = &H204

Public Const WM_RBUTTONUP = &H205

Public Const WM_SETTEXT = &HC

Public LastPoint As POINTAPI

Public lngTPPY As Long

Public lngTPPX As Long

Type POINTAPI

X As Long

Y As Long

End Type

Sub SendPM(Who As String, Text As String)

‘oz RoOzY

‘Ex. : call SendPM(“ngsp_public_msg”,”salam”)

Dim imclass As Long, editx As Long

imclass = FindWindow(“imclass”, vbNullString)

editx = FindWindowEx(imclass, 0&, “edit”, vbNullString)

Call SendMessageByString(editx, WM_SETTEXT, 0&, Who)

ChatSend (Text)

End Sub

Sub ChatSend(TheText)

Dim imclass As Long

Dim richedit As Long

Dim Button As Long

imclass& = FindWindow(“IMClass”, vbNullString)

richedit& = FindWindowEx(imclass&, 0&, “RICHEDIT”, vbNullString)

Call SendMessageByString(richedit&, WM_SETTEXT, 0&, TheText)

Button& = FindWindowEx(imclass&, 0&, “Button”, vbNullString)

Button& = FindWindowEx(imclass&, Button&, “Button”, vbNullString)

Button& = FindWindowEx(imclass&, Button&, “Button”, vbNullString)

Button& = FindWindowEx(imclass&, Button&, “Button”, vbNullString)

Call SendMessageLong(Button&, WM_KEYDOWN, VK_SPACE, 0&)

Call SendMessageLong(Button&, WM_KEYUP, VK_SPACE, 0&)

End Sub

 

حتما بخوانید  دانلود کتاب آموزشی ویژوالبیسیک ۶ قسمت اول

موفق باشین . عاشق بچه های با مرامی ام که نظر میدن و مارو یاری میکنن

لينك كوتاه اين مطلب : http://www.dadebaran.ir/?p=597

رمز فايل : DADEBARAN.IR




تبلیغات در داده باران
ارسال دیدگاه

قبل از نوشتن دیدگاه به نکات زیر توجه کنید:
    » نظراتی که با تایپ فارسی نباشند تایید نخواهند شد
    » نظرات تبلیغاتی اسپم محسوب میشوند و IP شخص مسدود خواهد شد.

پاسخ دهید

نکته: نظر شما در انتظار بررسی است و پس از تایید مدیریت در سایت نمایش داده میشود..