Jump to content
Xtreme .Net Talk

music7611

Avatar/Signature
  • Posts

    35
  • Joined

  • Last visited

About music7611

  • Birthday 08/03/1990

Personal Information

  • .NET Preferred Language
    Good Ol' C++, C#

music7611's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I'm making a tool for one of my computer games and I need to do some drawing on top of a bitmap. I can't make it black because the bitmap might be black. I can't make it white because the bitmap might be white. Is there someway to set a Pen or a Brush to draw an inverted color?
  2. I thought of that, but won't that mean if you want to download a big file, you have to keep it all in the ram? Also, for binary files, StreamReader messes up the files. Is there a BinaryReader/Writer equivilent?
  3. Hi all. I have a two streams in C#. One is one that comes from a file on the internet, the other is a file on the computer. I need a fairly quick way to copy the content on the file on the net to the file on the computer. What is the best way to do this?
  4. First of all, I am making a game (funny you say so) but this part is only the tool you use to make tilesets. The problem with this is, lets say I have a 256 tile tileset (worst case scenario), then it has to store 512 images. I don't think its worth storing the same image twice for every tile in the game. So, until I can think of something better, the only thing to do is select the transparent color and hope the user can tell whether it works or not.
  5. Yeah that could work except my program has one of those things where you have the little eye dropper on the image and you need to select a color to be transparent. It works just fine when they click once, but when they click on that color then another color, they both become transparent.
  6. I have a Bitmap and I wanted to set the transparent color. I decided to use MakeTransparent(), but it seems that just adds the color to a list of transparent colors. Is there a way to set the one and only transparent color?
  7. Now, I don't think I'm the right guy to reply because I don't know VB or C++.net, but I do know plain old C++ and I can show you the way to do that in that. Using Character Arrays: char userName[4]; strcpy(userName, "r-s"); MessageBox(NULL, userName, "User Name", MB_OK); Using STL: #include <string> //... std::string userName("r-s"); MessageBox(NULL, userName.c_str(), "User Name", MB_OK); .Net is probably a lot more like the STL version, but you can use both in a .Net program. EDIT: Forgot the split part, sorry Correct me if I'm wrong, but if you call split like you did, it will take a string like "Hi;How are you;I'm fine" and make it "Hi", "How are you", and "I'm fine". I don't think there is a function that will do this for you, but you could do something like this: #include <vector> #include <string> using namespace std; void Split(vector<string> &strlist, string &str, string delim) { strlist.clear(); int index=0; int oldindex=0; while((index=str.find(delim, oldindex))!=string::npos) { if(index==oldindex) index++; else { string newstr; newstr=str.substr(oldindex, index-oldindex); strlist.push_back(newstr); } oldindex=index; } if(oldindex<str.length()) { string newstr; newstr=str.substr(oldindex, str.length()-oldindex); strlist.push_back(newstr); } } Then, when you need to use it you just do this: vector<string> userInfo; Split(userInfo, sData, ";");
  8. If Highlight Syntax HTML is what I think it is (correct me if it isn't), there are two ways to do this that I can think of: 1) Write a program that finds every keyword and turns it blue, and takes every comment and turns it green. 2) Copy + paste the code from MSVC++ to a WYSIWYG editor and the rest writes itself If Highlight Syntax HTML means you want every function prototype be a link to the function, every object declaration have a link to the class, then you'll have to either just sit down and write it yourself or do a more complex version of option 1.
  9. The Form class has a property called WindowState. Simply change that to WindowState.Minimized, or if you have the IDE, just look at the properties window while you are editing your form and look for WindowState
  10. I am programming in the Win32 API (no MFC or .NET) and I am using CreateFont function to make a HFONT. Does anyone know how I can specify a path relative to the folder to use as the font file?
  11. There probably isn't for security reasons. One thing you can do is have a program on the client that has a connection with a program on a server. When the server sends the client a message, the client starts up the program it needs to run.
  12. Thanks. You fixed my Visual Studio. :D
  13. I've been using the Microsoft Visual Studio 2002 Enterprise for a while and suddenly, when I first open the program up, instead of seeing my homepage, I see a page cannot be displayed. Also, when I try to make a new class or form or anything in C#, it says : Except the "CSharpAddWinFormWiz.vsz" is always different depending on what I'm trying to make new of. I already tried reinstalling, and that didn't help. What should I do :confused:
  14. I just have Windows XP Home and no firewall, but I guess that's the best I could hope for. I'll wait until this computer breaks and I can reinstall the operating system before I experiment with internet networking.
  15. At brinster, they don't let you. And I guess there probably isn't a company that will do that. But is there someway to make your own computer a server?
×
×
  • Create New...