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
ADVERTISEMENT
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
View Related
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
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
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
Sep 15, 2014
how to put comparision condition in order to caculate total number of comparision in selection sort
static void selectsort(int[] data, int n)
{
int i, j;
for (i = 0; i < n; i++)
[Code]....
View 1 Replies
View Related
Mar 26, 2013
I have a program that needs to calculate the total for three stores payrolls.
Inputs would be the three stores payrolls
Output would be the total of all three
I HAVE to use the while statement.
I have also read the articles on the while statement on here and on other sites. I'm having trouble because every site I've seen so far has only been giving examples of numbers(like counting down or repeating a statement so many times).
Code:
#include <iostream>
#include <cmath>
using namespace std;
int main() {
//declare variables
int storePayroll = 0;
int totalPayroll = 0;
int storeNum = 0;
[Code] .....
View 6 Replies
View Related
Oct 21, 2012
How can I calculate the total of pages for all file(pdf,word,excel,txt...) types in a directory with c#?
View 2 Replies
View Related
Dec 3, 2012
I have a window form with datagridview,textbox,button and listbox. In datagridview i have added a column. In first row i have given the value like 7000,
second row 2500,
third row 7000,
fourth row 1000,
fifth 1300,
sixth 9000....n number of row:
if i enter 12000 in textbox1 then it will calculate the total in particular rows in datagridview.And the total should be less than 12000 what we have entered the value in textbox1.
The result will display in listbox..
like first greater value is 9000+2500=11500 ,
second greater value 7000+1000+1300=9500,
other third greater value is 7,000.
So i have given a sample code where i cannot get the solution ..
double search;
search = double.Parse(textBox1.Text);
double sum = 0;
for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) {
double se2 = Convert.ToDouble(dataGridView1.Rows[i].Cells[0].Value.ToString());
if (se2 == search) {
[code]....
View 5 Replies
View Related
May 24, 2013
How would i calculate a surface that up to 10^5 squares cover. The info you get is xpos,ypos and width for each square.
How would you calculate the total surface covered (if any overlap only one counts).
Cannot use a big array of bools as the memory limit is 512 MiB.
View 2 Replies
View Related
Dec 17, 2014
I want to calculate the total some of delay pf receiving Side Packet . Code is as Follow ..
What is weird that even if i invoke a sleep of 2 sec ,than its show delay always zero. Delay will be in microsec ..Is there any problem with logic or anything else..
Code:
do
{#pragma omp parallel private(nthreads, tid) {
/* Obtain thread number */
tid = omp_get_thread_num();
if (tid == 0) {
nthreads = omp_get_num_threads();
[Code]...
View 2 Replies
View Related
Feb 27, 2014
Write a program which is used to calculate GPA based on the grades from different courses Input by the user. User should be able to enter as many course unless they choose to quit. Once the user has completed entering the data, the program should be able to provide a feedback on the GPA. Where A=4, B=3, C=2, D=1.
View 1 Replies
View Related
Sep 3, 2014
// Purpose: calculate total cost given the tax values
#include <iostream>
#incluse <string>
using namespace std;
int main() {
double purchasePrice, stateTaxAmt, countyTaxAmt, totalCost;
//Display purchase price
[Code] ....
View 2 Replies
View Related
Jul 15, 2014
I made my own custom message/dialog box.
I have a template mock up view using xaml. I have a viewmodel that raises the message property. I binded the message property to a textblock inside my xaml.
Since my messages are different for every viewmodel I have.
E.g.in every viewmodel, I have something like
messagewindow.Message = "This is a new message";
dialogService.ShowDialog(Success, messageWindow);
In one of my messages, I want to make the font bold and different color for a specific message segment.
How can I do that without messing up with the other messages that inherit from the xaml or code behind?
Currently, I'm not using any code behind and a lot of the examples online I've seen use code behind and/or don't have dynamic message textboxes.
View 5 Replies
View Related
Sep 20, 2014
I want to print a report half sheet in A4 size..
I tried to change paper size in coding and in properties also but no use..so what is the correct code to change as custom size of report.
View 1 Replies
View Related
Mar 5, 2013
Write a program that calculates the total grade for N classroom exercises as a percentage. The user to input the value for N followed by each of the N scores and totals. Calculate the overall percentage (sum of the total points earned divided by the total point possible) and output it as a percentage. Sample input and output it as a percentage. Sample input and output is shown below.
How many exercises to input?
score1: 10
total points possible: 10
score2: 7
total points possible: 12
score3: 5
total points possible: 8
Code:
# include <iostream>
using namespace std;
int main () {
double N=0, score, total, totalScore=0, totalGrade=0, GRADE;
cout<<"How many excersices will be scored?/n";
[Code] .....
Error:
1>------ Build started: Project: HOMEWORK5, Configuration: Debug Win32 ------
1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup
1>C:UsersWORKHOMEWORK5DebugHOMEWO… : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
View 4 Replies
View Related
Mar 5, 2013
Write a C++ program to calculate the fewest number of each denomination needed to pay a bill of amount TOTAL. For example, if the end user enters $97 for TOTAL, program will output that the bills would consist of one $50 bill, two $20 bills, one $5 bill, and two $1 bills. (Assume that the amount is in whole dollars, no cents, and only $100, $50, $20, $10, $5, and $1 denominations are available.) Aid: You may want to use the modulus operator %.
View 1 Replies
View Related
Nov 4, 2013
I am currently working on an assignment.
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
char letter;
int count = 0;
double ppl = 0;
double finalCost = ppl * (count - 1);
[Code] ....
I am trying to create a word counter program that asks for the price per letter and then asks for the sentence they are writing. The app should then calculate the number of letters and give the total cost similar to:
You have 40 letters at $3.45 per letter, and your total is $138.00.
Everything compiles fine but when I run it the inputs don't work and it outputs:
You have -1 per letter, and your total cost is $-0.
View 2 Replies
View Related
Apr 25, 2013
SYNOPSIS : KBJ tourist agency Sdn. Bhd wants you to write an application program to calculate the total price for their customers for a package of vacation. The following table shows the price for three destinations (transportation and accommodation) offered by the agency:
Destination TransportationAccommodation
Pulau Redang Child RM15.00
Adult RM30.00RM95 per day
Pulau Perhentian Child RM20.00
Adult RM30.00 RM100 per day
Pulau Kapas Child RM10.00
Adult RM20.00 RM120 per day
This agency company will give some discount to a group of customers with is:
a.10% discount will be given for the group that has a least 5 adults.
b.25% discount will be given for the group that has more than 5 persons (adults and children)
c.30% discount will be given for the group that has at least 15 persons.
Your application program has to display the output using this following screen layout:
KBJ TOURIST CUSTOMER INFORMATION
Customer’s name: XXXXXXXXXXXXX
Number of Children:XXXXX
Number of Adult: XXXXX
Transportation: RMXXX.XX
Accommodation: RMXXX.XX
Total price: RMXXXX.XX
This is the code i got so far but it doesn't work..:(
#include <iostream.h>
int main () {
char customerName,code,A,B,C;
int childNum,adultNum;
double rate,discount,totalPrice,a,c;
[Code] .....
View 8 Replies
View Related
Oct 5, 2012
The point of this is to calculate the total of the monthly costs of these 6 expenses and then to show the annual cost. However, there's just a couple of things that's giving me problems and it's the calcMonCost in my code. The error says that it is more than one instance of overload function and also that an unresolved external symbol. Everything else is fine. What does this mean?
Code:
#include <iostream>
#include <iomanip>
using namespace std;
void calcMonCost (double, double, double, double, double, double &);
void calcAnnCost (double, double, double, double, double, double &);
void getData(double &lnPymnt, double &insure, double &gas, double &oil, double &tires, double &maint);
[Code] .....
View 1 Replies
View Related
Dec 16, 2013
I'm trying to calculate the size of values I've dynamically allocated memory to, i.e.
col_ind = new long[nz];
row_ptr = new long[inrows+1];
val = new double[nz];
from pointers. Now I've created the function,
int getmemsize(int i) {
int sizes[3];
sizes[0] = sizeof val;
sizes[1] = sizeof col_ind;
sizes[2] = sizeof row_ptr;
return sizes[i];
}
but each one is returning just the value 4? My arrays (one example) look like:
val = [ 5 2 5 9 8 3 9 10 9 ]
col_ind = [ 0 1 1 ]
row_ptr = [ 0 2 3 ]
View 6 Replies
View Related
Nov 6, 2014
i writing a code which will calculate the difference between time_in and time out. Can i use a 2 dimensional array for example
int time_in[hours][minutes]
int time_out[hours[minutes]
View 3 Replies
View Related
Feb 5, 2013
I want to calculate processing time in milliseconds as most of function I found give me in second. I am new user to C++, the code will be running under linux.
View 5 Replies
View Related
Oct 22, 2013
How do I set the size of a member array via the class constructor if I know the size at compile time. I can do this with templates, see below, but this leads to code bloats, I think.
So one class declaration but objects with different array sizes.
Can't use constexpr.
Can't use STL.
Can't use new.
#include <iostream>
using namespace std;
template<int T>
class MyArray {
private:
int array[T];
public:
int getSize()
[Code] ....
View 15 Replies
View Related
Jul 4, 2013
I'm challenged to write a program which calculates the time difference between two daytime.
compiler doesn't give an error, yet the warning: "format '%d' expects argument of type 'int *', but argument 3 has type 'int' [- Wformat]" for lines 24 and 26
However, by entering the first time the program crashes anyway. so I assume I do really need some pointer to make it read from the console can you see where my problem is?
Code:
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int Second;
int Minute;
int Hour;
}Time;
[Code]...
View 4 Replies
View Related
Jan 25, 2015
define the time and space complexity of an algorithm and about what can i do when the time and space complexity are given and i should write the code corresponding to the restrictions , which i find very difficult.
View 1 Replies
View Related