Make A Gravity Application (with Speed Readings/music Player) For The Car?
Jun 3, 2012
I'm trying to make a gravity application (with speed readings/music player) for in the car.So I've found some sample code to create an event handler in C#, except I don't know any C#. This is the code to add an eventhandler:
motion.CurrentValueChanged += new EventHandler<SensorReadingEventArgs<MotionReading>>(motion_CurrentValueChanged);
How do I do this in VB.NET? as there is no CurrentValueChanged...
this is my first post. I just recently got vb and wish to learn a lot about it but I have no references...(book, good tutorial etc) I have always wanted to make applications for computers ever since I got on one 5-6 years ago. (I know you need code but I have no idea where to start. But, I am a fast learner.)
What i want to do is make a music player that will play a song in the .exe format, so an app will open and automatically play a song. This is to prevent ripping and copyright issues. I made a app using the WMP Com Component but that of course requires the file to be opened.
I'm trying to make a game involving falling objects and needing to click on them before they hit the ground. I have that part in place, but I was wondering how you made the mouse experience "gravity." I was planning on having the mouse fall at an increased rate as the levels got harder. Just to clarify, I want the mouse to be "pulled down" where the user would have to push the mouse up to keep it in place or to advance. I want to do this on both axes. This is what I have so far, but I think I'm way off because I'm getting nowhere the desired result. [code]
I'm making a speed card game [URL] for the final in one of my programming classes. I'm looking for a little assistance with how to go about getting it done the best way. I've included the code I have so far below. How does it look? What would you do differently? Would you do anything the way I did? I need to have one AI player and a human player.
Ok. I want to put a Music Player on my Windows Form App. I have the control on the form but i don't know which Import to use or how to get it to play the music I have on my computer.
I have written a hierarchical treeview music player that reflects the organisational structure of the music files on your disk drive. I just need to know how to rip and burn Cds using VB.net (without using any dependencies if possible). So far in my multi-media project, the only dependency currently is LAME.EXE for converting wave files to MP3 files - and even that dependency will go if I can successfully convert certain C++ listings to VB.
I making an music player with a trackbar who gets oppdated while the music is playing. My problem is that I have to move a the trackbar button.
This is my code: Dim TotalSeconds As Long = CLng(Form1.Player.TotalTime) ' 274445 Dim CurrentSecond As Long = Form1.Player.CurrentTime ' 10497 ' maxp is the maximum x location on my bar Dim nyp As ULong = CULng(((TotalSeconds / maxp) - CurrentSecond)) TB.Location = New Point(CInt(nyp), 11) Why is it return INF?
im making a Music Player in VS 2008 and everything is basicly working perfectly as i want, however i seem to be stuck at the "Pause/resume button"
so my question is, in the Windows Media player COM Components, is there a code for Resuming the current state on the Mp3 file and id assume it would be resume,[code..]
i made a mp3 music player and i used listbox to let the users see what songs they have added but i want them t be able save and load their song list. How can i do that?
I got some music player from the web, a cool one, and i tried to add him a playlist. i`ve change the entier interface.
I have like this - play botton - pause botton - stop button - TrackBar for song - timer for song lenght - a volume - a button for PLAYLIST.
This code is for Play:
Private Sub PlaySong() If (PlayerControl.URL <> "") Then PlayerControl.Ctlcontrols.play()
[CODE]...
It's actualy a shortcut for the button event. It checks if Url isn't empty, and if it isn't, start playing the song from that url. This is the code of the play button:
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click PlaySong() End Sub
Now i`m gonna talk about the Playlist button. When you enter the exe, the playlist is Visible, when you press the button it's hidden and so on.(it's made with if then condition).
The playlist it's actualy a ListBox called lplst and has some buttons: - Add - Delete - Save - Load - Clear
I`m gonna talk about the Add button. This button pops up a dialog box to open mp3 files to that FIleBox. And it get's ONLY the FILENAME! (without the URL or Location of it) This is the code for the Add button:
Private Sub ToolStripButton7_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton7.Click Dim openfile As New OpenFileDialog
[CODE]...
Before , the Add button was adding JUST the location (example: C:\blabla.mp3) and when i selected it and click play, it was playing the song. But now i wanted to show only the file name. I got some code on the listbox change too.
Private Sub lplst_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lplst.SelectedIndexChanged PlayerControl.URL = lplst.SelectedItem End Sub
This code changes the URL that plays. Depends what is the selecteditem. i browsed all the web , and i couldn't find anything.
Now the problem: I can change the Add button like this:
Private Sub ToolStripButton7_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton7.Click Dim openfile As New OpenFileDialog
[CODE]...
And this will link me like this: Filename - Filelocation.
But now the PlayerControl.URL = lplst.SelectedItem. code won't run the mp3 file from that location. How do i have to split the Filelocation from the Filename in the listbox?
I am trying to make a telnet application to communicate with a special video player I have, I have gotten the telnet session to connect to the video player (server) but it won't respond back....I think the problem might be with the coding...the strData string below is supposed to be the replies I get back from the server, but it won't show any strings on the screen.
So I am trying to make a program that allows you to move two shapes using two KeyPress events, one to move the first object and another for the second. It works, but it can only move one of the two objects, not both at the same time.
I am making a game in VB.NET using picture box's. I currently have a player sprite and other picture box's used as ledges,boundries,ect. I want to know how to be able to add gravity to my game, for example, if the player sprite walks off the edge of a ledge then he will fall rather then just continue walking.
I am making a Injector to inject hacks for First person shooters.On another forum.And A administrator said maybe I should add music to my next release so I said ok.Well is there a way to add music to a application.I'm new to coding. And I mean it! Just started last week.So is there a music thing or something?
Hey guys, I'm a new guy in VB.NET. I am proposing my final year project a title called music studio. My version of music studio is like real music video where we can play many sound at any time. For example, the application that I want to build can create many button and also add an audio along with it. And then, when we hit the 1st button, it play 1st audio. while 1st audio play, we also can hit 2nd button and 2nd audio is playing. for example, 1st audio is sound of man walking, and then 2nd audio is the sound of glass break. lastly 3rd sound sound of police siren play. Is it cool? so, my question is, is it possible the I can build an application by using VB.NET?
i want to make a be able to take apart an mp3 file to find the beats, and filter out different frequecies so i can make some lighting effects to go with the music. Does anyone know how i could do this in VB?
If I have posted this question in the wrong forum, please tell me how to find the correct forum.
I am working on an application that presents the average of a list of compass readings. The readings are wind directions. The problem occurs when the wind is oscillating around North. Some of the readings will be in the 300's, other readings can be 1, 2, 10, etc. degress. (A compass reads from 1 to 360 degress. 360 degrees is the same as 0 degrees.
You can't just average the numbers. For example, if you had two readings, 355 degrees and 5 degrees, just averaging the two results in an answer of 180 degrees. The correct answer is either 360 degrees or 000 degrees.
Most likely I can code data analysis logic to look for the problem, but I am hoping there is a simplier way. Does anybody know the answer?
I'm using the .NET SerialPort class to communicate with gauges. Every time a button on a gauge is pressed a reading value is sent over port. The problem I have is that if the gauge button is pressed while the program is off then when the program starts it fires the data received event for that existing data. I don't want this behavior -- I only want to collect readings done after the port is opened.
port = New SerialPort("COM1", 9600, Parity.None, 8, StopBits.One) port.Open() port.DtrEnable = True System.Threading.Thread.Sleep(100) port.ReadExisting() AddHandler port.DataReceived, AddressOf PortDataReceived
If I don't have the Thread.Sleep then the DataReceived event is fired for the previous gauge data. I'm guessing this is because the ReadExisting doesn't block and so when its called immediately after an open it just reads nothing. So if you call 'port.BytesToRead()' immediately after open its zero. If you call it 100ms after open its non-zero. I guess this makes sense -- it takes time after open to read the existing data. Another option is to call read and set the read timeout but that seems no different than Thread.Sleep except you have to catch an exception...