|
manni_n wrote: i made a c++ project long back.
now i am learning dot net..
i want to add an interface now on vb.net..
but i dont know how to add .cpp file in vb.net
can anybody help.?
What you can do is to either compile the C++ project into a DLL and add a reference to it in VB.NET, or you can convert your C++ project to VC++ .NET project and add a reference to the whole project.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi,
I made my download manager in VB.Net but I don't konw how to set it as default for IE 6 and also for IE7 ?
Any idaes?
Thanks,
Dan
|
|
|
|
|
There is no Download Manager in IE, so no way to set one.
|
|
|
|
|
I think I need to explain more. I have created the download manager like flashget,freedownloadmanager,Getright and the other ones... They all have the option to set them in ie as default so when a download begins the ie show thier interface instead of its' orignal.I want to do same thing.
|
|
|
|
|
I don't know how it does it, but IE doesn't have this "option". Maybe if it was written as a AddOn to IE you get this ability. I can't tell you because I've never written anything for IE.
|
|
|
|
|
Hi,
Yes IE doesn't have any options but we can do it using some registry help.I think I found the perfect answer from this link : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2154635&SiteID=1
Thanks,
Dan
|
|
|
|
|
Hmmm... I never knew about that one.
|
|
|
|
|
Oh .. Never mind
|
|
|
|
|
Hi:
I have a problem, i'm programming under vb.net 2005 express edition, i have a main window with some panels with controls over they, well, i have a track control who is scroll to change the window opacity, i was this method in another programs and the window change the opacity without problems, but in this program my windows is darkness when i change the opacity value, only first time, why?.
The track control is over slipt panel but i need this panel to what the user change the meters of panel, could be the problem reason?, if yes what could im made?, thanks very much for your help
|
|
|
|
|
Hi haggenx,
I also have the same problem . Sometimes it runs ok & sometimes it shows the Darkness. I think it may be because of Graphic card or.. ??
Thanks,
Dan
|
|
|
|
|
oops, and not exist a method to cancel this problem? , well, thanks very much for your help.
|
|
|
|
|
Hi,
Yes I'm still looking for the answer and whenever I will get it I will post it here
Dan
|
|
|
|
|
well, thanks for your help
|
|
|
|
|
I have an XmlDocument (System.Xml) that i want to add to and do various other stuff but i want to split the routines down. I've read that ByVal is 'safer' to use and possibly quicker than byref so i am proposing to layout my functions as below...
Imports System.Xml
'Declaration
Dim XmlDocObject as New XmlDocument
XmnlDocObject = InitialiseXml(XmlDocObject)
Private Function InitialiseXml(ByVal v_XmlDocObject as XmlDocument) as XmlDocument
'Temp object
Dim TempXmlObject = v_xmlDocObject
'Do something with temp object......
'Return object now processing is finished
Return TempXmlObject
'Destroy temp object
TempXmlObject = Nothing
End Function
What i would like to know is if the above is good / bad practice?
Anything thing wrong with this way?
Is this the preferred way as opposed to using Byref or am i creating extra objects which will
lie around in memory (until GC see fit to get rid)?
Regards
|
|
|
|
|
Your code is incorrectly written so it really doesn't matter which one you use. What you've done is definitely bad practice. No, ByVal is not "safer", nor is it "quicker". The two are used for different reasons.
The way you're writing your code, you're writing a function that returns an XmlDocument, the one that's passed in, and you don't have to.
Since you're passing in a Reference type (any class instance), ByVal passes the reference to the object, not the object itself. Passing in an object ByRef passes in a reference to the reference of the object, which doesn't really give you anything. So, since your function is getting a reference to the object on the heap, it can modify that object and not return anything.
Dim XmlDocObject As New XmlDocument
InitializeXml(XmlDocObject)
Private Sub InitializeXml(ByVal xmlDocument As XmlDocument)
' Do whatever you need to do to "xmlDocument"
' Do not "return" anything since you're modifying
' the original object.
End Sub
|
|
|
|
|
Thanks, i'm currently upgrading from VB6 to .net and want to start off on a firm footing employing some good practices.
I agree with Dave's response, anybody else with an opinion more than welcome though.
Many Thanks
|
|
|
|
|
Hi,
Does anyone have any examples in VB/VB.NET on how to either merge 2 wav files togetger or to play them consec utively in code ?
Thanks
|
|
|
|
|
If the files have the same sample rate, sample size (bits, sign) and mono/stereo setting, you can just extract the data from the files, merge and save with a new header.
---
single minded; short sighted; long gone;
|
|
|
|
|
"just" might be pushing it a bit as there are a number of possible encodings, some of which requires knowledge of the encoding to combine.
|
|
|
|
|
Open that files in binary mode and just add the beginning of the second to the end of the first.
But also you will have to change the header info. Just the file Size part.
|
|
|
|
|
I need to copy all files from one file to another..Could someon help
|
|
|
|
|
check
System.IO.Directory.GetFiles()
System.IO.File.Copy()
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
If you're using VB.NET 2005, you can use that handly little "My":
<br />
For Each sfile As String In My.Computer.FileSystem.GetFiles( My.Computer.FileSystem.SpecialDirectories.MyDocuments,FileIO.SearchOption.SearchAllSubDirectories,"*.*")<br />
<br />
My.Computer.FileSystem.CopyFile(sFile, "C:\Lalala")<br />
Next<br />
|
|
|
|
|
Could you please explain wat is going on
|
|
|
|
|
sure
to find all the files in a folder, and do something with each file (like copy them) i used the "For Each" statement.
For Each sfile As String In My.Computer.FileSystem.GetFiles( ..
so sfile is a string with all the filenames located in the specified folder (in my case, My Documents)
<br />
My.Computer.FileSystem.GetFiles(My.Computer.FileSystem.SpecialDirectories.MyDocuments, FileIO.SearchOption.SearchAllSubDirectories, "*.*")
or could be anything, like
My.Computer.FileSystem.GetFiles("C:\Tatata")
then each file was given the command to be copied to "C:\Lalala"
My.Computer.FileSystem.CopyFile(sFile, "C:\Lalala")
and then ends the loop:
Next
i hope that helps.
|
|
|
|