BiH



#16 02.02.2015-15:52
roko Offline
Clan
Registrovan/a od: 02.02.2009-00:23
Komentari: 236


Subject: Re: VB.NET Cod vo VB6 Cod
Što ti treba pomoći ?
Dali želiš od tog dll. kroz vs2010 napraviti ocx kontrolu da ti radi u access-u ili je dll več napisan za korištenje u vb6,VBA ?
Ako želiš da integriraš dll u access kroz neke funkcije to ti mogu poslati kod ali ako je već napisan kod za VBA pogledaj koje koji su ti ulazni ii izlazni parametri kroz 'dim oas object set o = dll pa dalje.
Gore si napisao registraciju dll-a kroz regasm.exe
32 bita
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe C:\neki.dll /codebase /tlb
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\regasm.exe C:\neki.dll /codebase /tlb
64 bita
Framework64\v2.0.50727\RegAsm.exe
Framework64\v4.0.30319
Naravno za win 7 ,8 moraš UAC spustiti na low level za 64 bita
još u regedit
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000000
↑  ↓

#17 02.02.2015-16:27
Gjoreski Offline
Super Moderator
Registrovan/a od: 02.02.2009-22:24
Komentari: 1,653


Subject: Re: VB.NET Cod vo VB6 Cod
Eve vaka :
Jas ne sakam da go koristam ova dll bidejki ne moze da se ubaci vo VB i VBA .
Uspeav da nabavam specifikacija po koja e praven ovaj dll i sega sakam vrz osnova na ovaa specifikacija da napravam funkcija koja ke ja koristam vo programot kako zamena za ova dll odnosno preku ovaa funkcija treba da se stampaat fiskalni racuni dnevni izvestai i drugo.

Ovie kasi koristat COM porta za komunikacija.
Com Portata ne mi e problem problem mi se redosledot na comandite koi gi isprakame na fiskalnata kasa
↑  ↓

#18 02.02.2015-17:52
Gjoreski Offline
Super Moderator
Registrovan/a od: 02.02.2009-22:24
Komentari: 1,653


Subject: Re: VB.NET Cod vo VB6 Cod
Funkcijata bi izgledala slicno na ova
DownloadIzvorni kod (Visual Basic):
  1. Public Function FiskalnaPrint()
  2.    
  3.     Open "COM1:115200,N,8,1" For Output As #1
  4.    
  5.    
  6.     Print #1, "1/8"
  7.     Print #1, "2/S/P/123/1.000/1000"
  8.     Print #1, "3/S/Bread//1.000/1000/1/1/0"
  9.     Print #1, "4/12.00/0/0/0"
  10.    
  11.     Close #1
  12.  
  13. End Function

Samo mene mi treba nekoj da go razgleda upatstvoto bidejki jas nemam mnogu iskustvo so pravejne na vakov tip na komunikacija
↑  ↓

#19 03.02.2015-17:38
roko Offline
Clan
Registrovan/a od: 02.02.2009-00:23
Komentari: 236


Subject: Re: VB.NET Cod vo VB6 Cod
Serial Port Communication Script

OVO TI RADI

http://dev.emcelettronica.com/...-excel-vba
↑  ↓

#20 03.02.2015-17:48
roko Offline
Clan
Registrovan/a od: 02.02.2009-00:23
Komentari: 236


Subject: Re: VB.NET Cod vo VB6 Cod
A za tvoj primjer možeš i manje koda

dodaj si Microsoft Comm Control ana formu MSCOMM_neki

With MSCOMM_neki
.Handshaking = 2 - comRTS
.RThreshold = 1
.RTSEnable = True
.Settings = "9600,n,8,1"
.SThreshold = 1
.PortOpen = True
' Leave all other settings as default values.
End With

Private Sub MSComm_neki _OnComm()
Dim InBuff As String

Select Case MSComm_neki .CommEvent
Case comEventBreak ' A Break was received.
Case comEventCDTO ' CD (RLSD) Timeout.
Case comEventCTSTO ' CTS Timeout.
Case comEventDSRTO ' DSR Timeout.
Case comEventFrame ' Framing Error.
Case comEventOverrun ' Data Lost.
Case comEventRxOver ' Receive buffer overflow.
Case comEventRxParity ' Parity Error.
Case comEventTxFull ' Transmit buffer full.
Case comEventDCB ' Unexpected error retrieving DCB]

' Events
Case comEvCD ' Change in the CD line.
Case comEvCTS ' Change in the CTS line.
Case comEvDSR ' Change in the DSR line.
Case comEvRing ' Change in the Ring Indicator.
Case comEvReceive ' Received RThreshold # of chars.
InBuff = MSComm_neki .Input
Call HandleInput(InBuff)
Case comEvSend ' There are SThreshold number of
' characters in the transmit buffer.
Case comEvEOF ' An EOF character was found in the
' input stream.
End Select

End Sub

Sub HandleInput(InBuff As String)

msgbox InBuff
End Sub

Provaj pa vidi što ti vrača dll pa napiši errors i Events
↑  ↓

#21 03.02.2015-17:55
Gjoreski Offline
Super Moderator
Registrovan/a od: 02.02.2009-22:24
Komentari: 1,653


Subject: Re: VB.NET Cod vo VB6 Cod
Znam jas da go rabotam ovaj ocx MSComm32 no ne sakam da go koristam bidejki loso funkcionira na win8 64bit.

Napisav jas pogore deka komunikacijata ne mi e problem problem mi se comandite i redosledot na na isprakajne kon kasata.
↑  ↓

#22 04.02.2015-13:49
roko Offline
Clan
Registrovan/a od: 02.02.2009-00:23
Komentari: 236


Subject: Re: VB.NET Cod vo VB6 Cod
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000000
↑  ↓

Stranice (2): 1, 2

All times are GMT +01:00. Current time: 15.10.2019-18:13.