هارون
عدد الرسائل : 54 sms : <!--- MySMS By AlBa7ar Semauae.com --><form method="POST" action="--WEBBOT-SELF--"> <!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><fieldset style="padding: 2; width:208; height:104"> <legend><b>My SMS</b></legend> <marquee onmouseover="this.stop()" onmouseout="this.start()" direction="up" scrolldelay="2" scrollamount="1" style="text-align: center; font-family: Tahoma; " height="78">$post[field5]</marquee></fieldset></form><!--- MySMS By AlBa7ar Semauae.com --> تاريخ التسجيل : 14/02/2008
| موضوع: أكواد فجول بيسك5 الخميس مارس 06, 2008 10:50 am | |
| بإمكانك تحريك الماوس برمجيا باستخدام الكود التالي 'Command1,Command2 Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Declare Function ClientToScreen Lib "user32" _ (ByVal hwnd As Long, lpPoint As POINTAPI) As Long Private Declare Sub mouse_event Lib "user32" _ (ByVal dwFlags As Long, ByVal dx As Long, _ ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Private Const MOUSEEVENTF_MOVE = &H1 ' mouse move Private Const MOUSEEVENTF_ABSOLUTE = &H8000 ' absolute move Private Type POINTAPI X As Long Y As Long End Type Private Sub Command1_Click() Const NUM_MOVES = 2000 Dim pt As POINTAPI Dim cur_x As Long Dim cur_y As Long Dim dest_x As Long Dim dest_y As Long Dim dx As Long Dim dy As Long Dim i As Integer ScaleMode = vbPixels GetCursorPos pt cur_x = pt.X * 65535 / ScaleX(Screen.Width, vbTwips, vbPixels) cur_y = pt.Y * 65535 / ScaleY(Screen.Height, vbTwips, vbPixels) 'تحديد مكان الماوس الجديد pt.X = Command2.Width / 2 pt.Y = Command2.Height / 2 ClientToScreen Command2.hwnd, pt dest_x = pt.X * 65535 / ScaleX(Screen.Width, vbTwips, vbPixels) dest_y = pt.Y * 65535 / ScaleY(Screen.Height, vbTwips, vbPixels) ' Move the mouse. dx = (dest_x - cur_x) / NUM_MOVES dy = (dest_y - cur_y) / NUM_MOVES For i = 1 To NUM_MOVES - 1 cur_x = cur_x + dx cur_y = cur_y + dy mouse_event MOUSEEVENTF_ABSOLUTE + MOUSEEVENTF_MOVE, cur_x, cur_y, 0, 0 DoEvents Next i End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ هل تريد تشغيل برنامجك باستخدام أمر معين من خلال الدوس او من قائمة تشغيل Run Private Sub Form_Load() Dim args As String ' Get the command line arguments. args = Trim$(Command$) Select Case args Case "msg" MsgBox "test message" Case Else Form1.Caption = args End Select End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ توسيط أداة التحكم وسط النموذج ( مثلا Command1 ) Sub Center(ctrl As Control, frm As Form) ctrl.Left = frm.ScaleWidth / 2 - ctrl.Width / 2 ctrl.Top = frm.ScaleHeight / 2 - ctrl.Height / 2 End Sub Private Sub Form_Resize() Center Command1, Me End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ طباعة محتويات FlexGrid على الطابعة (مجرد فكرة) Dim old_width As Integer Private Sub cmdPrint_Click() old_width = MSGrid.Width MSGrid.Width = Printer.Width Printer.paintpicture MSGrid.picture, 0, 0 Printer.Enddoc MSGrid.Width = old_width End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ لمعرفة عدد الاسطر في مربع النص TextBox Private Declare Function SendMessageLong Lib "user32" Alias _ "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, ByVal lParam As Long) As Long Private Const EM_GETLINECOUNT = &HBA Private Sub Command1_Click() Dim lineCount As Long On Local Error Resume Next lineCount = SendMessageLong(Text1.hwnd, EM_GETLINECOUNT, 0&, 0) MsgBox Format$(lineCount, "##,###") End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ لفتح وإغلاق سواقة الأقراص المدمجة Private Declare Function mciSendString Lib "winmm.dll" Alias _ "mciSendStringA" (ByVal lpstrCommand As String, ByVal _ lpstrReturnString As String, ByVal uReturnLength As Long, _ ByVal hwndCallback As Long) As Long '?E? Private Sub cmdOpen_Click() retvalue = mciSendString("set CDAudio door open", _ returnstring, 127, 0) End Sub 'CU?C? Private Sub cmdClose_Click() retvalue = mciSendString("set CDAudio door closed", _ returnstring, 127, 0) End Sub | |
|