C# :: Program To Run Media Player With Saved Playlist

Oct 26, 2014

Is C# or any other programming language out there that can run like a program that has been installed on you PC? For example say i want my program to run Media player with a saved play list, run spotify, or run a search on the internet?

View 4 Replies


ADVERTISEMENT

C# :: Playing Video Without Windows Media Player?

Mar 26, 2014

I try to play a video I i don't know how.. I searched and i found some tips and articles, but all of it if about Windows Media Player. It's fine, but i need to play something lika an intro an i don't wanna show all that buttons of WMP.. I tried to hide it but no change.

View 2 Replies View Related

Visual C++ :: Playing Video Using Windows Media Player From A Buffer?

Oct 25, 2013

I am developing a VC++ application with windows media player component. play video from a video buffer data which i have?

View 2 Replies View Related

C# :: Custom Media Player Time Bar - Calculate Total Size And Proportion

Dec 30, 2014

Im just wondering how would i get a formula to calculate the total size and proportion of how far the media player has been played, in proportion with the size of the sizeable form, i need an int for the:

Width of formLength of movieHow long has been played by user

I have this code so far:

//The current position played! - Within the timer.tick event arg!
string splayed = axWindowsMediaPlayer1.Ctlcontrols.currentPosition.ToString().Split('.')[0];
int iplayed = Convert.ToInt32(splayed + 1);
//The total time of the movie/audio.
string stotal = axWindowsMediaPlayer1.Ctlcontrols.currentItem.duration.ToString().Split('.')[0];
int itotal = Convert.ToInt32(splayed);

[Code] ....

I have the "AxWindowsMediaPlayer" reference installed, but i need to know how it would work...

Attached image(s)

View 14 Replies View Related

Visual C++ :: How To Detect If Window Media Player Is Running In Full Screen Mode

Jan 21, 2013

How can I check if window media player is running in full screen mode & topmost in c++ MFC?

What I used is this logic:

I compared media player full screen coordinates to that of monitor coordinates.If they are same implies media player is in fullscreen.But it has one flaw.Whenever there are control(for play,pause) displayed in full screen in media player, coordinates are not coming same as that of monitor.

View 10 Replies View Related

C :: Matrix Program - Read Two Saved Text Files

Jan 29, 2013

Basically I am to create a program that will read two saved text files; one is [2x4] ~ (matrixA.txt) and another is [4x2] ~ (matrixB.txt). The program is supposed to read both text files, multiply them, and generate an output that will be saved as ~ (matrixC.txt).

So here is my horrible attempt at it:

Code:

#include <stdio.h>
int main() {
FILE * fileA;
FILE * fileB;
FILE * fileC;

[Code] .....

And these are the compile errors...

C:UsersLeDerpHW1.c: In function `main':
HW1.c:27: parse error before `int' //Line 28
C:UsersLeDerpHW1.c: At top level:
HW1.c:34: warning: parameter names (without types) in function declaration //35
HW1.c:34: warning: data definition has no type or storage class //35
HW1.c:35: parse error before `for' //37

[Code] .....

View 13 Replies View Related

C :: Program Where A Computer And Player Take Turns Rolling Dice

Feb 19, 2013

I am making a program where a computer and player take turns rolling dice.

There seems to be an issue somewhere in my loop where when the player selects from the possible dice choices, it rolls for the computer and does not select the choice and it immediately becomes the player's turn again.

I am trying to get it to where when the computer rolls the dice, it should display the list of possible values, and ask the user to hit the enter key in order for the computer to choose which value to select using the following command:

Code:
while ( getchar() != '
' ) ; I've tried it a hundred times and no matter where I put the command it still skips the computer's turn.

Below is my code:

Code:
while (compscore < 99 && playerscore < 99){
printf("You have rolled the following pair of dice:
");
a =("%i ", rand() % (MAX_VAL - MIN_VAL + 1) + MIN_VAL);
b =("%i ", rand() % (MAX_VAL - MIN_VAL + 1) + MIN_VAL);
multiply = a * b;

[Code] ....

View 11 Replies View Related

C++ ::  Reading Files Saved On Computer

Jul 20, 2014

I can't seem to get my program to read a file that's saved on my computer. Here's my code:

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
ifstream inputfile;
string name;

[Code] ....

View 6 Replies View Related

C++ :: Social Media Control Panel

Aug 12, 2014

I'd like to make a control panel for different social media to control multiple account and have proxy support. I think i need to learn multithreading and socket programming right ?

View 1 Replies View Related

C++ :: Sorting Data Saved Using Shell Algorithm

Feb 4, 2013

#include <iostream>
using namespace std;
class CD {
public:
static const int num = 100;
char publisher[num], title[num], location[num];

[Code] .....

View 1 Replies View Related

Visual C++ :: Value Of ESP Was Not Properly Saved Across A Function Call

Sep 22, 2012

I'm working with a cross-platform library which defines a function to obtain function addresses from a shared object (i.e. a DLL on Windows). Here's my modified version of the function which works (albeit only on Windows of course):-

Code:
typedef void (*SuilVoidFunc)(void);
/** dlsym wrapper to return a function pointer */
static inline SuilVoidFunc
suil_dlfunc(void* handle, const char* symbol) {
return (SuilVoidFunc)GetProcAddress((HMODULE)handle, symbol);
}

Now, here's the original (cross-platform) version which is giving me a run time error on Windows:-

Code:
typedef void (*SuilVoidFunc)(void);
#define dlsym GetProcAddress
/** dlsym wrapper to return a function pointer */
static inline SuilVoidFunc
suil_dlfunc(void* handle, const char* symbol) {
typedef SuilVoidFunc (*VoidFuncGetter)(void*, const char*);
VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym;
return dlfunc(handle, symbol);
}

That original version fails at the final return line. The error message says "The value of ESP was not properly saved across a function call".

I'm assuming there's a problem with the declaration of VoidFuncGetter (i.e. it'll assume that the caling convention for GetProcAddress() is cdecl when in fact, it's stdcall). What's the most elegant way to fix this and still keep cross-platform compatibility?

View 1 Replies View Related

C++ :: Editing Saved Records In A Text File?

May 19, 2012

i have this program that i am undertaking.....this project needs to store customer details, edit them and delete them...now i am facing the problem of deriving a code to edit those details...

MY CODE

HTML Code:
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main () {
int choice [1];
string name;

[code].....

View 4 Replies View Related

Visual C++ :: CDHtmlDialog Not Working With CSS Media Queries

Feb 21, 2014

I have a CDHtmlDialog app in which am trying to add a CSS media query in the HTML file as shown below, but it doesn't work.

@media (max-width:20em) {
table, thead, tbody, tfoot, th, td, tr { display:block; }
tr + tr { margin-top:1em; }
}

The same CSS works fine if i open in a browser like IE, FireFox, Chrome. But inside the CDHtmlDialog app this doesn't work.

I am using Visual Studio 2012 for development and have IE 11 installed in my machine.

View 1 Replies View Related

C/C++ :: Reading Books Saved In DAT File And Inserting Them Into Linked List

Mar 13, 2015

I'm having a problem in my Library assignment, this section of my code is for reading in books saved in a 'book.dat' file on my desktop and inserting them into the linked list. It kind of works, but say if there is two books in the file, it only saves the second book twice.

eg in book.dat:
123 book1 Tolkien 2009 0
111 book2 Rowling 2009 0

So once these are read in, and I call my method displayAll(), it would display the second book twice..

void importFromFile(FILE *fp) {
struct book *aBook;
struct node *aNode;
aBook = (struct book *)malloc(sizeof(struct book));

[Code] .....

View 6 Replies View Related

C++ :: Simple AI That Follows Player

Apr 10, 2014

I'm having some problems with implementing an AI. It should be just a simple AI that follows player. Here is the code that I got so far:

(float)DirectionX = Circle->GetX() - AI->GetX();
(float)DirectionY = Circle->GetY() - AI->GetY();

(float)Hyp = sqrt(DirectionX * DirectionX + DirectionY * DirectionY);

DirectionX /= Hyp;
DirectionY /= Hyp;

x += DirectionX * 3;
y += DirectionY * 3;

This is what I got so far. It creates a vector in a direction I want to move, then just normalizes the vector. Simple as that. But I'm having 2 problems..

AI moves towards player only when Im at like the end of screen and the AI is on the other side, I must keep a certain distance for it to be able to move towards me. Basically, its not constantly moving towards the player. I also tried it with trig, using atan2 for angle and sin / cos for speed. Also didn't work, same result.

The other problem is when I want to add i.e 5 more AIs. For each new AI it creates, it makes a new update.. So, to kinda clear it up. If I'm in middle of the screen and an AI is spawned above me, it will move towards me. But when after that one, 2nd AI spawns beneath me, both 1st and 2nd AI move up. Basically, previous AIs take the update from last one that is created. For updating I'm using lists, objects and iters.

View 3 Replies View Related

C# :: Three And Four Player Uno Game

Feb 26, 2015

I'm having some problems figuring out 3 and 4 player games in an Uno game I'm working on. I'm not sure what specifically the problem is, however. I've tried everything I can think of; I'm at a loss for what to do next. Two player games work perfectly, which makes the nonfunctional 3 and 4 player games seem odd to me. Here is the code:

public void MoveOpponents() {
if (nextPlayer == 0) {
if (Main.dir == Direction.Clockwise) nextPlayer = 1;
else nextPlayer = numPlayers - 1;

[Code] .....

The code for the human player is in Update(), but I won't show that because it's actually quite similar to the above code.

Right now what it's doing is jumping all over the place, making opponent 2 play before opponent 1, then I play, then opponent 1 plays. Then I play again. It's really messed up.

View 6 Replies View Related

C++ :: Giving Score To Correct Player

Jul 22, 2013

I have programmed a game where you guess a number (1-6) and if the number is equal to the random number then give the player score + 10. But if I have selected for example 4 players then if the game will give player 1 a score it gives player 2 a score instead? What can be causing this error?

Code:
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int cube;
int number[4];

[Code] .....

View 6 Replies View Related

C++ :: How To Make Minimax Multi Player

Nov 29, 2013

I have pseudo code for the minimax algorithm but i was wondering what i would need to add to make it work with many players (n players)?

score minimax(state s, int n)
if (n = 0 OR s is a terminal node) {
if win position for program
return +inf;
if loss position for prg

[Code] ....

View 3 Replies View Related

C++ ::  SDL2 / Player Not Moving Constantly

Feb 16, 2015

Im using SDL2 but I'm encountering an unexpected error. I have implemented the same method to move as in my old Projects, but the Player appears to be stuck...

The Player is stuck for maybe half a second, and then everything works as it should, but every time I Change direction or i start moving the Player is stuck for a short Moment.

#ifndef _PLAYER_HPP_
#define _PLAYER_HPP_
#include <iostream>
#include <string>
#include "SDLGameObject.hpp"
class CPlayer : public CSDLGameObject

[code]....

View 9 Replies View Related

C++ :: Two Player Tic Tac Toe Game - Use Enums When Possible To Represent Values

Apr 19, 2013

Here is the code I have written so far. My problem is that when the second user enters its position the last user's position is wiped of the board. I want to know how I can hold that position and keep doing so until the game is finished. I thought that calling the previous function would do that (and you can see where I have put that into a comment) but it doesn't.

Code:
#include <iostream> //includes header file
using namespace std;
//function prototypes
void printLeftUpper(int i, int j);
void printMiddleUpper(int i, int j);

[Code] ....

View 1 Replies View Related

C :: Create Labyrinth And Player Who Needs To Go Through The Map Collecting Objects

Jan 1, 2015

I actually need to create a labyrinth and a player who needs to go thru the map collecting objects (like bags, water etc...). I planned to do the map with a bidimentional array (5x5) but I dont know how to put different objects on an index.. Ex: array[3][2] will have a Botte of water and an energy bar..

Someone told me to use structs but I dont really understand how this would work... I've tried so many times bit I cant do it...

View 2 Replies View Related

C :: Create Structure That Stores Player Name And Score

Aug 8, 2013

We are told to modify this code following the instructions given within the code. It is a tictactoe program.

Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

// Create a structure that stores a player's name (up to 20 characters) and score (# of wins)
// Call the struct Player

void info(void) {
printf("

[Code] ....

I've ended up with the following code, but the part about the name of the datafile is giving errors upon running the program.

Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

// Create a structure that stores a player's name (up to 20 characters) and score (# of wins)
// Call the struct Player
typedef struct {

[Code] ....

View 4 Replies View Related

C/C++ :: Swapping Like Function - Replace Player In A Team

Feb 14, 2015

I have a question about one function in my program. Write a function that will replace players in a team. New player gets in the game, and takes the place of one that leaves. Prototype of function is:

void replace(TEAM *p,PLAYER newplayer,int num)

where second parameter is new player, and the third is a jersey number of player who leaves the game.
Two structures are defined as:

typedef struct {
char name[25],surname[25];int number;
}PLAYER;
typedef struct {
char nameofteam[25];int numberofplayers;PLAYER *players;
}TEAM;

First I tried to read which player should get out, but that didnt work:

printf("which player should get out?");
do {
scanf("%s",p->players.number)
} while(p->players.number);//Choose one of previously read players

Second thing is to read a new player and replace him with the chosen who leaves.

View 3 Replies View Related

Visual C++ :: Video Player - Set Of RGB Frames To Be Displayed At 25 FPS

Nov 19, 2013

I have a code which is a set of rgb frames to be displayed at 25 fps to make it look like a video. While I createWindow invalidate and update it based on a timer, the video plays fine, but the buttons of Play, Pause etc hangs during the time video is playing.?

View 11 Replies View Related

C++ :: Playing Selected Music File In Default Player

Dec 15, 2014

How does one go about Playing a music file that they picked and playing it in the default player?

I already have this:

#include <iostream>
#include <windows.h>
using namespace std;
int main(){
string wavfile = "C:Documents and SettingsJasonMy DocumentsJasonMy MusicDummy.wav";

[Code] ....

View 5 Replies View Related

C++ :: Text Game - How To Make Player Go Back To Previous Location

Mar 19, 2013

I have started making a text adventure game.

if (Choice == 2) {
cout << "" << endl << "You follow the light to the end of the hallway, you find your self in a room" << endl
<< "with natural light coming from a hole in the ceiling." << endl << "" << endl << "You hear the door you just came through, slam behind you!" << endl << "" << endl
<< "There are three possible directions." << endl << "" << endl << "Do you:" << endl << "" << endl << "1) Go forward" << endl << "" << endl << "2) Go left" << endl

[Code] .....

Ignore the if (Choice == 2) at the beginning, that's linked to some previous code.

I want to make the player go back to the first bit of text but i'm not sure how to do this if they keep choosing to go back and forth from one location.

I first thought of doing it by just putting the text back in after they have chosen the option, but I can't do this infinite times.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved