[not sure if this most appropriate place to post, but..] background: i am working on a, mostly, basic mp3 player, so its functionality is exactly how i want, not how M$, etc, thinks it should be (just a personal player for fun). i am, however, using the Windows media player COM component (sry if terms incorrect). i dont use the visual one though, i declare a player in code using "... as new WMPLib.WindowsMediaPlayer()", and create my own gui. and if it matters: it automatically put the DLLs AxInterop.WMPLib and Interop.WMPLib into the bin folder for my project... also, i downloaded the WMP.10.SDK, which its using. quick question: as of now, my mp3 player [basic functionality] uses anywhere from 15-24mb ram. i was wondering if there is a less memory-intensive mp3 control like this that i could use? [instead of WMP] update: sry, im using VB.net. i checked out the winAmp site, but could only find sdk for c/c++. input appreciated, thanks. ------------------------ Jordan. III
Nadroj
Posts
-
more efficient mp3 control? -
prevent form from closingim wondering how you can setup a form so it cannot be closed? i am trying to have a form so that the only way to get rid of it is to press a button on the form, which will only .hide() it. and another button on different form will .show() it, restoring all of it's window settings, etc. this is including when the user presses alt+f4 or hits the X (close) button, to hide rather than close the form. ... i was just reading up on it, and it seems to work like this:
Private Sub BrowserForm_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing e.Cancel() = True Me.Hide() End Sub
this the proper way to do this? thanks for any input. ------------------------ Jordan. III -
multiforms and objectsi think i got it to work, with help from this article ------------------------ Jordan. III
-
multiforms and objectsi have 2 forms and an object (WMPLib.WindowsMediaPlayer()), how can i access the object's members and form's members, throughout each other? yes, i did see the post from not too long ago about passing data between multiple forms.. i tried using shared, public, the 'module' method described.. cant seem to get it to work. any input appreciated, thank you. ------------------------ Jordan. III
-
selecting items in ListBox:-D thanks alot! is there a way to do this with a for..each loop? using the collection of items in the listbox? thanks again ------------------------ Jordan. III
-
selecting items in ListBoxi want to make a button on my form which will select all items in a listbox (and another button to deselect all). im not sure how to do this. also, i would like to do it with a for.. each loop, as im new to them.. not sure how to, in code, set the selecteditems (or whatever the property is, not sure which one to use).
Dim item As String For Each item In ListBox1.Items ListBox1.SelectedItem = ListBox1.Items.IndexOf(item) Next
is as far as iv got, but it doesnt seem to do anything.. any help appreciated ------------------------ Jordan. III -
very simple Enumerators, help please?im off to bed, but, i WILL definetly check it out. iv never heard of that method before, ill look into it! thank you very much! ------------------------ Jordan. III
-
very simple Enumerators, help please?summers over school is in, yet again. heh, well, for the past 5 months or so on my school vacation, i hadnt used VB.net. now im lost again :S first off: im not asking you to do my homework, im asking for help.. my project is as follows: two text boxes, and one button. i need to write a program to find the difference (number of days) between 2 entered days (ex, day1 = monday, day2= friday, difference = 4 days. i have an enum like this:
Private Enum DaysOfWeek Monday = 1 Tuesday Wednesday Thursday Friday Saturday Sunday End Enum
i also have 2 variables that i made of the enum type (startDay and endDay). i set startDay and endDay's value = their respective textboxes.text, which the user enters a day of week. i get cast from string to integer error (i know, because enums must only be integer values, right?) so how can i do this? (sorry if being broad, again, im not asking you to do my homework for me, im asking for help.) thank you ------------------------ Jordan. III
-
MIDI PLEASE, AGAIN AND AGAIN... -
MIDI PLEASE, AGAIN AND AGAIN...ive been wondering along time. does anyone know how to use MIDI instruments, etc, to create notes for output to speakers, in VB.net? it seems impossible, no one has said anything about it. ------------------------ Jordan. III
-
MIDI and VB.nethopefully im not being an annoyance with my repost but i cant seem to find anything for help with this. can someone please help me out on using MIDI instruments with vb.net? like, on how to make a simple MIDI piano player-type program, but in vb.net? i have downloaded some of the midi examples on CP, but most dont work because i dont have VS6 or 7, which is what the examples i can find are in. also they are mostly written in C# or C++, im sure there is a way to do it in vb.net... right? i want to rebuild my midi-based guitar assistant-type of program i wrote afew years ago in vb6, into vb.net Thanks in advance. ------------------------ Jordan. III
-
MIDI player helpafew years ago i made a guitar program in VB6 using midi instruments to produce the chords and notes for the guitar sounds. i forget how to do this, and moreso, dont know how to do it in vb.net can someone please lead me in the right direction on using midi instruments and how to produce certain notes with the selected instrument? thank you. if this is too vague let me know. ------------------------ Jordan. III
-
Harddrive Accessi thought it was all hardware, and in contrary i thought u could access the memory. we'll have ta wait and c for a more knowledgeable response. ------------------------ Jordan. III
-
Harddrive Accessi thought with win 2000/xp/nt you couldnt control it directly because of the core design of the os [shell/kernel]. i know sum1 will help you about this, because i sure cant lol. sum1 can reaffirm this or disprove it, as they will know more about it than me. edit: whoops, sry for repost ------------------------ Jordan. III
-
Using app.configi tried that but it gave me some weird error. ------------------------ Jordan. III
-
File associations & File Types Editorim not sure how to do that. post the source here or send me a zip of your project and ill chk it out. ------------------------ Jordan. III
-
File associations & File Types Editori tried this exact example when i made it for you, on my computer and it worked properly. if for whatever reason it isnt working properly, take the line where the string delcaration for fileName is. edit that line to something like
Dim fileName As String = System.Environment.CommandLine
instead. then test this string (with, ex, a msgbox) to see what it is actually returning when u try and open a file with the program. keep motifying it (like how i did, taking a substring from it) untill it works. i just built a new computer last nite and have yet to reinstall VS.net so i cant help with examples for now. ------------------------ Jordan. III -
Using picture boxes?no sorry i have never looked into creating objects at runtime, so i wouldnt know where to start. hopefully sum1 can post a how-to, and inform the both of us! ------------------------ Jordan. III
-
Using picture boxes?1- there is a property for the PictureBox object called
SizeMode
. set this toStretchImage
in order for the image to take the size of the pictureboxes' dimensions (itll stretch/shrink the image to the boxes' dimensions). ex:PictureBox1.SizeMode = StrechImage
in code, or simply set the objects property at design time (in properties window, of course) 2- to set the picture to be displayed in the picturebox, use itsImage
property. ex:PictureBox1.Image = Image.FromFile("C:\my Pictures\pic1.bmp")
. note: you can only use certain formats or u will get an error. i dont remember the full list but its most of the main ones (.bmp, either .jpg or .jpeg [i thought only 1 of the 2 worked], .gif, etc). i dont know how to programmatically create another picturebox at run time. hopefully sum1 can post info on it. ------------------------ Jordan. III -
File associations & File Types Editorok so you have associated your file type with your application in folder options > file types? that is step 1.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fileName As String = System.Environment.CommandLine.Substring( _ System.Environment.CommandLine.IndexOf(Chr(34) & " " & Chr(34)) + 3) 'this is now a string containing the exact path & filename which was opened with the program. fileName = fileName.Substring(0, fileName.Length - 1) 'then in this sub or another, do something with the file: '(in this case, open the file, and copy the text in it into a textbox) Dim inFile As IO.StreamReader = IO.File.OpenText(fileName) textBox1.text = inFile.ReadToEnd inFile.Close() End Sub
all you need here really is the 'fileName' string which i setup for you, and you can do what you want with it, or you can use the exact example above and test it out. let me know if this helps. [many thanks to the Rage man himself.] ------------------------ Jordan. III