Alıntı YapVERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer1
Interval = 100
Left = 3720
Top = 360
End
Begin MSCommLib.MSComm MSComm1
Left = 4200
Top = 2400
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
BaudRate = 2400
End
Begin VB.TextBox gelen
Height = 735
Left = 600
TabIndex = 4
Top = 2280
Width = 2775
End
Begin VB.CommandButton gonder
Caption = "Gonder"
Height = 375
Left = 720
TabIndex = 3
Top = 1680
Width = 855
End
Begin VB.TextBox giden
Height = 495
Left = 600
TabIndex = 2
Top = 1080
Width = 2655
End
Begin VB.CommandButton port_kapa
Caption = "Kapa"
Height = 375
Left = 2040
TabIndex = 1
Top = 480
Width = 615
End
Begin VB.CommandButton port_ac
Caption = "Aç"
Height = 375
Left = 720
TabIndex = 0
Top = 480
Width = 615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim gelendata As String
Private Sub Form_Load()
Dim Instring As String
MSComm1.CommPort = 1
MSComm1.Settings = "2400,N,8,1"
MSComm1.InputLen = 0
MSComm1.PortOpen = True
End Sub
Private Sub gonder_Click()
If MSComm1.PortOpen = True Then
MSComm1.Output = giden.Text
End If
End Sub
Private Sub port_ac_Click()
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
Print "Port açık"
End If
End Sub
Private Sub port_kapa_Click()
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
Print "Port Kapalı"
End If
End Sub
Private Sub Timer1_Timer()
If MSComm1.PortOpen = True Then
gelen.Text = MSComm1.Input
End If
End Sub
Private Sub yazdir_Click()
Print gelendata
End Sub
yukarıdaki program daha önce çalışıyordu.
Bu gün açtığımda problem çıkardı. VB6.0 kullanıyorum. Text görünümde sorun yok ama görünümü form yaptığımda hata verip kapanıyor.
br log dosyası var aşağıda.
Alıntı YapLine 18: Class MSCommLib.MSComm of control MSComm1 was not a loaded control class.
Line 21: The property name _ExtentX in MSComm1 is invalid.
Line 22: The property name _ExtentY in MSComm1 is invalid.
Line 23: The property name _Version in MSComm1 is invalid.
Line 24: The property name DTREnable in MSComm1 is invalid.
Line 25: The property name BaudRate in MSComm1 is invalid.
mscomm32.ocx yükledim system32 klasörüne ama çözüm olmadı.
Bu konuda fikirlerinizi bekliyorum.
Vb de ilk program denemem.
Zannedersem mscomm32.dll yi sadece windows klasörüne yüklemişsiniz.Bunu vb içine import etmeniz gerekiyor.Bunun için sol tarafta bulunan kontrol box da (label,text,image,command button vs. olduğu kısım) boş bir alana sağ tıklayıp özelliklerden Customize Toolbox u seç ve Components kısmından Browse ile Mscomm32.ocx dosyasını seç sol taraftaki kontrol box da mscomm butonunu göreceksin.Onu sürükleyerek projenin içine bırak.Sanırım sorun çözülecektir
Vb reinstall yaptım
problem çözüldü. Fakat bir sonraki gün aynı problem ile tekrar karşılaştım. Cd yanımda olmadığı için aynı işlemi henüz yapmadım.
Ben hergün reinstallmi yapacağım bu programı ?