Click here to Skip to main content
15,920,704 members
Home / Discussions / C#
   

C#

 
AnswerRe: Aborting a method in c# Pin
MarkB77728-May-08 12:28
MarkB77728-May-08 12:28 
QuestionDataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
Cyrilix28-May-08 7:22
Cyrilix28-May-08 7:22 
AnswerRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
leppie28-May-08 21:28
leppie28-May-08 21:28 
GeneralRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
Cyrilix28-May-08 22:59
Cyrilix28-May-08 22:59 
GeneralRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
leppie29-May-08 0:47
leppie29-May-08 0:47 
GeneralRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
sanme985-Aug-08 15:26
sanme985-Aug-08 15:26 
GeneralRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
Cyrilix5-Aug-08 17:47
Cyrilix5-Aug-08 17:47 
QuestionUsing Resources Pin
ejohns8528-May-08 6:31
ejohns8528-May-08 6:31 
Hello,

I am writing a simple C# program that will play an AVI file in a Form. I am able to currently do this by specifying the path for the file, and telling my program to open it from there. However, I would like to be able to somehow include this video as a part of the compiled .exe, so that, for example, I could play this video on another computer which doesn't have the video on its hard disk.

I have tried this by going to Properties, then "Add Existing File", and then browsing and finding my video file. This seemed to work fine, until I then tried to build the project, and I got the error:


The "GenerateResource" task failed unexpectedly.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Resources.ResXFileRef.Converter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
at System.Resources.ResXDataNode.GetValue(ITypeResolutionService typeResolver)
at System.Resources.ResXResourceReader.ParseDataNode(XmlTextReader reader, Boolean isMetaData)
at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader)
at System.Resources.ResXResourceReader.EnsureResData()
at System.Resources.ResXResourceReader.GetEnumerator()
at Microsoft.Build.Tasks.ProcessResourceFiles.ReadResources(IResourceReader reader, String fileName)
at Microsoft.Build.Tasks.ProcessResourceFiles.ReadResources(String filename, Boolean shouldUseSourcePath)
at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) WindowsFormsApplication3


I don't know what this means, but it seems to suggest my video file is too big to be a resource or something. The video file is an uncompressed AVI file, but it is only 250 MB, so surely this can be a part of the executable?

If not, then is there a way that I can keep the video file and the .exe file separate, but allow the .exe file to use the video file? (without specifying the path name.)



Another quick question - I have tried adding a bitmap as a resource, and this has worked fine, but how do I then use this file? For example, if I wanted to display this bitmap as the image in a picture box, how do I reference the bitmap in the resources?


Thank you for any help on this!!

Ed.
AnswerRe: Using Resources Pin
leppie28-May-08 6:43
leppie28-May-08 6:43 
GeneralRe: Using Resources Pin
ejohns8528-May-08 7:00
ejohns8528-May-08 7:00 
GeneralRe: Using Resources Pin
Gareth H28-May-08 7:32
Gareth H28-May-08 7:32 
Questionauto-complete textbox with memory Pin
AndrusM28-May-08 6:00
AndrusM28-May-08 6:00 
AnswerRe: auto-complete textbox with memory Pin
leppie28-May-08 6:46
leppie28-May-08 6:46 
GeneralRe: auto-complete textbox with memory Pin
AndrusM28-May-08 7:21
AndrusM28-May-08 7:21 
GeneralRe: auto-complete textbox with memory Pin
leppie28-May-08 21:27
leppie28-May-08 21:27 
QuestionConnect to database via web service Pin
HenrydeSousa28-May-08 4:45
HenrydeSousa28-May-08 4:45 
AnswerRe: Connect to database via web service Pin
Gareth H28-May-08 7:39
Gareth H28-May-08 7:39 
GeneralRe: Connect to database via web service Pin
HenrydeSousa29-May-08 4:20
HenrydeSousa29-May-08 4:20 
QuestionWhat is the Error Pin
ASysSolvers28-May-08 4:33
ASysSolvers28-May-08 4:33 
AnswerRe: What is the Error Pin
leppie28-May-08 6:39
leppie28-May-08 6:39 
GeneralRe: What is the Error Pin
Guffa28-May-08 8:31
Guffa28-May-08 8:31 
QuestionOpenFileDialog in Web... Pin
Chetan Ranpariya28-May-08 3:59
Chetan Ranpariya28-May-08 3:59 
AnswerRe: OpenFileDialog in Web... Pin
leppie28-May-08 4:01
leppie28-May-08 4:01 
AnswerRe: OpenFileDialog in Web... Pin
Mike Dimmick28-May-08 4:30
Mike Dimmick28-May-08 4:30 
QuestionTransferring data from Excel Sheet to SQL Server 2000 database Pin
Dextter28-May-08 3:47
Dextter28-May-08 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.