|
Hi,
What are you assuming will or will not happen when you "bypass" the form load event?
Alan.
|
|
|
|
|
Scrap everything you have. Your application design is bad from the start. You can't "bypass" the load event in the form. The problem is you combined your app's business logic in with the UI code of the form. Move all of your buiness code to a seperate .DLL that both VB5 and VB.NET project can use and you solve all of your problems.
|
|
|
|
|
Yes true, but it is not possible to make a dll right now as the application is working on for years...
do you have other alternative
|
|
|
|
|
You simply don't have a choice. You cannot just call any function you want in any application. It doesn't work that way.
|
|
|
|
|
Hi, I have two projects doing different thing complied and working fine. I need to combine these two project and use one as main to call the other when you click from menu of the first one.
What i have done:
1. I have successfully add the other project using the project explore
What to do:
I want to call the this other project menu from another.
Please help
thanks.
Emma
|
|
|
|
|
You would create an instance of the main window of the second project and then show it with ShowDialog. Just like any form in your project.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
thanks for your response. That what i have done but generate error or did not give showDialog method when i call my instance.
see my code
Private Sub RestoreToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RestoreToolStripMenuItem.Click
Dim frmSecondMenu As New SecondMainMenu
frmSecondMenu. (this did have showDialog in the list of methods)
End Sub
if i type it as frmSecondMenu.ShowDialog() i have the following error
Error: Error 9 'showDialog' is not a member of 'System.Windows.Forms.SecondMainMenu'.
what will i do
|
|
|
|
|
Hi,
I want to call a private function (We can make the function public.) in VB.Net (The project type is windows application) from visual basic 5. VB.Net application is set up as an exe.
I appreciate your early response.
Rgds,
Rains
|
|
|
|
|
Your options are to make the VB.NET project a COM object ( can that be done with an exe ) or using WM_COPYDATA and interop, or some other messaging mechanism.
Making the function public won't help, VB5 is even more obsolete than VB6, it can't speak .NET.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
VB.Net project is an exe. we cant make it as a dll..it has a user interface...
can we tweak the code so that depending on from where it is called we can either call the form load or the function??
|
|
|
|
|
plz anyone answer my question
|
|
|
|
|
What specifically is your problem?
|
|
|
|
|
take you pick VB6, Crystal Reports, either one is a show stopper. Oh yeah and idiot on the keyboard.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i have developed project in vb 6.0 &report:crystal report database ms access 2007.each and every time report not fully display it ask refresh.then only i got fully report.thats my problem
|
|
|
|
|
You didn't ask one. Configure it, how ? Why would a product released in 2008 have the ability to talk to a product that became obsolete six years before ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i have developed project in vb 6.0 &report:crystal report database ms access 2007.each and every time report not fully display it ask refresh.then only i got fully report.thats my problem
|
|
|
|
|
I am trying to when I click on a name in linkbox1 to show all the data in access database table in my texboxes.
But it gives me this error "No value given for one or more required parameters"
Here are my Code. Don't know why it is not working
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim SqlStr As String
SqlStr = "Select * from tblokkies where luidraad = " & ListBox1.Items(ListBox1.SelectedIndex)
FillTextBox(SqlStr)
End Sub
Public Function FillTextBox(ByVal Sqlstring As String)
Dim OleDbConn As OleDbConnection = New OleDbConnection(ConnString)
OleDbConn.Open()
Dim MyDataReader As OleDbDataReader
Dim MyOleDbCommand As OleDbCommand = New OleDbCommand()
MyOleDbCommand.Connection = (OleDbConn)
MyOleDbCommand.CommandText = Sqlstring
MyDataReader = MyOleDbCommand.ExecuteReader
Try
Do While MyDataReader.Read
TxtLuidraad.Text = (MyDataReader.Item(1))
txtA1.Text = (MyDataReader.Item(2))
txtA2.Text = (MyDataReader.Item(3))
txtA3.Text = (MyDataReader.Item(4))
txtA4.Text = (MyDataReader.Item(5))
txtA5.Text = (MyDataReader.Item(6))
txtA6.Text = (MyDataReader.Item(7))
txtA7.Text = (MyDataReader.Item(8))
txtA8.Text = (MyDataReader.Item(9))
txtA9.Text = (MyDataReader.Item(10))
txtA10.Text = (MyDataReader.Item(11))
Loop
Catch err As System.Exception
MyDataReader.Close()
OleDbConn.Close()
OleDbConn.Dispose()
End Try
End Function
|
|
|
|
|
Wow, is your code ever illegible. Is this deliberate ?
What type is luidraad ? Should the item be in quotes ? What line is blowing up ?
Have you stepped through the code to see if the returned data has that many items in it ? Does VB really index by 1 instead of by 0 ? I guess it would.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Sorry my engilsh is not so good, what do you mean by illegble and deliberate.
Is there onther way do this this codeing.
Luidraad type = text (150)
No quotes
Can not see waht line is blowing up.
Did step true here is what I get when I press F8.
1. Click on 4th entry in listbox1 (Hendrik)
2. Dim Sqlstr as string (Sqlstr Nothing)
3. After F8 = Dim Sqlstr as string (Sqlstr "Select *from tblokkies where luidraad=Hendrik")
4. listbox1.items(listbox1.selectedindex) (Listbox1.items {System.Windows.forms.listbox.objectcollection)
5 After F8 = listbox1.items(listbox1.selectedindex) (Listbox1.selectedindex 4)
6. Filltextbox(Sqlstr) (Filltextbox Nothing)
7. Dim Oledbconn as oledbconnection = new oledbconnection(Connstring)
(OleDbConn {system.data.oleDbConnection}
(ConnectionString "Provider=microsoft.jet.oledb.4.0;data source=c:\blokkies\blokkies.mdb"
(ConnectionTimeout 15
(Conteiner nothing
(Database ""
(DataSource "c:\blokkies\blokkies.mdb"
(Provider "Microsoft.jet.oledb.4.0"
(Serverversion {"invalid operation. The connection is closed"}
(Site Nothing
(State Closed {0}
8. dim myoledbcommand nothing dbconn
9. after F8
(Myoledbcommand {system.data.oledb.oledbcommand}
(commandtext ""
(Commandtimeout 30
(commandtype text {1}
(connection nothing
(container nothing
(designtimevisible true
(parameters {system.data.oledb.oleparametercollection}
(Site nothing
(transaction nothing
(updatedrowsource both {3}
10. myoledbcommand.connection = (oledbconn)
(OleDbConn {system.data.oleDbConnection}
(ConnectionString "Provider=microsoft.jet.oledb.4.0;data source=c:\blokkies\blokkies.mdb"
(ConnectionTimeout 15
(Conteiner nothing
(Database ""
(DataSource "c:\blokkies\blokkies.mdb"
(Provider "Microsoft.jet.oledb.4.0"
(Serverversion "04.00.0000"
(Site Nothing
(State open {1}
11. myoledbcommand.commandtext =sqlstring = myoledbcommand.commandtext ""
12. After F8 =sqlstring = "select*from tblokkies where luidraad=Hendrik"
= myoledbcommand.commandtext = "select*from tblokkies where luidraad=Hendrik"
13. Mydatareader = myoledbcommand.executereader = nothing
after thisd it gives me the error.
Hope this help, I don't understand it quit yet.
|
|
|
|
|
hendrikbez wrote: 12. After F8 =sqlstring = "select*from tblokkies where luidraad=Hendrik"
= myoledbcommand.commandtext = "select*from tblokkies where luidraad=Hendrik"
I think Hendrik must be enclosed with '.
SqlStr = "Select * from tblokkies where luidraad = '" & ListBox1.Items(ListBox1.SelectedIndex) & "'"
try with select * from tblokkies where luidraad='Hendrik' from Access
|
|
|
|
|
celso_cabaleiro Thank you it is working.
I don't know how to do it, can you help me with this please
I want to use txtluidraad.text to do a search, and then when I type in the word, listbox must go to that one, must I add a new listbox or will the one that I have work. I don 't know how to use a search at all. Hope you can help me.
|
|
|
|
|
Hi all...
I am creating a one-to-one chat program for communication over LAN. I have done almost except one thing. When a user(1) wants to chat another online user(2), he clicks on his name and opens a private chat window. Now when user(1) types msg and click on send button then msg send to user(2).
Now the main thing I want to do is that when user(1) sends msg to user(2) through private chat window, same private chat window will automatically appear on user(2)'s computer screen if that window is not opened (same as other chat program like Y! Messenger,GTalk etc).
Suggest me how can I do this.
Thanks.
Gagan
|
|
|
|
|
The same way they do it. Have your app already running in the taskbar and listening for messages.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yes....My application is running at taskbar and listening for incoming messages,joined and left users etc.
Suggest me how can I do that.
Thanks.
Gagan
|
|
|
|
|
I don't understand. You said it's doing htat already, then you say 'suggest how to do that' ? Which bit are you not doing ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|