Jump to content
Xtreme .Net Talk

Nerseus

*Experts*
  • Posts

    2607
  • Joined

  • Last visited

Everything posted by Nerseus

  1. Make sure it's a zip file with no binaries (no EXE or DLL etc). -Ner
  2. I'm a tad confused on what you have/want. You want to have the grid show the child table PLUS one field from the parent? Or a link to show the whole parent table? Or is that reversed - you want to show the parent table with one column showing a value from the child table OR show the parent table and one column is a hyperlink to show the child table? -Nerseus
  3. Hmm... 45 minutes you waited. I guess it's impossible. :p How are you filling your datagrid? If from a DataTable (in a DataSet), I think the grid uses the Caption property of the DataColumn for each column shown in the grid. -Nerseus
  4. Other than custom drawing, I can't think of any way to do what you want. Windows has the concept of a focused window per process (or thread - I'm not sure) and there's no built-in way around that. You *might* be able to do it by putting the second form in another thread but that seems like a lot of work. What's wrong with one window looking active and the other not? I like to know which window has focus without having to scan a form for the little blinking cursor to tell me. -Nerseus
  5. Does the file contain ONLY palette information? Or, do you have another bitmap type of file (BMP, GIF, etc.) and you want to use the palette from that bitmap on this new one? -Ner
  6. I wouldn't think you need the symbols. That only means you won't be able to see the "source code" for those DLLs that don't have the symbols. It shouldn't really matter - you normally only care about your sourcecode to find errors. What is your program doing/not doing that you need help with? It looks like the program is running fine, but exiting (with no errors - hence code 0). Can you show us some source and explain what the code is supposed to be doing? -Ner
  7. I've noticed this before, but I think I'll ask :) If I am in the "Language Specific" forum and hit "Mark read" it doesn't mark the two sub forums as read. This is probably ok though I really wish you could say "mark this and child forums read" or something similar (worded better than that :)). The problem I see lies in when I've gone into both the C# and VB forums and clicked the "mark forum read" link on both of them but NOT on the higher level forum "Language Specific". If I go back to the root forum "Extreme .NET Forums", it shows "Language Specific" as unread. If I click the link, nothing shows up as unread. Clicking "Mark all Read" in the "Language Specific" forum will clear the icon from the root forum's listing. Since I only read the C# forum (I'll leave the VB questions to others), it's kind of a pain to click through thread pages worth of "Mark forum read" to get that icon to go away. Since I generally spend a bit of time reading the forums, it's not uncommon to get to the bottom and see new posts in forums I previously marked read. If I don't go through all 3 forums in Language Specific (the LS forum plus the C# and VB forums), I won't know if the icon is for C# or from the older posts. Whew, and thanks :) -Nerseus
  8. Is there any way to have the board automatically go to a parent forum after using "Mark All items Read" (or whatever that link says). Generally, I read a forum for new posts, answer accordingly, then hit Mark All Read. Then I have to click on the parent forum to go see what other forums have unread items. Since someone clicking "Mark All Read" is obviously done with that forum, why not put them someplace else? Generally, going to the parent forum would be ideal (in my opinion). -ner
  9. For the most part, all except the language specific and DX portions of the "game programming" questions can be answered here. Want to write a tile-based game? The basic principals are the same and (as said numerous times) can be asked anywhere. If you get stuck on how to actually code a collection class to hold your sorcerer's spells, try the general forum. Or if you can't get the sorcerer sprite to draw transparent, try the graphics or DX forum. If the post counts increased dramatically to where people looking for non-game related graphics questions got confused with all the game related questions, then maybe the forum could get split. For the record, I would rather have a Crystal Reports forum before a Game Programming forum. -nerseus
  10. In my opinion, this is close to art. Of course, figuring out how to compile C from the command line and/or interpreting the code itself on that site is also an art (though one I'd rather enjoy from afar, like a movie). -Nerseus
  11. My work is nice to me, though I "only got" a 21 inch Sony monitor whereas the "new guys" are getting the new flat panels :( Maybe I'll sneak over and swap one out one night when no one's looking... think they'll notice? Actually, two DVD burners is overkill. Two DVD drives isn't as having one DVD for MSDN in the drive is handy. And having one a burner is almost a necessity since our clients now like DVDs. If you don't have MSDN on DVD, get a big cheap hard drive and install everything. It's worth it (in my opinion). -Nerseus
  12. My simpler advice: Step 1: Figure out what you *really* want even if it seems hard Step 2: Do it © 2003 Nike Sounds simple, but it sounds like right now Step 1 is getting cluttered with about 5 choices. You need some way to figure out priorities and that's something only YOU can decide. -Nerseus
  13. Whew, someone who types as much as me :) I'm not sure about the effects of marking textures as multithreaded so I can't offer any help. I've used the Dynamic usage before. For my purposes, I was locking a copy of the original texture and tweaking the bits. Here's the code I used to copy and lock a texture: SurfaceDescription desc; desc = textureOrig.GetLevelDescription(0); Texture textureCopy = new Texture(dev, desc.Width, desc.Height, 1, 0, desc.Format, Pool.Managed); Surface dst = textureCopy.GetSurfaceLevel(0); Surface src = textureOrig.GetSurfaceLevel(0); SurfaceLoader.FromSurface(dst, src, Filter.None, 0); desc = textureOrig.GetLevelDescription(0); // Get the bits for the surface and re-color them ColorType[] c = (ColorType[])dst.LockRectangle(typeof(ColorType), LockFlags.None, desc.Width * desc.Height); The ColorType is a struct I defined that I KNOW matches the format of the texture I'm loading. I know because I tweaked that texture after loading to ensure it's in the proper format. If you use the built-in methods to load a texture from a file or resource, it only takes the pixel format as a hint so you can't count on it. Good Luck! -Nerseus
  14. I would guess you'd also want to consider how many effects you want. If you just want a simple slide and a fade, you can probably code them yourself. If you want checkerboard wipes in a spiral pattern, I'd look at 3rd party tools. I've used some LeadTools in the past (a few years ago) and found them useful. Are there really no samples for using the basic wipe functions? Seems odd - I'm sure they have a website where you can post questions or email help. Keep in mind that it sounds like you're going to want to get your fingers wet in the graphics coding at least a little if the point of your application is to do something with images. At the very least, I'd play around with the Graphics, Image, and Bitmap objects and their properties and methods. -nerseus
  15. Blue is usually warnings (in C# it is, I would think it's true for VS in general). Check your task list to see a description or hover over a blue line to read it. It's probably variables declared but not used, or unreachable code, or something similar. As for coding a game... do you have anything in mind? It's generally a good idea to know what you want to code before starting to build anything. But maybe your intuition will lead you to writing the best game ever! :p -Nerseus
  16. I'm not sure how to do it but I've seen tons of sample code searching google. You don't want DirectX for this - but you will probably want to use the Win32 API. I'd search google for "capture desktop screenshot c#" or something similar. -Ner
  17. What are your references (in the project)? You should have System.Data at a minimum for this to work. Then having the right Imports statements should do the trick. Check the object browser (ctrl-alt-J) to see what libraries you have available. It pulls from whatever you've got referenced in the solution explorer. -Nerseus
  18. Well, you could use one Query with a larger Group By clause. Add the SUM to your first query and add ALL of the columns of the first query as columns in the Group By clause. Something like: Select Invoicenumber, InvoiceDate, Total, CustomerNumber, BrokerID, LineSEQNo, ProductLine, COMM, Terms, Description, DiscountPercentage, SUM(Total) AS InvTotal FROM PendingCommissions WHERE InvoiceNumber = 123 GROUP BY Invoicenumber, InvoiceDate, Total, CustomerNumber, BrokerID, LineSEQNo, ProductLine, COMM, Terms, Description, DiscountPercentage ORDER BY BrokerID, ProductLine DESC If you want two tables you need only one DataAdapter. Issue both SELECTS in one call (you may have to separate by a semicolon). In your call to DataAdapter.Fill(...) the name you give is a default. The first query will be in a table with that name, the next table from your SELECT will be given the same name plus a number. Look at the Tables(1).Tablename to see the name after the call to Fill. -Nerseus
  19. There is NO way for ADO.NET to automatically create tables from a DataSet. I know that for Access and SQL Server you can issue commands such as "CREATE TABLE Table1 (Col1 int, Col2 varchar(5))" and such (assuming you have the permissions). I have no idea if that will work in MySql. Assuming MySql is ANSI standard, it will probably work though I don't know the datatypes for the columns you want to create. With custom code you could automate the building of the "CREATE TABLE ..." code by using the DataSet to see the types and sizes of each column, including column names, nullability and such. Again, this code is yours to write :) Once the table exists, you can try a couple of ways to get the data into the new table. You can try the DataAdapter's update method (make sure this is a new DataAdapter pointing to the MySql database). Since you probably filled the DataSet using a DataAdapter, all rows will be marked as Original, no changes. So calling Update directly won't work. You'll have to someone convince the DataSet that the rows need to be added. I can think of a couple of ways, but I'm too lazy and tired to type them just now :) You can also loop through the rows in the DataSet and insert them manually into the MySql database issuing commands like "INSERT INTO Table1...". Or, if this is a helper program only, maybe you can write out the values to a comma separated file and use some kind of batch import program to blast in the data in one shot (like SQL Server's bcp utility). -Nerseus
  20. Sounds like a computer science project/assignment if you ask me :) -nerseus
  21. It's not really troubleshooting, it's just knowing the basics of SQL Server administration. If you're a normal developer, you setup SQL Server on your own box and you log in as "sa" with no password. That's the default user/pass during setup (though you have to bypass a warning about the sa password being blank). The problem you might be having is if your SQL Server install is only allowing SQL Server userid/password to log in. I don't have SQL Server on this machine (I can look in the morning), but you'll want to check the server settings/options. Look for something about mixed security. You WANT mixed security. It means SQL Server logins can either be username/password created ONLY in SQL Server (managed through enterprise manager) or an NT/Win2000 userid/password (your domain account). If your SQL Server only allows SQL Server uid/pwd to login (which is how the sa account is created), you'll need to change it. Once you're sure SQL Server allows mixed authentication, you'll want to make sure the ASPNET user (just like your username) has permissions to the Server and database. In enterprise manager, go to the Logins (or is it Security) node in the tree. See what accounts show up. If you don't see: ADMINIT1\ASPNET then you'll have to add. Right click on the tree and select Add new user then make sure it's set for Windows Authentication and choose the user (or paste in the name). Now assign that user some level of permissions to certain databases (or however you want your security to work). I believe the .NET documentation is limited in it's descriptions of setting up the ASPNET user account to have permissions to a database since it's not really a .NET thing, but a SQL Server permissions issue. Keep in mind that the ASPNET account is JUST a regular windows account like your username or your boss's. It just gets created automatically so you can keep track of what permissions your website has (including access to your database). -Nerseus
  22. I think I'm missing something... It looks like you're doing the following (pseudo-code) 1. Fill Dataset dsUserList 2. Bind lstUsers to table 3. Add bindings to numerous textboxes 4. Loop through all controls and clear bindings 5. If no records in step 2, clear all textbox Text properties 6. Do something weird with a Building Number Here's some comments: 1 and 2 look ok. I'm not sure why you bind textboxes, then clear all databindings. You should be calling clear before rebinding only, as in: Me.txtBldgNum.DataBindings.Clear() Me.txtBldgNum.DataBindings.Add("text", dsUserList, "tblAS400Users.LOC") Me.txtBldg.DataBindings.Clear() Me.txtBldg.DataBindings.Add("text", dsUserList, "tblAS400Users.Building") Step 5 shouldn't be necessary. If the bindings are in place and no records are returned, the textboxes should automatically be cleared (I think). If it were me, I'd also want to check the rowcount of the DataTable instead of the ListBox. While there is no real difference, the code would look "cleaner" to use the original data table for record counts instead of the control. Step 6 shouldn't be working at all right now since your textboxes all got cleared out in step 4. Normally, when using DataBinding, you only need to bind one time. After that, refreshing your DataTable using the DataAdapter should suffice. Is it possible to bring back ALL data in one query and never go back to the database, or are there too many records? You can do client side filtering using "LIKE..." filtering and bind to the filtered view (look at DataView object). You can also apply sorting (though it's always better to let the DB do it if possible). If the entire chunk of data isn't too big, this may be easier as the response time in filtering would be cut since it's all client side. -Nerseus
  23. If you have a subscription and a DVD drive, ask them to convert you. The DVD contains TONS of extras and can just sit in your DVD drive (very handy if you have two DVD burners, too :)) -nerseus
  24. I think the surfaces also support a GetDC method for using the GDI functions (not GDI+). But, to help with the errors (since the dx9 docs are mostly incomplete), use dbmon. Here's what to do: Before you open Visual Studio, go to your DX9 install folder. Then goto bin\DXUtils and run dbmon.exe. It will show a console-like window with some text. Leave this open. Now open your project in Visual Studio. Make sure you're in Debug mode and run the application. Set a breakpoint on any error lines you have (or just after) or just exit the app. If you now look at your console window (dbmon), you'll see (hopefully) a ton of good info about what's going on. The messages often reference invalid params and constant values in the C++ naming convention (all caps for the constant names instead of the enum names). But, you should be able to figure out what's wrong. Good luck! -Ner
  25. Funny... I *love* easy solutions :) -Nerseus
×
×
  • Create New...