|
I must be missing something in your problem statement, but here's what I'm thinking. If you add an event handler to an object and that object fires the event, your event handler will execute. Subsequently adding the object to a collection has no impact on the event mechanism.
Are you trying to work with events raised by the collection itself, such as when items are added or removed?
|
|
|
|
|
Hello,
It's me again.
I am using the .NET IDE.
I am wanting to get a little information and insight about the best approach to accomplish something. I am wanting to integrate an MP3 recorder into an application. It needs to work simply. I want to pass a filename for the mp3 file, click the record button, when done click the stop button, then click the save button. No option to rename it. The program will handle the naming of the file. This will be used by a doctor and needs to be as simple as possible. The only user interface that will need to be implemented in the mp3 player/recorder should be only what a tape recorder is capable of. What is the best route to use? Are there some components in .NET that will enable any of this? Is there any API function call that can be used? A utility to integrate? The reason it needs to be MP3 is because of filesize. We will be dealing with up to 15 minute voice recordings. Any starting suggestions would be greatly appreciated.
Thanks,
Kendal
|
|
|
|
|
I'm teaching myself VB.NET and have come across a problem with either the tutorial book (Visual Basic .NET Programming with Peter Aitken, Chapter 9, page 191) or the software (Microsoft Visual Studio .NET).
The problem I'm getting is after typing in code from example in book:
Public Class UseOverloadedConstructor
Private pName as String
Public Overloads Sub New(ByVal Val As String)
pName = Val
End Sub
Public Overloads Sub New()
pName = ""
End Sub
Public Property Name() As String
Get
Name = pName
End Get
Set(ByVal Value As String)
pName = Value
End Set
End Property
End Class
I get an error in the build. Saying that Overloads don't work with New!
What is the problem? What am I missing?
Can anyone help?
Thank you
|
|
|
|
|
you cant use New as an overloads sub , change the name of the sub :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MyNew("my string")
'/// set the text to the name
MsgBox(TheName) '/// check TheName now contains the correct info
End Sub
Private pName As String
Public Overloads Sub MyNew(ByVal Val As String)
pName = Val
End Sub
Public Overloads Sub MyNew()
pName = ""
End Sub
Public Property TheName() As String
Get
TheName = pName
End Get
Set(ByVal Value As String)
pName = Value
End Set
End Property
switch(twinsOnWay)
{
case ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
break;
|
|
|
|
|
Thank you for your help.
I appreciate it very much.
Congratulations on your new additions to your family too!
|
|
|
|
|
Constructors don't need to be explicitly overloaded like other methods. You can simple create all of the New methods (constructors) you want, as long as they have unique signatures. If you rename the method to something like MyNew, it becomes an instance method and will not be used as a constructor.
|
|
|
|
|
Thank you very much for helping me. You have given a better look at the way Contructors work. I just wish the book I bought had been better informative. I guess you get what you pay for. Thanks again!
|
|
|
|
|
I am new to vb I have just made simple calculator in this language now I want to have (ACCESS)database connectivity with vb Please let me know the website or any halping material that can serve for thsi purpose.
Reply me soon
|
|
|
|
|
Hi,
At what level are you wanting to access the database (Read/write or full management i.e create /delete table)? Are you using VB6 or VB.net? What version of Access are you using? All these questionsneed to be answered to point you in the right direction.
Alan ...
|
|
|
|
|
Hi Alan,
I have just bought my VB.NET Software so that I can start teaching oneself programming. I seem to be facing untold difficulty in getting started.I do not have experience in any of the previous VB versions. Could you help with any information on what I should do to get out of the confusion. Any material, Websites I could use?
Ben
|
|
|
|
|
Hi Ben,
My own opinion is that you need to learn the (old) basics of VB before attempting to convert to .Net.
I think that anyone should understand the development of individual programs before getting in to the intricacies of the new environment.
There are many good books and sites that you can use to help you get started. The 'Dummies' books are helpful but the one that I recommend to my students is 'Visual Basic 6 Complete' from Sybex.
It's cheep but good.
Hope this helps
Alan ...
|
|
|
|
|
Hello Alan,
Thank you for your advice. But are VB commands the same as those of VB.NET? Since I have acquired VB.NET Software, can I use it as a tool for teaching myself the basics of VB? Or will I need to get a different compiler for VB?
Ben
|
|
|
|
|
Take a look to this website:
http://www.w3schools.com/ado/ado_examples.asp
Bye,
LAURA
|
|
|
|
|
Look into MSDN. It has a lot of good articles for Access db connectivity
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
Hi guys..
one quick question...
in VBScript...(for web) how can I subsitute the IE icon on the top left corner of my web pages, for a personalized Icon??? Ive seen around, but have no idea how to obtain it.
thanks
Jon
X-ZD Designs
|
|
|
|
|
|
:(Help!
I'm trying to load an icon file into a picturebox using the following code:
PictureBox1.Image = Image.FromFile("cow.ico")
When executed an "Out of Memory Exception" is thrown every single time. My development machine has 1GB of RAM, and when this happens I have well over 1/2GB of physical memeory available, never mind the page file.
The rest of the program isn't very big. There is an array of about 3000 elements in there, but the exception is thrown before that array is initialized or filled.
Could this be a problem with my icon file? I use it in several other places with no problems... It does have every possible icon size/colour depth but is only 49K on the drive.
What is also curious is that this line works fine (it follows the above) when I comment the picturebox line out:
Me.Icon = new Icon("Cow.ico")
-Allan
|
|
|
|
|
i just tried it and it worked fine :
PictureBox1.Image = Image.FromFile("C:\7.ico")
you must have the exact path of the image in there or it will error.
switch(twinsOnWay)
{
case ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
break;
|
|
|
|
|
Hello Friends,
I wanted to freeze the columns from datagrid like how we have functionality in Excel.
If any know how to do then pls tell me how to do.
If u send me demo project having with above functionality then it will be easy for me to understand.
Reply me as soon as possible.
|
|
|
|
|
Hi
Ive written a "select folder" dialog using a DriveListBox & a DirListBox . The limit for this is that i can only open folders on local or mapped drives.
I would like to update this to match the windows standard tree which includes the desktop throu to network places - allowing UNC paths to be opened.
Any pointers gratefuly recived..
Ta.
|
|
|
|
|
Try the SHBrowseForFolder[^] function (you're using VB6, not VB.NET, right?).
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
|
Hi,
I am having a form with a datagrid control. I have few textboxs and comboboxs to receive data from user. On compliting the entry in these textboxs and combo boxes, the user presses a command button which enters the contents to the datagrid. and it clears all the textboxs,comboboxs to added the new contents. And then next record in entered to the datagrid. Finally on pressing a command button only the two records should be added to the database.
1. How to add data to datagrid by each cell. I have done it using datasource.
2. Is it possible to temporary display data and on pressing a button it has to perminently add to database.
3. Can we add more than one record at a time in datagrid.
Thank you,
Anu.
|
|
|
|
|
Dear friend,
You can use dataset to store the information. The datagrid is actually set it's datasource to the datagrid. So when the dataset is updated, the datagrid will update too.
Regards,
Cherhan
p/s: Feel free to email me at leoforum2003@hotmail.com if u need further help.
|
|
|
|
|
Hi Cherhan,
Let me thank you for every thing.
Actually I am using VB.6, can I use dataset in it. Sorry if I have asked a basic question. I am very new to VB. I am learning on my own.
It will be helpful if u could write little bit in detail. I mean algoritham.
Thank you very much
Anu
|
|
|
|