|
Hi
i have populated data to treeview from sql so i want display information on the list box about certain childnodes e.g(product id ,product price)when ever a node is selected from treeview.
Mamphekgo
|
|
|
|
|
Sorry, what is the question? You probably have all the info you need in the node/children.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You should use the code on AfterCheck of Treeview.
Cheers
Anubhava Dimri
anubhava.prodata@gmail.com
925016195
|
|
|
|
|
how do i create my own real media player on vb6 and if possible the media player should also play avi and mp3 formats too (an all in player). Is there a tutorial that can tell me how to make the player.
|
|
|
|
|
Bad Spinky !
No yelling, we are not blind.
Using vb6 when you don't have to is bad, no supper for you tonight.
First download a newer programming tool, for example from here: http://www.microsoft.com/express/default.aspx[^] and learn about .net
To answer your question: you could use google to find programming tutorials, but it is very unlikely that you'll find one that will teach you exactly what you want.
You'll probably have better luck breaking down the idea of a mediaplayer into functionality-parts:
(find media files, how to determine which file is video, and which is music, etc, etc). On such smaller functionalities you are more likely to find tutorials, articles and/or examples. At least you should be able to find tutorials or examples that show similar processes, which you can then adapt to your needs.
Good luck with your project,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Johan Hakkesteegt wrote: Bad Spinky !
gold
|
|
|
|
|
1. TURN CAPS LOCK off
2. I suggest using .NET - the express versions are free
3. Try Google, you will probably get some guidelines if you look for individual bits like how to play an mp3, how to play an avi etc
4. Good Luck
Bob
Ashfield Consultants Ltd
|
|
|
|
|
VB6 is rubbish. It's also a dead language.
You can only create your own media player in C++. Or, you can just import a media player control and pretend you wrote a media player, I suspect that's what you really want to do.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: You can only create your own media player in C++.
Why not in C#?
|
|
|
|
|
I am using vb.net 2005 with Crystal reports version 10.
I get this problem when I try and load my application on a users PC. Works great with me but I have a problem in a user's PC.
Any ideas?
"Could not load file or assembly 'CrystalDecisions.Shared,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one
of its dependencies. "
|
|
|
|
|
IS_Assessor wrote: I am using vb.net 2005 with Crystal reports version 10.
I get this problem when I try and load my application on a users PC. Works great with me but I have a problem in a user's PC.
Any ideas?
"Could not load file or assembly 'CrystalDecisions.Shared,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one
of its dependencies. "
Does your project setup on the user's PC contain the Crystal distribution files?
|
|
|
|
|
In my references I have,
CrystalDecisions.CrystalReports.engine
CrystalDecisions.ReportSources
CrystalDecisions.Windows.Forms
On the installation setup I have
Crystal_Database_Access2003.msm
Crystal_Database_Access2003_enu.msm
Crystal_Managed2003
Crystal_regwiz2003
On the user's PC they have no Crystal report references.
I hope this is helpfull.
|
|
|
|
|
The Business Objects site will have a list of runtime distribution requirements for Crystal Reports.
|
|
|
|
|
This problem is generated by Crystal Report Component.Because it have not access of those component.
You must to add the file CrystalReportsRedist2005_x86.msm with your setup.
You can download from internet it's freeware of Crystal Report.
this msm has two version
CrystalReportsRedist2005_x86 For 32 bit Machine
CrystalReportsRedist2005_x48 For 64 bit machine
Cheers
Anubhava Dimri
anubhava.prodata@gmail.com
|
|
|
|
|
What is the difference between Return and Exit Sub?
|
|
|
|
|
Return is used in functions to return the derived value or object back to the calling sub/function.
Exit Sub is failry self explanatory, used to exit a sub before the sub has run it's full course.
Somebody correct me if I'm wrong but is 'exit sub' generally regarded as 'dirty' programming? I say this as I am lead to believe that if a sub is coded correctly, it doesn't need to exited early.
|
|
|
|
|
Liqz wrote: Somebody correct me if I'm wrong but is 'exit sub' generally regarded as 'dirty' programming?
Yes, it's generally preferred that a method should have only one exit point, so that the code is easier to follow.
You should however consider if adding more exit points makes the code significantly simpler. Sometimes the robustness of the code stands in conflict with the elegance of the code, and it's robustness that makes the code work well.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Next time you have a question like "what is the difference between x and y" try searching google for something like "x vs y". Its usually quite effective.
try this
|
|
|
|
|
Hiii
The Return statement is used in Function to return the any value that is retrieve in function and return the control on calling function.
and then Exit Sub statement is used in the subroutine to exit from current routine.
exit sub return the control on last line in our routine(on End Sub statement)
May be this post is useful for you.
Thanx
Mitesh Khatri
|
|
|
|
|
When used within a function, the return statement allows a value to be specified; that value will be given to the calling program.
Within function 'foo', for example, one could replace:
foo = 5
Exit Sub
with
Return 5
The Return statement may also be used without an argument, in which case it will behave like 'Exit Sub'. Earlier versions of VB required "Exit Sub", while other languages use "Return". Generally, I prefer Return, though that may be a matter of style. Note that in prior versions of VB, Return was a valid statement, but it meant something very different from in vb.net.
As for whether performing a 'Return' in the middle of a function constitutes good structured programming, I would suggest that there are cases where it is appropriate and places where it is not. If a sub or function will sometimes do nothing, it's better to use an 'early abort' test and return statement than to enclose the entire routine in a giant 'if'. On the other hand, a Return statement in the middle of a routine that generally runs to the end can sometimes cause confusion.
The biggest thing to watch out for, historically, has been with routines that begin some action that needs to be cleaned up. An early-exit test which skips the routine before it does anything requiring cleanup poses no problem, but returns in the middle can pose a problem. If the routine has allocated any resources, they need to be deallocated before the routine exits. This has typically been handled by putting some cleanup code before every Return or Exit statement. Such an approach could frequently lead to bugs, if cleanup requirements changed but not all the cleanup code was adjusted.
In a modern language like vb.net, structures like Try/Finally blocks and Using statements can alleviate some of the cleanup issues associated with mid-function exits. On the other hand, they can also cause code to be executed in confusing sequence. If a 'Return' or 'Exit Sub' is performed within a Try/Finally block, the 'Finally' clause will be executed, but code following the block will not.
|
|
|
|
|
If I'm not mistaken, "Return" simply tells your function to return its result to whatever called it (for instance boolean true or false). Exit Sub ends the current subroutine.
|
|
|
|
|
Hello all, I found a problem with my database connection. It prompout 2 error message,the following are the 2 message prompout:
1. An unhandled exception of type 'System.ArgumentException' occurred in mysql.data.dll
2. An unhandled exception of type 'System.TypeInitializationException' occurred in Unknown Module. Additional information: The type initializer for "POS_.Module1" threw an exception.
Public ObjMyComm As New MySqlCommand
Public ObjMyRead As MySqlDataReader
Public MyConn As MySqlConnection = New MySqlConnection(Connect())
Public strSetKey As String
Public ADD_BINLOG As String = "ADD_BINLOG"
Public Conn As String
Public Conn_localServer As String
Public Conn_localDb As String
Public Conn_localDbUID As String
Public Conn_localDbPassword As String
Public Conn_localDbPort As String
Public Function Connect()
'Data load from App.Config file
Conn_localDb = ConfigurationSettings.AppSettings("MyLocalDb")
Conn_localServer = ConfigurationSettings.AppSettings("MyLocalServer")
Conn_localDbUID = ConfigurationSettings.AppSettings("MyLocalUID")
Conn_localDbPassword = ConfigurationSettings.AppSettings("MyLocalPass")
Conn_localDbPort = ConfigurationSettings.AppSettings("MyLocalPort")
Conn = "DATABASE=" & Conn_localDb & ";DSN=" & Conn_localDb & ";OPTION=3;PORT=" & Conn_localDbPort & ";SERVER=" & Conn_localServer & ";UID=" & Conn_localDbUID & ";"
MessageBox.Show(Conn)
Return Conn
End Function
Public Function LoadBlnStartupData(ByVal strSetKey As String)
Dim test As String
Try
MessageBox.Show("**** = " & strSetKey & " " & TerminalLocate & " " & TerminalID & " ")
MessageBox.Show(TerminalLocate)
'ObjMyComm = New MySqlCommand("SELECT * FROM pos_setting WHERE LocationCode=' " & TerminalLocate & " ' AND SettingKey='ADD_BINLOG' ", MyConn)
ObjMyComm = New MySqlCommand("SELECT * FROM pos_setting", MyConn)
MyConn.Open()
ObjMyRead = ObjMyComm.ExecuteReader
If ObjMyRead.Read Then
test = ObjMyRead.Item(0)
MessageBox.Show("This is " & test & "")
Else
MessageBox.Show("No value")
End If
MyConn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
MyConn.Close()
End Try
End Function
The 1st Error are pointing to > Public MyConn As MySqlConnection = New MySqlConnection(Connect())
Could anyone give me some solution about this matter?
Thank you for reading.
|
|
|
|
|
Hi,
Are you sure your connectionstring is correct ?
I use the following one without any issues (VS2005):
Private sConnString As String = String.Format("server={0};port=3306;user id={1};password={2};database={3};pooling=false", _
My.Settings.dbserver, My.Settings.dbuser, My.Settings.dbpassword, My.Settings.database)
Private conn As New MySqlConnection(sConnString)
conn.open()
|
|
|
|
|
Hello Noctris,
I doesn't found any problem with my connection string as I have create a udl file to check if I get the right connection but it shows me the connection string is correct. I'm using VS 2003 .NET. Is that problem cause by this version of Visual Studio? I heard ppl said that is alot of problem in this version of Visual Studio. Anyone have other suggestion for this solution?
Regards
Drex
|
|
|
|
|
Hmm.. couldn't tell you that.. i never used the Mysql.NET connector in VS2003.. always 2005
at the last part in your "catch ex to exception", can you change to MessageBox.Show(Ex.ToString) and this ?
The actual error will give a lot more information about the issue.
|
|
|
|