22-04-23, 08:52 AM
اي فكرة تطرأ على بالي اكتبها هنا لمشاركتها فقط و ليس بقصد الابداع ابدا

شغل البرنامج كمسؤول
ctrl+s = للحفظ كصفحة php في مسار السيرفر
ctrl+o
لتشغيل الصفحة من المتصفح
http://127.0.0.1/p.php
اجعلهم(عن نفسي) بجانب بعض واتابع احدى الشروح باليوتيوب ولا اضطر لتحميل المحررات لاني مبرمج تطبيقات سطح مكتب واستطيع الاسنغناء عن اي جزئية اتقن منها ولو ابسط جزء
صباح الخير و كل عام و انتم بخير
الاكواد التالية لمن لا يريد تحميل المرفق:
التالي الموديول للتحقق من مكان الفورم لان الحفظ و التحميل او الاستدعاء للموضع الخاص بالفورم مفعل وحتى لو يحدث خطا واختفى الفورم يتم ضبطه من جديد بالكود:
PHP كود :
Module Module1
Public Sub rep(ByRef f As Form)
Dim ws As Integer = Screen.PrimaryScreen.Bounds.Right
Dim hs As Integer = Screen.PrimaryScreen.Bounds.Bottom
If f.Left < 0 Or f.Right > ws Then f.Left = ws - f.Width
If f.Top < 0 Or f.Bottom > hs Then f.Top = hs - f.Height
End Sub
End Module
PHP كود :
Imports System.Text
Public Class Form1
Dim s As Integer = 12
Dim ax, ay As Integer, dr As Boolean
Private Sub Form1_MouseDown(sender As Object, e As MouseEventArgs) Handles MyBase.MouseDown
If e.Button = MouseButtons.Left Then
dr = True
ax = MousePosition.X - Left
ay = MousePosition.Y - Top
End If
End Sub
Private Sub Form1_MouseMove(sender As Object, e As MouseEventArgs) Handles MyBase.MouseMove
If dr Then
Left = MousePosition.X - ax
Top = MousePosition.Y - ay
End If
End Sub
Private Sub Form1_MouseUp(sender As Object, e As MouseEventArgs) Handles MyBase.MouseUp
dr = False
End Sub
Private Sub txtbody_KeyDown(sender As Object, e As KeyEventArgs) Handles txtbody.KeyDown
If e.Control And e.KeyCode = Keys.Add Then
txtbody.Font = New Font("Arial", s, FontStyle.Bold)
s += 5
End If
If e.Control And e.KeyCode = Keys.S Then
IO.File.WriteAllText("C:\inetpub\wwwroot\p.php", txtbody.Text, Encoding.UTF8)
End If
If e.Control And e.KeyCode = Keys.O Then
Process.Start("http://127.0.0.1/p.php")
End If
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
rep(Me)
Me.Text = "run this app as admin , to save click (ctrl+s) , to open page in iis server click (ctrl+o)"
txtbody.Text = IO.File.ReadAllText("C:\inetpub\wwwroot\p.php", Encoding.UTF8)
End Sub
End Class