15,911,896 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by DarkTyranno (Top 26 by date)
DarkTyranno
22-Feb-13 6:05am
View
If you add the file as a Resource, then it can always load it locally, wherever you run the app. That's what I want to accomplish. I don't install my application, so no extraction of music anywhere. I'm just creating an instant run application.
DarkTyranno
21-Feb-13 8:27am
View
That's also not the case, I already removed the white background myself in PNG format, but I have to set transparency on backgroundcolor (which is transparent).
I just want to use 1 picture, where you can just look through the lights of the car,
or use another option with 2 pictures, but good code to make it run smoothly, as it doesn't in my case.
It's not about the background, it's about the picture itself, I want to look through some parts of it. How can I manage that? (Only solutions I tried was editing outside C# and save picture with partly semi-transparent parts, or make 2 forms and set 1 forms Opacity lower to simulate that. But it gives many extra work of course... :/
DarkTyranno
21-Feb-13 5:37am
View
Here are the images I use to try to make the lights SEMI-transparent:
http://img594.imageshack.us/img594/3655/policecardesignlight.png
http://img189.imageshack.us/img189/7750/policecardesigncar.png
DarkTyranno
21-Feb-13 5:32am
View
I didn't use any pictureboxes for the car nor the lights. Both are Forms without a border set. They contain 2 pictures with a white background which is removed.
This way I could change the opacity of 1 of both forms. If this is possible with pictureboxes too, then I have to check my app again.
Remove the background of form (so no real form/border left), add 2 pictureboxes for both parts, remove borders, change background to picture, remove background from the pictures itself, change opacity for the picturebox with lights.
I don't know if this is possible, but I should try it soon.
DarkTyranno
21-Feb-13 5:18am
View
Isn't this for complete transparency as well?
I work with Opacity of the form to look through that picture, but this shouldn't work on 1 image in 1 form. The backcolor is already set to white or transparent to remove the big block of that color from around my whole application. If I chose another color from my picture, I'm sure the white returns.
DarkTyranno
21-Feb-13 5:08am
View
I don't know if I need to use 2 forms, but for me it was the easiest way to make the lights semi-tranparent.I have form2 with background picture 'lights only' and Opacity xx% and my form1 (mainform) with the flying car and Opacity 100% + all controls. Don't know if there is an easy way that will get the same result yet using Winforms, so if anyone knows, that would be cool.
DarkTyranno
21-Feb-13 4:44am
View
If I use 1 form, it will mean that my whole image will be semi-transparent right?
Using TransparencyKey means removing that color, I just want to look through specific parts of the picture as you can see on my demo picture in the question link.
You can see that I already removed the borders as well ;)
DarkTyranno
23-Jan-13 6:33am
View
It sounds hard. I'm working with C# for just some weeks, so I don't really get how to do that. But the idea sounds great, I can try to do some research for this option. Maybe some other options will appear, I go try it.
DarkTyranno
23-Jan-13 4:36am
View
Yes, ReadOnly = True and Enabled must be True, because disabling the richTextBox prevents some custom settings to work.
I know it's not the regular setting for applications, but I make a NFO Viewer which I put with releases. I just want to view the text as ending credits in a movie. I don't get why people often hammer on others who want to use settings that are abnormal. This is no real application which end users have to install and use, it's just a standalone executable which reads the file. Please refer to my project in question if you want to get why I want to use these settings ;)
DarkTyranno
10-Jan-13 9:38am
View
No one interested in helping me out with this? :(
DarkTyranno
31-Dec-12 10:06am
View
I may have the solution, as you said to change the encoding in the resource file itself, I don't need to read the file again (String doesn't support .ReadToEnd()?) and encode it again. I've tried what I did before:
string file_name = Properties.Resources.DARTY;
richTextBox1.Text = file_name;
and got rid of:
System.Text.Encoding encoding = System.Text.Encoding.GetEncoding(437);
System.IO.StreamReader file = new System.IO.StreamReader(file_name, encoding);
richTextBox1.Text = file.ReadToEnd();
file.Close();
Now suddenly the text appears! :D
So as a summary:
Add the nfo-file to resources using the Resources tab of Project Properties;
View detailed mode and change the FileType and Encoding of the added Resource nfo-file.
Call it using Properties.Resources.FileName;
No need to convert or read. Thanks for the steps that I needed to get this working, now I can go figure how to add .it music to resources as well ;)
DarkTyranno
31-Dec-12 9:38am
View
In that situation I still deliver the file with my application, which means users have to put it in specified location and run the program. I want to melt it together with my application, but nothing appears after I've added it in my project as a resource. Hope other people will have a look into this, I'll try some more in the meantime ;)
DarkTyranno
31-Dec-12 8:34am
View
That step did work to change that value, it seems you don't get all options when you select the properties of the file in the Resource folder. I had thumbnail view, but detailed view gave more properties. I changed to Text and the encoding to 437.
Now I still have the problem of no file showing up when I try to call the resource... Any idea?
DarkTyranno
31-Dec-12 7:47am
View
I don't exactly get what I need to do...
Where do I have to change setting Binary to Text? Which dropdown?
DarkTyranno
22-Dec-12 17:02pm
View
I got some answers, but still have to try them out somehow.
I got this:
"Try loading the resource into a memory array. Then you can easily play it using AddSoundSourceFromMemory(). If you are able to IOStream from your resource, you could also use AddSoundSourceFromIOStream, which might be even easier."
And:
"he string you need to give to play2D is usually a filename, but if you add your sound using a custom sound source, you can use the name of the sound source you used.
About how to get the IOStream from your resource: That's up to you."
I don't want to play from memory, this will generate 100's of lines of code, which I have to create using some software to make code from music files.. -.-
I'm interested in the IOStream, but I didn't have the chance to get any simple thing working from resource, so don't know the format. Still trying out when I have the time.
DarkTyranno
7-Dec-12 18:08pm
View
I've tried something like it, to directly call the track from source with the name and looping to true, now I tried your suggestion too, both didn't work, no sound...
It's getting very late, I'll try the irrKlang community soon then. I'll keep you posted!
DarkTyranno
7-Dec-12 17:48pm
View
I saw I could use the option 'include in project' from the resource folder, but it didn't make any difference. Maybe you're right, I go ask the admin of irrKlang about using it as a resource, maybe they can help me out. Thanks for the efforts, if there are no other options, I have to deliver the music with the executable.
DarkTyranno
7-Dec-12 17:21pm
View
What do I have to place for Resources.'test'?
I have small options and I chose the track from resource without extension.
Does it really read the last argument (the string file?)
I can fill it with whatever I want, no errors, but no sound as well...
DarkTyranno
7-Dec-12 11:57am
View
Thanks, that would help me a lot. I have to go dinner and work now, try more tomorrow.
DarkTyranno
7-Dec-12 10:46am
View
oh no, I used source as the first argument.
IrrKlang.ISoundSource source = engine.AddSoundSourceFromMemory(Properties.Resources.Xaser_Aeolus, "Xaser_Aeolus");
engine.play2D(source, false, false, true);
engine.Play2D("C:\\Test\\Xaser-Aeolus.it", true);
The play2D that tries to get the source gives the error for play2D I mentioned before, the last line works as it is now, but means I have to load the file from a location. I want to build it in the project. Any id?
DarkTyranno
7-Dec-12 5:56am
View
MemoryStream can't be found, and in the first case, if I create the engine, add the source, all is okay.
When I try to put the source in the play2D, then it marks play2D with error:
Error 2 'IrrKlang.ISoundEngine' does not contain a definition for 'play2D' and no extension method 'play2D' accepting a first argument of type 'IrrKlang.ISoundEngine' could be found (are you missing a using directive or an assembly reference?)
It almost seems to work, but I'm still not there yet.
Default path (string) works, but when I try to add the resource in the engine, either way play2D doesn't support it.
DarkTyranno
6-Dec-12 16:26pm
View
Still one big questionmark for me...
I tried StreamMode myStreamInResource = Properties.Resources.Xaser_Aeolus;
Where the error was:
Error 1 Cannot implicitly convert type 'byte[]' to 'IrrKlang.StreamMode'
this means StreamMode belongs to my music player and I still can't use my song from the resources, now what?
I've never used open files or stream or anything related to resources, so can you try to code it correctly for me?
DarkTyranno
6-Dec-12 11:27am
View
I have different dll's that came with the music player, it's build for all .NET variants and also for other scripting languages. I'm wondering if that can cause the problem I have, that I'm not able to switch from .NET dll... if I do, the music player options will be marked as unknown etc. Maybe I have to build my apps from scratch, if it can be converted to an older .NET version. This should be the troublemaker of my apps not running on other machines I think. I made such great progress, till I found out I can't run it on any other computer... -.-
DarkTyranno
6-Dec-12 11:08am
View
I don't really get how it works.
I have imported a dll file for .NET 4 which came with the music player, but it had .NET 1.1 and 2.0 too. But I tried to change to those today, it got me a lot of errors.. :/
I also can't just add the installer file for .NET 4 with my exe somehow?
DarkTyranno
6-Dec-12 10:58am
View
Okay, this is something I need to figure out (tried something like this before, but couldn't get it to work)
How can I acces an .it file, which I have to add as 'other'?
It's music, but no default music extension...
I can't use image Musictrack = ... .nameoffile, as it can't draw that file, but I can't replace image with whatever I want. What do I need to use when I want to access that file for instance?
DarkTyranno
6-Dec-12 10:46am
View
The problem is, even if I install .NET 4 manually and apply all Windows updates for it, it still won't run... My laptop is the only thing that seems to be able to run it...
And a setup... I don't want to put those things on the client pc's. Even if I have to, I don't want to include all those dll's and .NET 4 in all my small apps every time (I have more versions which all require that of course). I want a standalone executable that just runs immediately and does its job.
Show More