05-04-15, 06:28 AM
05-04-15, 12:59 PM
وعليكم السلام
تفضل
Public Class Form1
Declare Auto Function SetParent Lib "user32.dll" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Integer
Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Private Const WM_SYSCOMMAND As Integer = 274
Private Const SC_MAXIMIZE As Integer = 61488
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Dim proc As Process
proc = Process.Start("C:\Windows\system32\notepad.exe")
proc.WaitForInputIdle()
SetParent(proc.MainWindowHandle, Me.Handle)
SendMessage(proc.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0)
Me.BringToFront()
End Sub
End Class
تفضل
Public Class Form1
Declare Auto Function SetParent Lib "user32.dll" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Integer
Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Private Const WM_SYSCOMMAND As Integer = 274
Private Const SC_MAXIMIZE As Integer = 61488
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Dim proc As Process
proc = Process.Start("C:\Windows\system32\notepad.exe")
proc.WaitForInputIdle()
SetParent(proc.MainWindowHandle, Me.Handle)
SendMessage(proc.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0)
Me.BringToFront()
End Sub
End Class
06-04-15, 01:08 AM
الله لا يهينك لكن المقصد هو انا عندي كود اضافة ملف الى المشروع واستخراجة في مكان معين :
مثال
(استدعاء واستخراج الملف في مكان ما)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
On Error Resume Next
Dim value As Byte()
My.Computer.FileSystem.DirectoryExists("c:\test")
value = My.Resources.test
My.Computer.FileSystem.WriteAllBytes("c:\test", value, True)
Dim NewProcess As Process = New Process
End Sub
( نقل الملف )
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim fi As New FileInfo("c:\test")
fi.MoveTo("d:\test")
End Sub
الكود لا يقبل ملفات اخرى مثل reg او exe او اي صيغة اخرى ، اريد كود يتعامل مع هذا النوع من الملفات .
مثال
(استدعاء واستخراج الملف في مكان ما)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
On Error Resume Next
Dim value As Byte()
My.Computer.FileSystem.DirectoryExists("c:\test")
value = My.Resources.test
My.Computer.FileSystem.WriteAllBytes("c:\test", value, True)
Dim NewProcess As Process = New Process
End Sub
( نقل الملف )
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim fi As New FileInfo("c:\test")
fi.MoveTo("d:\test")
End Sub
الكود لا يقبل ملفات اخرى مثل reg او exe او اي صيغة اخرى ، اريد كود يتعامل مع هذا النوع من الملفات .
07-04-15, 03:42 AM
ارجو المساعدة يا اهل الخبرة
07-04-15, 08:32 PM
تقصدك أضافتها فين بالضبط ؟
بالريسورس ؟
انا عن نفسي م فهمت السؤال
بالريسورس ؟
انا عن نفسي م فهمت السؤال
08-04-15, 09:03 AM
ايه نعم ..
انا اتعامل بالريسورس ...
اذا فيه طريقة ثانية تفي بالغرض يا ليت المساعدة , اهم شي الاقي حل سواء بالريسورس او غيره ...
انا اتعامل بالريسورس ...
اذا فيه طريقة ثانية تفي بالغرض يا ليت المساعدة , اهم شي الاقي حل سواء بالريسورس او غيره ...
08-04-15, 09:16 AM
نشكركم على طرح الموضوع
09-04-15, 08:24 AM
في انتظار المساعدة يا اخوان ....
10-04-15, 06:31 PM
ما زلت في انتظار المساعدة لا تبخلوا علينا
10-04-15, 07:18 PM