PRINCIPALE > LISTA DELLE AREE DI DISCUSSIONE > VISUAL BASIC: DOMANDE GENERALI > MESSAGGIO

Eseguire una ricerca veloce nell' archivio delle risorse di Visual Basic Italia®: 

Preso dall'archivio...

Premere il pulsante sotto per accedere direttamente ad un articolo o ad un esempio preso in modo casuale dall'archivio.

Ultimo e-book pubblicato:

"INTRODUZIONE AI CSS"

Lo scopo del CSS language è quello di controllare lo stile dei vari elementi che concorrono a formare un
documento HTML.
Si può operare in tre modi collegamento ad un foglio di stile esterno;definizione degli stili all'inizio
del documento utilizzo della proprietà style all'interno di un Tag HTML (embedded style). Questo e-book introduttivo
servirà per apprendere tali nozioni fondametali dei fogli di stile.


Prezzo: € 0.0.

Presentazione:
REAL SOFTWARE RILASCIA LA VERSIONE 5.0 di REALbasic per Windows






Gorizia, 5 maggio 2003 - Active, distributore in esclusiva di REALSoftware, Austin, Tx, annuncia la disponibilità di REALbasic 5.0 per Windows, uno strumento per lo sviluppo semplice da usare che permette agli utenti Windows di tutti i livelli di creare applicazioni personalizzate e di compilarle sia per la piattaforma Windows che per quella Macintosh.
[>>]

http://www.active-software.com

Contatti. Utilizzare l'email generica per domande relative al sito:
Porre domande relative al sito
oppure scrivere ad un responsabile di area.
Responsabile del sito: >Andrea Martelli
Responsabile area "Corso di VB":
> Giorgio Abraini

Messaggio



convertire una activex exe in una active x dll
Andrea 23/12/2002
Difficoltà: Professionista

bene... dopo essermi asciugato le lacrime... riesco a vedere il video!
dopo essere riuscito a creare una dll con logiche fuzzy... mi ritrovo con un problema enorme:

ho generato un .exe che mi fa quello che deve fare:
- form con 5 campi di Input
- nei 5 campi digito 5 valori che servono per far partire il calcolo della rete neurale usando la dll cbc20r32
- il form2 visualizza i risultati!
tutto funziona alla perfezione!!!

ora però devo trasformare il tutto per essere richiamato da una pagina asp!
in sostanza non devo + avere il form in vb ma i 5 valori di Input devo arrivare dalla pagina asp e sempre in asp devo mostrare quello che mostra il form2!

tanto per capirci incollo il listato in vb del file exe

LISTATO FORM1 (form dove ci sono i 5 campi di input)

Dim DLL_ch As Integer
Private Declare Function wfz_init Lib "cbc20r32.dll" (ByVal FName$) As Integer
Private Declare Function wfz_eval Lib "cbc20r32.dll" (ByVal FCh%, Inp As Double, Out As Double) As Integer
Private Declare Function wfz_close Lib "cbc20r32.dll" (ByVal Ch%) As Integer
Private Declare Function wfz_get_index Lib "cbc20r32.dll" (ByVal Ch%, Byval Typ%, Byval FName$, Index%) As Integer

Private Sub Command1_Click()

Form2.Show

Form2.Print Tab(1); "Stim seek = " + Str$(CInt(varOutputs(outIndex1)))

Form2.Print Tab(1); "Opp pass = " + Str$(CInt(varOutputs(outIndex3)))

Form2.Print Tab(1); "Diffidente = " + Str$(CInt(varOutputs(outIndex5)))

Form2.Print Tab(1); "Ansioso = " + Str$(CInt(varOutputs(outIndex7)))

Form2.Print Tab(1); "Paranoico = " + Str$(CInt(varOutputs(outIndex9)))

Form2.Print Tab(1); "Schizotipico = " + Str$(CInt(varOutputs(outIndex11)))

Form2.Print Tab(1); "Narcisista 2 = " + Str$(CInt(varOutputs(outIndex13)))


End Sub


Private Sub CommFuzzy_Click()
Dim result As Integer

VarInputs(inpIndex1) = CDbl(Val(F1.Text))
VarInputs(inpIndex2) = CDbl(Val(F2.Text))
VarInputs(inpIndex3) = CDbl(Val(F3.Text))
VarInputs(inpIndex4) = CDbl(Val(F4.Text))
VarInputs(inpIndex5) = CDbl(Val(F5.Text))

result = wfz_eval(DLL_ch, VarInputs(0), varOutputs(0))



End Sub


Private Sub Form_Load()

Dim retval As Integer

DLL_ch = wfz_init("PATOL2.CBD")

If DLL_ch < 0 Then
If DLL_ch = -4 Then
dummy = MsgBox("Non recupero PATOLOG2.CBD!", 0, "RTC DLL Error")
Else
dummy = MsgBox("Errata inizializzazione", 0, "RTC DLL Error: " + Str$(DLL_ch))
End If
End
End If


' Recupero degli indici associati alle variabili di Input

' Recupero degli indici associati alle variabili di Input

retval = wfz_get_index(DLL_ch, 1, "f1", inpIndex1)
If retval < 0 Then
dummy = MsgBox("Non recupero l'indice di f1!", 0, "RTC DLL Error" + Str$(retval))
End
End If

retval = wfz_get_index(DLL_ch, 1, "f2", inpIndex2)
If retval < 0 Then
dummy = MsgBox("Non recupero l'indice di f2!", 0, "RTC DLL Error" + Str$(retval))
End
End If

retval = wfz_get_index(DLL_ch, 1, "f3", inpIndex3)
If retval < 0 Then
dummy = MsgBox("Non recupero l'indice di f3!", 0, "RTC DLL Error" + Str$(retval))
End
End If

retval = wfz_get_index(DLL_ch, 1, "f4", inpIndex4)
If retval < 0 Then
dummy = MsgBox("Non recupero l'indice di f4!", 0, "RTC DLL Error" + Str$(retval))
End
End If

retval = wfz_get_index(DLL_ch, 1, "f5", inpIndex5)
If retval < 0 Then
dummy = MsgBox("Non recupero l'indice di f5!", 0, "RTC DLL Error" + Str$(retval))
End
End If

' Recupero degli indici associati alle variabili di Output

retval = wfz_get_index(DLL_ch, 2, "stimseek", outIndex1)

retval = wfz_get_index(DLL_ch, 2, "evitasoc", outIndex2)

retval = wfz_get_index(DLL_ch, 2, "opp_pass", outIndex3)

retval = wfz_get_index(DLL_ch, 2, "narcisismo", outIndex4)

retval = wfz_get_index(DLL_ch, 2, "diffidenza", outIndex5)

retval = wfz_get_index(DLL_ch, 2, "compulsiv", outIndex6)

retval = wfz_get_index(DLL_ch, 2, "ansieta", outIndex7)

retval = wfz_get_index(DLL_ch, 2, "sospett", outIndex8)

retval = wfz_get_index(DLL_ch, 2, "paran", outIndex9)

retval = wfz_get_index(DLL_ch, 2, "skiz", outIndex10)

retval = wfz_get_index(DLL_ch, 2, "skiztyp", outIndex11)

retval = wfz_get_index(DLL_ch, 2, "histrio", outIndex12)

retval = wfz_get_index(DLL_ch, 2, "narcis", outIndex13)

retval = wfz_get_index(DLL_ch, 2, "antisocial", outIndex14)

retval = wfz_get_index(DLL_ch, 2, "borderline", outIndex15)

retval = wfz_get_index(DLL_ch, 2, "avoidant", outIndex16)

retval = wfz_get_index(DLL_ch, 2, "dependent", outIndex17)

retval = wfz_get_index(DLL_ch, 2, "compulsive", outIndex18)

retval = wfz_get_index(DLL_ch, 2, "pass_aggr", outIndex19)

retval = wfz_get_index(DLL_ch, 2, "aggr_sad", outIndex20)

retval = wfz_get_index(DLL_ch, 2, "self_def", outIndex21)

retval = wfz_get_index(DLL_ch, 2, "abasem", outIndex22)

retval = wfz_get_index(DLL_ch, 2, "achiev", outIndex23)

retval = wfz_get_index(DLL_ch, 2, "affil", outIndex24)

retval = wfz_get_index(DLL_ch, 2, "aggres", outIndex25)

retval = wfz_get_index(DLL_ch, 2, "auton", outIndex26)

retval = wfz_get_index(DLL_ch, 2, "change", outIndex27)

retval = wfz_get_index(DLL_ch, 2, "cognstr", outIndex28)

retval = wfz_get_index(DLL_ch, 2, "defen", outIndex29)

retval = wfz_get_index(DLL_ch, 2, "domin", outIndex30)

retval = wfz_get_index(DLL_ch, 2, "endur", outIndex31)

retval = wfz_get_index(DLL_ch, 2, "exhib", outIndex32)

retval = wfz_get_index(DLL_ch, 2, "harmav", outIndex33)

retval = wfz_get_index(DLL_ch, 2, "impul", outIndex34)

retval = wfz_get_index(DLL_ch, 2, "nurtur", outIndex35)

retval = wfz_get_index(DLL_ch, 2, "order", outIndex36)

retval = wfz_get_index(DLL_ch, 2, "play", outIndex37)

retval = wfz_get_index(DLL_ch, 2, "sent", outIndex38)

retval = wfz_get_index(DLL_ch, 2, "socrec", outIndex39)

retval = wfz_get_index(DLL_ch, 2, "succor", outIndex40)

retval = wfz_get_index(DLL_ch, 2, "undst", outIndex41)



End Sub

LISTATO DEL MODULO

Global VarInputs(5) As Double
Global varOutputs(41) As Double
Global inpIndex1 As Integer
Global inpIndex2 As Integer
Global inpIndex3 As Integer
Global inpIndex4 As Integer
Global inpIndex5 As Integer

Global outIndex1 As Integer
Global outIndex2 As Integer
Global outIndex3 As Integer
Global outIndex4 As Integer
Global outIndex5 As Integer
Global outIndex6 As Integer
Global outIndex7 As Integer
Global outIndex8 As Integer
Global outIndex9 As Integer
Global outIndex10 As Integer
Global outIndex11 As Integer
Global outIndex12 As Integer
Global outIndex13 As Integer
Global outIndex14 As Integer
Global outIndex15 As Integer
Global outIndex16 As Integer
Global outIndex17 As Integer
Global outIndex18 As Integer
Global outIndex19 As Integer
Global outIndex20 As Integer
Global outIndex21 As Integer
Global outIndex22 As Integer
Global outIndex23 As Integer
Global outIndex24 As Integer
Global outIndex25 As Integer
Global outIndex26 As Integer
Global outIndex27 As Integer
Global outIndex28 As Integer
Global outIndex29 As Integer
Global outIndex30 As Integer
Global outIndex31 As Integer
Global outIndex32 As Integer
Global outIndex33 As Integer
Global outIndex34 As Integer
Global outIndex35 As Integer
Global outIndex36 As Integer
Global outIndex37 As Integer
Global outIndex38 As Integer
Global outIndex39 As Integer
Global outIndex40 As Integer
Global outIndex41 As Integer


ecco... spero di essere stato chiaro per quell'anima pia che ha deciso di darmi una mano! ;-)

grazie mille