النتائج 1 إلى 10 من 11

العرض المتطور

  1. #1
    تاريخ التسجيل
    Feb 2006
    الدولة
    دالاس، تكساس، أمريكا
    المشاركات
    29

    رد: سؤال في البرمجة

    الأخ العزيز زكريا،

    بعد عمل الفورم في بيئة الـ ArcGIS يمكنك نقل هذا الفورم إلى الفيجوال بيسك 6 مع تغيير بسيط لبعض الأوامر ومن ثمّ عمل DLL كما أنه لابد أن يكون المشروع في VB6 يدعم DLL ActiveX
    مثال على هذه التغييرات هي
    بدلاً من كتابة
    set mx_document = This document

    تكتب

    Dim m_application as IApplication
    set mx_document = m_application.decument

    كما إنّك لا بد أن تغير
    Call yourform.show

    إلى
    yourform.show vbmodal

    كما يجب أن تعمل Class Modules حتى تنشئ زر إستدعاء داخل ArcMap ويمكنك أن تستخدم هذا الكود مع الأخذ بالإعتبار تغيير test إلى اي أسم تريد وأن تعمل فورم تضيف به صورة لزّر الذي تريد أن تنشئه

    Option Explicit

    Implements ICommand

    'Private Sub Class_Terminate()
    ' 'clear the reference to ArcCatalog
    ' Set g_pGxApp = Nothing
    ' Set g_pFirstPS = Nothing
    '
    'End Sub
    '
    Private Property Get ICommand_Bitmap() As esriSystem.OLE_HANDLE
    'set the default bitmap for the command
    ICommand_Bitmap = frmImage.pbxImage.Picture.Handle

    End Property

    Private Property Get ICommand_Caption() As String
    'set the command's caption -- appears when displayed with text
    ICommand_Caption = "test"

    End Property

    Private Property Get ICommand_Category() As String
    'set the category this command falls under in the customization dialog
    ICommand_Category = "test"

    End Property

    Private Property Get ICommand_Checked() As Boolean

    End Property

    Private Property Get ICommand_Enabled() As Boolean
    'command is always enabled
    ICommand_Enabled = True

    End Property

    Private Property Get ICommand_HelpContextID() As Long

    End Property

    Private Property Get ICommand_HelpFile() As String

    End Property

    Private Property Get ICommand_Message() As String
    'set the message that appears in the status bar
    ICommand_Message = "Lets you set a metadata value for all selected items."

    End Property

    Private Property Get ICommand_Name() As String
    'set the name of the command
    ICommand_Name = "test"

    End Property

    Private Sub ICommand_OnClick()
    'open form when the command is clicked
    Contacts.Show vbModal

    End Sub

    Private Sub ICommand_OnCreate(ByVal hook As Object)
    ' 'get hook that provides access to the ArcCatalog application
    ' Dim m_pApplication As IApplication
    '
    ' Set m_pApplication = hook

    End Sub

    Private Property Get ICommand_Tooltip() As String
    'set the command's tooltip
    ICommand_Tooltip = "Edit metadata for all selected items"

    End Property


    أرجوا أن تساعدك هذه المعلومات
    لكــل شيء إذا ما تمّ نقــصان ***** فلا يغر بطيب العيش إنسان
    هي الأمور كما شاهدتها دولٌ ***** من سرّه زمن سائته أزمــان
  2. #2

    رد : سؤال في البرمجة

    Dear All
    There is another way to lock your code in ArcMap application , without create A DLL or COM Components
    The easy way to that , you can use the application Object in the ArcMap customization , and place A Password for your Code

    Hint : at this level you well lock all the customization Level
    I will send the details about this Solution

    Thanks
    Ibrahim Nawassrah
    Khatib-Alami ( Alriyadh)

ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •