Vb 6.0 Programming Guide by webmonkey(m): 2:02pm On Jul 21, 2011 |
I am interfacing a document management system into a banking application. The banking application specify that a COM must be develop and deploy as a .dll on the banking server.
The functions it implements are
1. View 2. Detach 3. Print 4. Attach 5. etc.
I have created the COM using Actice DLL and have implemented the above routines in their Functions. I have also created a separate project using StandardEXE and design the form that will be rendered in the DLL when a user click View button
My problem now is how do I call this form i have design in DLL project? Is there another way that I could have implemented this strategy?
|
Re: Vb 6.0 Programming Guide by webmonkey(m): 12:07pm On Jul 22, 2011 |
Come on all our VB Gurus in the house don't let this simple task defeat you! You are developing a COM (Component Object Model) for a third party interface.
You have written the COM i.e.
Option Explicit
Enum AttachStatus
NotComplete = 0 Complete = 1 Error = 2 End Enum
Private Function View(docId As String, windowTitle As String, _ MisysSessionId As String, WebPageUrl As String, _ success As Boolean) As Boolean Call displayMenu(title as Variant)
End Function
Private Function AttachTo(name As String, description As String, _ windowTitle As String, MisysSessonId As String, _ WebPageUrl As String, success As Boolean) As Boolean
End Function
Private Function EnhanceAttachTo(name As String, description As String, _ windowTitle As String, MisysSessionId As String, _ XmlSearchCriteria As String, WebPageUrl As String)
End Function
Private Function AttachComplete(MisysSessionId As String, docId As String, _ status As AttachStatus, success As Boolean) As Boolean
End Function
Private Function AttachTimeout(MisysSessionId As String, success As Boolean)
End Function
Private Function Scan(name As String, description, _ windowTitlw As Boolean, _ MisysSessionId As String, WebPageUrl As String) As Boolean
End Function
Private Function ScanComplete(MisysSessionId As String, docId As String, _ ScanStatus As String, success As Boolean) As Boolean
End Function
Private Function ScanTimeout(MisysSessionId As String, success As Boolean) As Boolean
End Function
Private Function Printa(docId As String, windowTitle As String, _ MisysSessionId As String, WebPageUrl As String, _ success As Boolean) As Boolean
End Function
Private Function Delete(docId As String, success As Boolean) As Boolean
End Function
Private Function Detach(docId As String, success As Boolean) As Boolean
End Function
Private Function SetName(docId As String, name As String, success As Boolean) As Boolean
End Function
Private Function SetDescription(docId As String, description As String, success As Boolean) As Boolean
End Function
Private Function GetName(docId As String, name As String, success As Boolean) As Boolean
End Function
Private Function GetDescription(docId As String, name As String, success As Boolean) As Boolean
End Function
Private Function IsAvailable(success As String)
End Function
See the view function. I made a call to a displayMenu(name As Variant) a method in a another project form. How do I call it from this project. How do I make this project to have access to the other project? If it was Java you'd import the package or class referencing the packing.
|
Re: Vb 6.0 Programming Guide by Kobojunkie: 11:02pm On Jul 27, 2011 |
I have to confess that I have no clue what you are even asking here. What exactly are you trying to do and please speak in simply terms so I can better understand. I think I get what you are asking but I am not exactly sure of it. You seem to be confusing terms a bit. |
Re: Vb 6.0 Programming Guide by Nobody: 4:03am On Jul 28, 2011 |
|
Re: Vb 6.0 Programming Guide by Fayimora(m): 4:23am On Jul 28, 2011 |
[size=14pt]HEheheheheheh, How do you make the font to just be permanent. I dnt use it cause i dnt wanna keep typing font code all the time[/size] |
Re: Vb 6.0 Programming Guide by Andrew3(m): 10:06am On Jul 31, 2011 |
, wait, i work with comport in gsm programming, wonder if ma code will be of use to u, just check it out i used this to read cpu and avilma+betty data from phone and write also ok via com port, hope it helps, you can modify to suite your criteria. someone teachme how to post code on this forum? http://www.4shared.com/document/Tg_agBdN/com.html |
Re: Vb 6.0 Programming Guide by Andrew3(m): 10:25am On Jul 31, 2011 |
::Andrew:::
Dim comPorts As Array 'Com ports enumerated into here Dim rxBuff As String 'Buffer for receievd data
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'When the form loads 'Enumerate available Com ports and add to ComboBox1 comPorts = IO.Ports.SerialPort.GetPortNames()
For i = 0 To UBound(comPorts) ComboBox1.Items.Add(comPorts(i)) Next
'Set ComboBox1 text to first available port ComboBox1.Text = ComboBox1.Items.Item(0) 'Set SerialPort1 portname to first available port SerialPort1.PortName = ComboBox1.Text
'Set remaining port attributes SerialPort1.BaudRate = 19200 SerialPort1.Parity = IO.Ports.Parity.None SerialPort1.StopBits = IO.Ports.StopBits.One SerialPort1.DataBits = 8
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'When Tx button clicked 'Clear buffer rxBuff = ""
'If port is closed, then open it If SerialPort1.IsOpen = False Then SerialPort1.Open()
'Write this data to port SerialPort1.Write(TextBox1.Text & vbCr)
'Pause for 800ms System.Threading.Thread.Sleep(800)
'If the port is open, then close it If SerialPort1.IsOpen = True Then SerialPort1.Close()
'If the buffer is still empty then no data. End sub If rxBuff = "" Then GoTo ends
'Else display the recieved data in the RichTextBox RichTextBox1.Text = rxBuff
ends: End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged 'When ComboBox1 selection is changed, we need to update SerialPort1 with the new choise 'But only if the port is closed!
If SerialPort1.IsOpen = False Then SerialPort1.PortName = ComboBox1.Text Else : MsgBox("Operation only valid when port is closed.", MsgBoxStyle.Exclamation, "Error"
End If
End Sub
Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived 'This sub gets called automatically when the com port recieves some data
'Pause while all data is read System.Threading.Thread.Sleep(300)
'Move recieved data into the buffer rxBuff = (SerialPort1.ReadExisting)
End Sub
End Class
|