|
john00 wrote: ...is dynamically created with each usage... Every single instance stays in memory until the system crashes
Exactly that is the problem. Why don't you instantiate just one single instance, use it for all the files to be played, and then dispose of it correctly when you close your program?
The exception you show is just a consequence of the wrong code, not its cause.
|
|
|
|
|
I have to do it like that because I want to play more than one video at the same time and want to be able to use the form to show pictures without video
|
|
|
|
|
I am new to C#, so any one can help me to understand the => operator in C# or give me some resource on this.
Thanks in advanced.
|
|
|
|
|
This (=>) is called the Lambda operator.
This will help you generate lambda expressions.
You specify input parameters (if any) on the left side of the lambda operator =>, and you put the expression or statement block on the other side.
For example, the lambda expression x => x * x specifies a parameter that’s named x and returns the value of x squared.
|
|
|
|
|
Thanks Abhinav S so much!
|
|
|
|
|
The => operator in C# is for an example
if your int is equals or more then the other int.
I hope this help
//XoulsZ
|
|
|
|
|
No, that's wrong. Let me tell you: => != >= !
|
|
|
|
|
|
|
I am having a linq to sql problem with a C# 2010 windows form application when it is changed to a dll and accessed by other applications. The purpose of the calling the code as a dll is for performance reasons and to share the code accross multiple applications.
When the application is on its own, it runs fine.
Basically when the linq to sql was dragged to the desktop, a default linq to sql connection was setup by the .net framework. However I changed the *.designer.cs to use the system.configuration namespace,
added a reference to the system.configuration namespace, and changed the default linq to sql connection to use the database connection obttained in app.config file. I also removed any refernces to the default database connections in the the 'properties or 'settings' section for each project file folder.
Now the problem is the default setting values to the database are reset by the .net framework. Thwe values in the app.config file are no longer being used.
Can you show me code, point me to a reference, and/or tell how I can make this application is the connection string values in the app.config file again?
|
|
|
|
|
sc steinhayse wrote: I changed the *.designer.cs to use the system.configuration namespace, You must not manually edit this file as it will get reset by Visual Studio. You need to add code elesewhere to manage your connection.
Use the best guess
|
|
|
|
|
Can you tell me how to change the code so that it is better managed? I definitely need to obtain the database connections from the app.condif file.
|
|
|
|
|
You can get the configuration settings in your main program's code and then pass it in to the method that does the database access, the same as you would any method that accepts input parameters.
Use the best guess
|
|
|
|
|
Hi,
I have a products table in my database. I want to display the products from my table as Buttons on the form not as Grid so user will click the button of each product.
I want to display the product name (or image) on the button and assign the product id as button tag
How can I do this please?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Try:
Button but = new Button();
but.Image = Image.FromFile(pathToImage);
but.Text = "";
but.Tag = productId;
but.Click += new EventHandler(button_Click);
but.Location = new Point(X, Y);
but.AutoSize = true;
Controls.Add(but);
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
i want to use my windows application both offline and online. when it connect to internet ,it should synchronize my data and should visible to everybody those who use this software.i am using vs 2010 and SQL server 2005.
|
|
|
|
|
Very interesting; now do you have a question?
Use the best guess
|
|
|
|
|
Snap!
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
We really need to get out more ...
Use the best guess
|
|
|
|
|
|
How can i do this problem?.Please help me to solve this
|
|
|
|
|
Good for you!
That sounds like a good idea.
Now, what have you done so far to make it happen? (Other than tell us what you want here)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
i can use the software offline.when it connect to server, the data should be synchronized. and all other users get this updated data.
|
|
|
|
|
|
Take a look into the Microsoft Sync Framework.
|
|
|
|