الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

هل يمكنني تشغيل jet Audio في الفيجوال بيسك ؟

مغلق
بدأه Visual Studio في 21 نوفمبر 2005 · 1 رد · 415 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#2

اخى كل شئ فى البرمجة ممكن

الحقيقة انا ما فهمت سؤالك تمام لكن

حتى تعمك الفائدة انا حاشرح كل الحالات اللى فهمتها

اذا تريد تشغيل برنامج منالفيجيوال بيسك استخدم الدالة shell لتشغيله

هناك دالة api تقوم بنفس المهمة

اما اذا قصدت ان تشغله داخل جزء فى برنامج اي تضعه داخل مربع فى برنامج ولا يستطيع الخروج فهذا الحل

هذا برنامج يقوم بتشغيل المفكرة داخل برنامجى اي يقوم بحجزها

فقم بنسخ الكود ووضع مربع نص اسمه txtProgram يحتوى اسم البرنامج الذى تريد تشغيل

مثلا انا وضعت محتواه notepad.exe لتشغيل المفكرة

يمكنك من خلال مسجل النظام معرفة مكان تنصيب الجيت اوديو اذا كان موجودا

ثم بيكتشر بوكس اسمه picChild

ثم زرين للتشغيل وحجزه داخل برنامجك cmdrun

زر لتحريره cmdfree

Option Explicit

Private Const GW_HWNDNEXT = 2

Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Long, ByVal lpWindowName As Long) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Private old_parent As Long
Private child_hwnd As Long

' Return the window handle for an instance handle.
Private Function InstanceToWnd(ByVal target_pid As Long) As Long
Dim test_hwnd As Long
Dim test_pid As Long
Dim test_thread_id As Long

    ' Get the first window handle.
    test_hwnd = FindWindow(ByVal 0&, ByVal 0&)

    ' Loop until we find the target or we run out
    ' of windows.
    Do While test_hwnd <> 0
        ' See if this window has a parent. If not,
        ' it is a top-level window.
        If GetParent(test_hwnd) = 0 Then
            ' This is a top-level window. See if
            ' it has the target instance handle.
            test_thread_id = GetWindowThreadProcessId(test_hwnd, test_pid)

            If test_pid = target_pid Then
                ' This is the target.
                InstanceToWnd = test_hwnd
                Exit Do
            End If
        End If

        ' Examine the next window.
        test_hwnd = GetWindow(test_hwnd, GW_HWNDNEXT)
    Loop
End Function

Private Sub cmdFree_Click()
    SetParent child_hwnd, old_parent

    cmdRun.Enabled = True
    cmdFree.Enabled = False
End Sub

Private Sub cmdRun_Click()
Dim pid As Long
Dim buf As String
Dim buf_len As Long

    ' Start the program.
    pid = Shell(txtProgram.Text, vbNormalFocus)
    If pid = 0 Then
        MsgBox "Error starting program"
        Exit Sub
    End If

    ' Get the window handle.
    child_hwnd = InstanceToWnd(pid)

    ' Reparent the program so it lies inside
    ' the PictureBox.
    old_parent = SetParent(child_hwnd, picChild.hwnd)

    cmdRun.Enabled = False
    cmdFree.Enabled = True
End Sub

Private Sub Form_Resize()
Dim hgt As Single

    hgt = ScaleHeight - picChild.Top
    If hgt < 120 Then hgt = 120

    picChild.Move 0, picChild.Top, ScaleWidth, hgt
End Sub

الكابـــــــــــwinxp4444ـــــــتـــــــــن

بعض من برامجى

see itdeeb monitor 2005

net monitor 2004

deeb security system

deeb encription system-with speshal algo. make by me

deeb mdb killer

deeb cash pass killer

ديب دلول ▒ deebdalloul

for i= 1 to 10000 deeb x*i programblood.gif

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…