التنبيهات التالية ظهرت :
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 864 errorHandler->error



تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
ارجو المساعدة فى تحويل هذا الكود الى السى شارب
#1
Imports System.Management
Imports Microsoft.Win32
Imports System.Security.AccessControl
Public Class Form1
    'Public Sub Get_Info()

    '    Dim cmicWmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
    '    Dim diskId As String 'Digital ID
    '    Dim diskSerialNumber As String 'This we will call it the serial number for the time being.
    '    Dim diskModel As String 'serial number
    '    For Each cmicWmiObj As ManagementObject In cmicWmi.Get
    '        diskId = cmicWmiObj("signature")
    '        diskSerialNumber = cmicWmiObj("serialnumber")
    '        diskModel = cmicWmiObj("Model")
    '    Next
    'End Sub

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
      
        TxtWnd.Text = My.Computer.Info.OSFullName
        TxtMname.Text = System.Environment.MachineName
        TxtLang.Text = My.Computer.Info.InstalledUICulture.EnglishName
        Dim cmicWmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
        Dim diskId As String 'Digital ID
        Dim diskSerialNumber As String 'This we will call it the serial number for the time being.
        Dim diskModel As String 'serial number
        For Each cmicWmiObj As ManagementObject In cmicWmi.Get
            diskId = cmicWmiObj("signature")
            diskSerialNumber = cmicWmiObj("serialnumber")
            diskModel = cmicWmiObj("Model")
        Next

        TextBox1.Text = diskSerialNumber
        TextBox2.Text = diskId
        TextBox4.Text = Val(TextBox2.Text) * 13 + 1225 - 1650
        TextBox4.Text = TextBox4.Text * 17

     
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        If TextBox3.Text = TextBox4.Text Then
            MsgBox("تمت عملية تفعيل البرنامج بنجاح")
            Dim x As String
            x = TextBox3.Text
            Dim Activekey As RegistryKey
            Activekey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
            Activekey = Registry.LocalMachine.OpenSubKey("SOFTWARE\FoxSoftware", True)
            If Activekey Is Nothing Then
                Activekey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
                Activekey.CreateSubKey("FoxSoftware")
                Activekey = Registry.LocalMachine.OpenSubKey("SOFTWARE\FoxSoftware", True)
                Activekey.SetValue("System_key", x)
                Activekey.Close()
            End If
        Else
            MsgBox("رقم التفعيل الذي ادخلته غير صحيح الرجاء مراجعة قسم المبيعات")
            Application.Exit()
        End If
    End Sub
End Class
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
ارجو المساعدة فى تحويل هذا الكود الى السى شارب - بواسطة omar5 - 23-03-21, 03:55 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم