Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Pulsante si no cancel

  1. #1

    Pulsante si no cancel

    Sub OnMouseDown(x As Long, y As Long, flags As Long)

    Dim MyPoint As New Point
    Dim A() As Integer 'Declare the value array

    Dim obj_var As GefObjectVariable
    Dim pag, idx, db As String

    Set obj_var = CimGetObject().GetVariable("DB")
    db = obj_var.Value

    Set obj_var = CimGetObject().GetVariable("INDICE")
    idx = obj_var.Value

    sleep 500

    Select Case MsgBox("Sei sicuro di volere cambiare lo stato Simulazione???", vbYesNoCancel Or vbExclamation Or vbSystemModal Or vbDefaultButton1, "Warning")

    Case vbYes
    MsgBox "Lo stato simulazione è cambiato"


    Case vbNo
    MsgBox "Lo stato simulazione non è cambiato"

    Case vbCancel
    MsgBox "Operazione annullata"

    MyPoint.id = "CPU313C."& db &"" 'SET BIT
    MyPoint.Get 'Get the point value
    MyPoint.GetArray A 'Transfer point element into array
    A(idx) = 1 'Set the array
    MyPoint.SetArray A 'Transfer array into the point
    MyPoint.Set 'Transfer data to CIMPLICITY.

    End Select

    End Sub

    In pratica se premo si deve fare questa operazione

    MyPoint.id = "CPU313C."& db &"" 'SET BIT
    MyPoint.Get 'Get the point value
    MyPoint.GetArray A 'Transfer point element into array
    A(idx) = 1 'Set the array
    MyPoint.SetArray A 'Transfer array into the point
    MyPoint.Set

    con gli altri due no come posso fare?
    http://www.doc-pc.it Se hai bisogno di aiuto sono qua...

  2. #2
    Utente di HTML.it L'avatar di oregon
    Registrato dal
    Jul 2005
    residenza
    Roma
    Messaggi
    36,480
    Mi sembra ovvio che devi mettere quel codice solamente sotto il ramo del case che ti serve ....

  3. #3
    Moderatore di Programmazione L'avatar di alka
    Registrato dal
    Oct 2001
    residenza
    Reggio Emilia
    Messaggi
    24,472

    Moderazione

    In questa sede era già stato suggerito di leggere e seguire il Regolamento di quest'area.
    MARCO BREVEGLIERI
    Software and Web Developer, Teacher and Consultant

    Home | Blog | Delphi Podcast | Twitch | Altro...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.