ricekrispyw

Members
  • Content count

    420
  • Joined

  • Last visited

Community Reputation

388 Neutral

About ricekrispyw

  • Rank
    Member
  1. What really happened with Zidane!

    Maybe it's just me, but I'm no more clear on what made him snap than I was before...
  2. Vista

    You can grab almost any Linux LiveCD (Knoppix, Ubuntu, etc...) as they almost all contain partitioning programs. Look for gParted and QTParted.
  3. Thank you very much. It worked like a charm.
  4. I am trying to serialize some objects to files, and many times the location where they are to be saved will not exist. I use a FileStream for file access (you have to pass one to the serializer) with the FileMode set to Create. However, if one folder in the path I am saving to doesn't exist (which is often the case), .NET throws an exception telling me that part of the path isn't found. How can I specify that I want to just create any folders that don't exist? Thanks very much for any help.
  5. The Omen...

    Quote:Original post by SalsaBut seriously, you know what really terrified me? The Shining. And not in any sort of boo-moment manner that made me jump out of my seat. Seriously, the thought of being just a little boy and seeing your very own father losing his mind and trying to kill you and your mother would have to be unbearably scary. The plot is very disturbing. That's because it was based on a book by Stephen King, who is a master at things that are truly scary. I agree. The Shining was terrifying, but not in a way that I think most viewers today would connect with. People are after cheap thrills and jump scenes these days. Another movie that scared the heck out of me, despite the cheap thrills, was Event Horizon. THAT movie was scary.
  6. [EDIT] It looked like the CodeProject article was a good solution, but it seems to be much too limiting. [/EDIT] Thank you very much! Those articles were extremely informative and helpful! [SOLUTION] For those looking at this to figure something out for themselves: I ended up using this article and the associated control to accomplish what I wanted to do. See the comment made by jmonw (me) to see how I used it. Best of luck! [/SOLUTION] [Edited by - ricekrispyw on June 18, 2006 11:36:45 AM]
  7. Yeah. I found an article about Reflection.Emit. It seems like a less-than-optimal solution, though. But I suppose it's something if all else fails. Thanks for the quick response.
  8. I was wondering if it is possible to add properties to an object at runtime. I ask, because I want to have the user be able to define a custom "object" and define the properties for it. I then want them to be able to edit those properties in a PropertyGrid. So I might have a class BaseEntity that has properties for scale, etc... and I want the user to be able to create something like: Bird and give it properties like FeatherColor, Species, or something. The definitions for the custom things would be stored in an XML file, and then loaded at runtime. So, as for how to do it... Let's say I wanted to add a custom property to a button at runtime. I had thought you could do something like: [sourcelang="c#"]Button guy = new Button(); PropertyDescriptor prop; PropertyDescriptorCollection guyProps = TypeDescriptor.GetProperties(guy); prop = TypeDescriptor.CreateProperty(this.GetType(), "SampleProp", "".GetType(), null); guyProps.Add(prop); But I get a "Specified method not supported" (in reference to guyProps.Add()) so it would seem that you cannot. Was I clear on what I am trying to do? Is it possible? Thanks very much!
  9. I need a game....

    Rome: Total War looks awesome. I can automate the micromanagement, and concentrate on the battles or, if I am for some reason in the mood, control the cities myself. It sounds like the battles are very well-done, and that is a great overall game. I think I will head out and buy it. Thanks. ps. I'm also in the process of downloading Ground Control, because it also looked cool. Unfortunately, I'm in an apartment complex with Cable internet, so it's unbelievably slow on the weekends. Thanks guys! Oh, also: keep suggesting things, if you think of more. Thanks!
  10. I need a game....

    Awesome. Myth and Ground Control look very cool. Thanks. UFO Defense looks like it might be interesting. I am trying to find a place to download it (surely it is abandonware by now...) so that I can try it out. As far as Joint Task Force and Supreme Commander. They both look VERY cool, but I don't think I have the specs for them, graphically. Maybe once I upgrade my card... Thanks for the quick and good responses.
  11. I need a game....

    I'm looking for a game, but it's a little difficult to search for "a game that plays this way and does this and isn't this..." so I thought I would ask you wonderful people. I'm looking for a strategy game, preferably real-time. The thing I don't like about most RTS's (your typical RTS i.e. warcraft, starcraft, dune), though, is that I really don't like the "mine resources, and build stuff" aspect of them. I prefer the battles. Especially against strong AI. I don't know if anyone remembers the Close Combat series, but that's kind of what I'm looking for. Basically, you fight a series of battles, a campaign, and the focus is on battle strategy and tactics, not on managing a race. Also, it would be nice if it took place in space, but that's not a necessity. So, what I'm looking for in sum: Strategy game (real-time if possible) Focus is on military tactics and strategies, not resource gathering, etc. Good, challenging AI So, if anyone knows of such a game, I'd be grateful if you'd tell me about it. Thanks a bunch. ps. I'm not 100% sure I made a lot of sense. Make fun of me if I didn't, as long as you get me to clarify. Thanks! [EDIT] I just realized that online play would be good, too, so that I could match wits against other people. It's not a deal-breaker, though. [/EDIT] [Edited by - ricekrispyw on May 20, 2006 10:18:02 PM]
  12. Desktop Screenshots! =)

    Quote:Original post by levjs Side note: not accusing anyone at all, just wondering how many of you doctored up your screens before taking a screenshot... : ) I didn't do anything but minimize the windows and blur out a private email account. In fact, I didn't realize the Now Playing box was there until after I posted. Rock on!
  13. Desktop Screenshots! =)

    Quote:Original post by Samsonite Quote:Original post by ricekrispyw ...grand canyon pic... Thats awesome! Thanks. It was a pretty awesome Spring Break road trip. I'm from Atlanta, but we went as far northwest as Utah and hit 14 states + Mexico. It was pretty sweet.
  14. Installing a font in .NET

    Thanks for sending me down the right track, Rob. In VB, the formatting is a little different, but I figured it out. Also, for reference, here's how to install a font from a ttf file in VB.net Before your class declaration, you need to put: <Assembly: RegistryPermissionAttribute( _ SecurityAction.RequestMinimum, All:="HKEY_LOCAL_MACHINE")> Then, inside the class, import some API functions: Private Const HWND_BROADCAST = &HFFFF& Private Const WM_FONTCHANGE As Long = &H1D <DllImport("gdi32.dll")> _ Public Shared Function AddFontResource(ByVal lpszFilename As String) As Integer End Function <DllImport("user32.dll")> _ Public Shared Function SendMessage(ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer End Function Then, is the actual installation. I put it in a button press. 'let's assume that filePath is a string with the full path of the ttf file Private Sub cmdAddFont_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAddFont.Click Dim regKey As RegistryKey = Registry.LocalMachine.OpenSubKey("Software", True).OpenSubKey("Microsoft", True).OpenSubKey("Windows NT", True).OpenSubKey("CurrentVersion", True).OpenSubKey("Fonts", True) Dim fileName As String Dim tempFonts As New PrivateFontCollection Dim fontName As String fileName = GetFileName(filePath) tempFonts.AddFontFile(filePath) fontName = tempFonts.Families(0).Name If Not System.IO.File.Exists(FONTS_FOLDER & fileName) Then 'copy the font into the windows font directory System.IO.File.Copy(filePath, FONTS_FOLDER & fileName) 'add it to the system font table AddFontResource(FONTS_FOLDER & fileName) 'write the change in the registry regKey.SetValue(fontName, fileName) 'alert all top-level programs about the change SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0) End If tempFonts.Dispose() End Sub Private Function GetFileName(ByRef fullPath As String) As String Return fullPath.Substring(fullPath.LastIndexOf("\") + 1) End Function Private Function GetFontName(ByRef fileName As String) Return fileName.Substring(0, fileName.IndexOf(".")) End Function Note: this only works on NT machines (this includes XP). To make it work on machines before then, change "Windows NT" in the registry key to just "Windows" Also, for some reason, I cannot get the newly installed font to show up on an InstalledFontsCollection until I restart the program. I'm working on that one. Post here if you have any ideas. Hope this was helpful.
  15. Specifically, VB.NET I want to install a font using VB.NET. I'm not talking about the private install, but rather, installing a font on the system. After some extensive research on this, I can't find a way to do it. It seems, according to the MSDN help, that you need to use AddFontResource, which is part of the GDI. However, I have yet to find how to import GDI functions into .NET applications. Many thanks to anyone who can help.