|
Thanks for getting back and providing me with the information. As below, this should be enough for me to work something out.
|
|
|
|
|
|
Thanks for getting back and providing me with the information. This should be enough for me to work something out.
|
|
|
|
|
I want a simple program using "File Mapping" for communication betrween two processes.............the commncation can be either using dialouge or console communications ............Thank you please help me out its urgent.Am writing code in VB 6.0
|
|
|
|
|
This forum will not supply you with a fully functioning solution.
You must make an attempt to solve your problem, then post a question where you are stuck.
This sounds like a homework assignment, so you need to make an effort towards a solution.
Start building your program, then come back with specific questions.
|
|
|
|
|
- Your subject is non-descriptive, not helpful at all.
- It's not urgent, we're volunteers.
- VB6 is deprecated, it's dead. No new software is written in it, it's no longer sold, it's not supported.
- We don't supply programs/complete source code. It's a forum for developers, doing development.
FWIW; there's a FileSystemWatcher in .NET that easy to use, and VB.NET is free to download and use. If one app is launched from the other, I'd suggest using stdio, reading and writing to the console-window. If they're on separate computers, look into WCF.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have four textboxes. Each one is filled by selecting a date from the monthcalendar (VS win form). While I handled most of the problems, such as a dbnull, I discovered this little "oops". I use the same type of handle for each daterangeevetargs:
Private Sub MonthCalendarPO_DateSelected(sender As Object, e As DateRangeEventArgs) Handles MonthCalendarPO.DateSelected
JobPOdateTextBox.Text = e.Start.ToShortDateString
MonthCalendarPO.Visible = False
End Sub
A click of a picture box to hide and show the calendar:
Private Sub PictureBoxPO_Click(sender As Object, e As EventArgs) Handles PictureBoxPO.Click
If MonthCalendarPO.Visible = False Then
MonthCalendarPO.Visible = True
Else
MonthCalendarPO.Visible = False
End If
End Sub
I removed the custom validation too. So, I will not post. The problem exists even without checking the date format.
Each date is filled and visible in a textbox. Yet, when clicking the "save" button, only one date will remain in a textbox and save on submit changes (dates are bound to a bindingsource). As I have read and and read some more, I feel it must be the daterangeeventargs.
Worth noting, if you manually enter the date into the textboxes, all four dates will save on submit changes. For now, I have resolved to a submit changes to the database after each date selection. This is certainly not ideal or a good practice.
Bindingsource is filled as system.linq.iqueryable(of namespace.tablename). Data class is Linq2SQL.
Any ideas on why this type of behavior is experienced?
|
|
|
|
|
The handler is overwriting the data in the textbox when it is called. Change it to a concatenation;
Private Sub MonthCalendarPO_DateSelected(sender As Object, e As DateRangeEventArgs) Handles MonthCalendarPO.DateSelected
JobPOdateTextBox.Text += e.Start.ToShortDateString
MonthCalendarPO.Visible = False
End Sub
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks again. What would I do without your brain. I was not even looking at the string development in any manner. I should have known that. My languages are a little mixed up some days. Dumb newbie thing ... LOL
|
|
|
|
|
In VB6.0 Do you know the name of the control cell grid in the image above there are two lines in the header and the grid can color, see attached image. we can see in the figure, in the title (framed blue rectangle) is the 3rd day 9 was split into two lines and grid can be colored as: red, blue, ... the name of a grid control on the name?
http://www.crocko.com/E4517D1F93C34B85AC5820941DAE1FFC/chamcong.jpg[^]
|
|
|
|
|
Your question doesn't make any sense and I'm not installing a downloader from that site to see your image.
Post your image on a site like Flickr and rewrite your post so it makes sense and you might get somewhere.
Oh, and you might want to drop all VB6 development and move up to something that hasn't been dead for over 7 years now, like .NET.
|
|
|
|
|
I am trying to develop an application like TeamViewer but I don't how it would be. If anyone knows about this Please tell me.
|
|
|
|
|
|
Hi Friends
I'm working on a project that Read & Write from COM ports.
http://s2.picofile.com/file/7680529565/03_05_2013_11_44_28_%D8%A8_%D8%B8.jpg
But i have some problems!
I define a thread in a Buttom to read from Port in Background because when i send a text to port and other device did'nt send any thing the program become hang!!
therefore :
Dim t As New Threading.Thread(AddressOf Recieve_Data)
t.IsBackground = True
t.Start()
and Recieve_Data():
Sub Recieve_Data()
While True
associatedChar = ChrW(SerialPort1.ReadByte)
RichTextBox2.Text &= SerialPort1.ReadExisting & " " & CStr(Now) & vbCrLf
RichTextBox2.SelectionStart = RichTextBox2.TextLength
RichTextBox2.ScrollToCaret()
End While
End Sub
but when i run project i receive this error:
http://s3.picofile.com/file/7680529137/03_05_2013_11_43_48_%D8%A8_%D8%B8.jpg
Complete Code is:
Public Class Form1
Dim associatedChar As Char
Dim ok As Image = Global.SadeghAPP.My.Resources.OK
Dim err As Image = Global.SadeghAPP.My.Resources.Err
Dim disconnect As Image = Global.SadeghAPP.My.Resources.Disconnect
Dim connect As Image = Global.SadeghAPP.My.Resources.Connect
Dim aboutStr As String = "Author: Sadegh Ghafoori" & vbCrLf & "Version: 1.0.0" & vbCrLf & "March 2013"
Private Sub ComboComPort_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComPortNum.SelectedIndexChanged
SerialPort1.PortName = ComPortNum.Text
If ComPortNum.SelectedIndex >= 0 Then
Message.Text = ""
BaudRateBox.Enabled = True
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendButton.Click
Try
SerialPort1.Open()
Catch
End Try
If SerialPort1.IsOpen = True Then
Message.ForeColor = Color.Green
Message.Image = ok
Message.Text = " Device Is Connected !"
RichTextBox1.Text &= DataTextBox.Text & " " & CStr(Now) & vbCrLf
RichTextBox1.SelectionStart = RichTextBox1.TextLength
RichTextBox1.ScrollToCaret()
SerialPort1.Write(DataTextBox.Text)
Else
Message.ForeColor = Color.Red
Message.Image = err
Message.Text = " Device Not Connected !"
End If
End Sub
Private Sub ConnectButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConnectButton.Click
Try
SerialPort1.Open()
Catch
End Try
If SerialPort1.IsOpen = True Then
SendButton.Enabled = True
ConnectButton.Enabled = False
DisConnectButton.Enabled = True
ComPortNum.Enabled = False
BaudRateBox.Enabled = False
ParityCombo.Enabled = False
StopBitCombo.Enabled = False
RichTextBox2.Enabled = True
RichTextBox1.Enabled = True
DataTextBox.Enabled = True
Dim t As New Threading.Thread(AddressOf Recieve_Data)
t.IsBackground = True
t.Start()
Message.ForeColor = Color.Green
Message.Image = ok
Message.Text = " Device Is Connected !"
PictureBox1.Image = connect
Else
Message.ForeColor = Color.Red
Message.Image = err
Message.Text = " Device Not Connected !"
PictureBox1.Image = disconnect
End If
DataTextBox.Select()
End Sub
Private Sub DisConnectButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisConnectButton.Click
PictureBox1.Image = disconnect
DisConnectButton.Enabled = False
RichTextBox2.Enabled = False
RichTextBox1.Enabled = False
DataTextBox.Enabled = False
SendButton.Enabled = False
BaudRateBox.Enabled = False
ConnectButton.Enabled = False
ComPortNum.Enabled = True
SerialPort1.Close()
Message.ForeColor = Color.Red
Message.Image = err
Message.Text = " Device Disonnected !"
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BaudRateBox.SelectedIndexChanged
SerialPort1.BaudRate = BaudRateBox.Text
If ComPortNum.SelectedIndex >= 0 Then
Message.Text = ""
DataTextBox.Enabled = False
SendButton.Enabled = False
RichTextBox1.Enabled = False
RichTextBox2.Enabled = False
ConnectButton.Enabled = False
StopBitCombo.Enabled = True
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
RichTextBox2.Text = ""
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
RichTextBox1.Text = ""
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
MsgBox(aboutStr)
End Sub
Private Sub ComboBox1_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopBitCombo.SelectedIndexChanged
If StopBitCombo.Text = "One" Then
SerialPort1.StopBits = IO.Ports.StopBits.One
ElseIf StopBitCombo.Text = "OnePointFive" Then
SerialPort1.StopBits = IO.Ports.StopBits.OnePointFive
ElseIf StopBitCombo.Text = "Two" Then
SerialPort1.StopBits = IO.Ports.StopBits.Two
End If
DataTextBox.Enabled = False
SendButton.Enabled = False
RichTextBox1.Enabled = False
RichTextBox2.Enabled = False
ParityCombo.Enabled = True
End Sub
Private Sub ParityCombo_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ParityCombo.SelectedIndexChanged
If ParityCombo.Text = "None" Then
SerialPort1.Parity = IO.Ports.Parity.None
ElseIf ParityCombo.Text = "Even" Then
SerialPort1.Parity = IO.Ports.Parity.Even
ElseIf ParityCombo.Text = "Odd" Then
SerialPort1.Parity = IO.Ports.Parity.Odd
ElseIf ParityCombo.Text = "Mark" Then
SerialPort1.Parity = IO.Ports.Parity.Mark
ElseIf ParityCombo.Text = "Space" Then
SerialPort1.Parity = IO.Ports.Parity.Space
End If
ConnectButton.Enabled = True
End Sub
Private Sub Recieve_Data()
While True
associatedChar = ChrW(SerialPort1.ReadByte)
RichTextBox2.Text &= SerialPort1.ReadExisting & " " & CStr(Now) & vbCrLf
RichTextBox2.SelectionStart = RichTextBox2.TextLength
RichTextBox2.ScrollToCaret()
End While
End Sub
End Class
|
|
|
|
|
You are trying to access your Richtextbox from within a thread which isn't allowed, you need to create a delegate to make it happen
have a read of this
http://stackoverflow.com/questions/1331009/cross-thread-operation-not-valid-vb-net[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
thank
but i can't change because i'm beginner!!
plz help me to change the code
I want to show the string or text that receive from COM port
in RichTextBox2 without stop working app from other work.
|
|
|
|
|
Hi,
I developed vb6 application it is working fine in win xp,win 2003 but not running win 7(64-bit). It threw following error popup.
Component
after received this error i placed
system32 floder that OCX in win7(64bit) again it threw error popup
The module "mscomct2.ocx" may not compatible with the version of Windows that you
what i do. please help me.
|
|
|
|
|
You don't put it in System32 on a 64-bit system.
It goes in the C:\Windows\SysWow64 folder and has to be registered using REGSVR.
As for that compatibility warning message, if you continue to use VB6, you will see more and more of it as VB6 has been dead for ... lets see now ... 7 years. I HIGHLY suggest you abandon all VB6 developement and move to VB.NET. You can get a free version here[^]
|
|
|
|
|
|
I want to create a chat pod that integrates with facebook.
The chat will be in my windows vb.net application.
|
|
|
|
|
Congratulations on picking a project. Please, proceed!
ooorrrrr did you have a question you meant to ask, but didn't?
|
|
|
|
|
Yes , it is a question ??
|
|
|
|
|
No, it isn't. It's a statement of what you want to do.
The question would be a description of the problem you're having, which you haven't provided.
|
|
|
|
|
Hi ppl,
I have a vb6.0 application working with sql 2005 service. we have planned to refresh the sql service to sql 2012.I am not sure of how far vb6 is compatible with sql2012. It would be great if someone could let me know whether vb6 compatible with sql2012 server.
Can anybody here share the problem they faced after the such migration.
Stripelesstiger
|
|
|
|
|
The question is pointless. Neither has any direct impact on the other as VB6 doesn't know what an SQL Server is and SQL Server doesn't give a rats ass what programming language was used to generate the query that it's executing.
So, yes, it'll work.
|
|
|
|