Jump to content
Xtreme .Net Talk

Nerseus

*Experts*
  • Posts

    2607
  • Joined

  • Last visited

Everything posted by Nerseus

  1. What OS do you have? If Win95, Win98, or WinMe (or any OS AND you're using FAT or FAT32 file system), you can boot to a floppy and check if you're missing files. Otherwise, I have no idea what it is. mpagent.exe is a Windows Media player file - probably nothing to do with your error. What was the last thing you did/installed/ran before this error? Can you boot to SAFE mode? Hold down Shift while windows is loading (or just before it starts loading) to access the DOS-like menu to go into safe mode (there might be another way - ask around or search Google). If SAFE mode works, you might be able to figure things out from there. -Nerseus
  2. I'm not sure what you're talking about... The OleDb.OleDbDataReader object is NOT an ActiveX component. If you're using an ActiveX DLL somewhere, I don't see the code for it and I can't help if I don't know what code you're running. The code you posted creates a connection and reads some data then closes the connection - no problems that I can see (offhand). -Nerseus
  3. To see more detailed error messages, including parameters that are missing or invalid, use the dbmon tool. 1. Run DBMon (found in C:\DXSDK\Bin\DXUtils\dbmon.exe) 2. Run your application in VS.NET 3. When your program halts with an exception, look at the command window opened by dbmon - you should see a good description of what went wrong. You can also have error information spewed out to your VS.NET Output window though you'll get a LOT more than just DirectX information. To turn it on, goto you project properties and select the "Configuration Properties" folder, then the "Debugging" subitem. Change "Enable Unmanaged Debugging" to True. Now in your Output window you'll see something like (I cut out 50 lines of "loading DLL..." information): <snip> D3DX: (INFO) Using SSE2 Instructions Miss rate before optimization: 1.000000 Miss rate after optimization: 1.000000 Miss rate before optimization: 2.571141 Miss rate after optimization: 1.214765 D3DX: (INFO) Using SSE2 Instructions The thread '.NET SystemEvents' (0x33c) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x33c) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x2f0) has exited with code 0 (0x0). The program '[3972] Billboard.exe' has exited with code 0 (0x0). The program '[3972] Billboard.exe: Native' has exited with code 0 (0x0). -Nerseus
  4. The DirectX SDK comes with a conversion tool that will convert 3DS to X file format as well. Almost all 3D modelers will save as 3DS (I'm sure Rhino will). -ner
  5. I have the same version of the framework (build 3705) and I have no trouble with the Activated event firing on the child form. Here's what I did: 1. Create new C# winform project 2. Change Form1's IsMdiContainer property to true 3. Added a second form (Form2) and added an Activated event with a MessageBox.Show 3. Added a main menu and click event to Form1 4. In the click event I create a new instance of Form1, set it's MdiParent property to Form1 (I use "this"), and show the new form2. I see the messagebox, no worries. Maybe you could post a zip of your project and I could test it here, on my machine? -nerseus
  6. I think UDL is a Datalink file, to replace the DSN for ODBC connections, right? If so, you should still be able to open the UDL (just a guess) by specifying it in the connection string when using the OleDB provider...? Just a guess and I don't have a datalink file to test with :) You could, of course, use a custom XML file to store whatever you need to know about the connection string. You'd have to manually extract the elements you need and piece them together into a connection string. This would be similar to an INI file but would be a little more self-documenting and could, with some extra effort, also be easily validated with XSL (if you so-desired). -nerseus
  7. I'd only point out that using extra columns can be a great benefit if that's really what you need. Since you're not saving this dataset to a database - internal cache only you said - then there's no network performance with passing this extra data around. If you really need to store the column so that you have the data PER ROW, then that's probably the best route to go. If your table only has one row for saving values, then maybe you want something else - either a custom object or even a Hashtable (both of which would be more lightweight memory-wise than a DataTable). -Nerseus
  8. I'm not sure where you're NOT showing the form...? It sounds like your checkbox is one of those "Don't show this message again" things, but I need to see more code to understand what's wrong. Maybe show the code from the opening form, from the form that's the popup and any relevent events, all commented so I know what is where... -Nerseus <edited to correct my own name mis-spelling :)>
  9. I'm not sure where the ActiveX comes into play - maybe you could let us know more about it? I don't see anything wrong with your code off-hand. The connection is being closed and that should be all you need. Settign to Nothing is nice, but isn't the same as in VB6 - it won't really eliminate the object from memory immediately. Closing is the important part. Do you have any more details on the unhandled exception? Where is it happening exactly (which line of code)? The "exclusively opened by another user" error is usually when the database is openened through some other tool (such as when you open an MDB in Access). I'm not that familiar with dbase so I can't really guess. -Nerseus
  10. I assume you're talking about changing a node in an XML document on disk? The only way I know of is to load the XML into an XmlDocument, locate the right node with XPath (probably selectSingleNode) and then change its text (or is it nodeText) property. You probably don't want innerText in case there are nested nodes - the innerText will contain all of the inner text, not just for your node. Finally, you'll have to save the XML back to file. -ner
  11. You can also use a Text description to get back to the enum value, in case you want to store the Enum value by name somewhere (we have a need - strange rare case, but necessary) If anyone cares, I'll try and dig up the code. :) -Nerseus
  12. Check out this thread. You may want to send a private message to the other user to see what code they used for their combo. -Nerseus
  13. Have you tried this? -nerseus
  14. You can also use "this.Refresh()" (in C#) or "Me.Refresh()" (in VB.NET). This will cause a repainting of the form and all of it's controls but won't let any other windows messages get through (such as button clicks). You can also use the Refresh method on any single control, such as the TextBox or Label that you're updating. But you may see some strange artifacts by doing this - such as a form that turns ALL battleship grey except the individual controls you're Refreshing. I only mention this becaus calling "this.Refresh" may provide unwanted flicker if you have a large form with a lot of controls. Of course, this is only for you for now. But if it ever goes to another user and they're not as forgiving as you, be ready to change a line or two of code :) -Nerseus
  15. I'm not sure if this will help, but often when I get untrapped errors, it's helpful to look at the Call Stack (under Debug->Windows). When you get the "Break, Continue, End" message box, press Break (or is it continue?) and the code should be highlighted with a Green Line (sorry, don't have .NET with me right now). Now open the Call Stack window. Lines in black are your code, lines in light grey are system calls (windows messages, internal events, etc.). You should also be able to see DataSet events (such as ItemChanged and such) even though they're happening "internal" to a DataSet. You might be able to see what's causing the problem... -Ner
  16. By "documenting your code with XML" do you mean using the "///" comments above each function or class? If so, those comments can easily be pulled out into a document for handing off to other designers or to a client (if they're interested in such things). There's a built in documentation extractor that comes with VS.NET. I forget the name offhand as I only run it once a month through a batch file :p You can also add <xs:annotation> and <xs:documentation> nodes to an XML document to add documentation there, if that's what you meant. We use them at my job to document our XSD files and to add schematron information. If you meant something else by documenting with XML, let me know :) -Ners
  17. Nope, it works fine with WinXP (Pro at least, not sure about Home). -Ner
  18. I thought there was an issue with Dir$ but I can't think of it offhand... (maybe not detecting system files or something similar?) Glad you know about Dir$ - it's Awesome! Too bad it didn't include the ability to search through subdirectories recursively :) -Nerseus
  19. It's called vertical retrace now. I'm not sure if you can control anything about it with GDI+. With DirectX it's an option (can't remember offhand) so that the page flipping or drawing only occurs on verticle retrace, meaning that you can specify that you want to do the flipping/drawing in between a retrace (between the time the beam has finished drawing is going back to the top to start again). I can look it up later if you're using DirectX and need the help. With it turned on (wait for retrace), you're locked into a max framerate that matches your Hz refresh of the monitor, obviously. In my Ms Pacman clone, it sticks around 75 (close to my 80 Hz refresh at home). When turned off, it jumps to about 500. If you can't find it with vertical retrace, you may look for tearing or screen tearing, another common term when NOT waiting for the vertical retrace. -ner
  20. The "Standard" toolbar should also have a combobox with the default configurations (Debug and Release). If you hid it, right click on the toolbar and select "Standard" to turn that toolbar back on. Just pull down the combo and switch to Release - it will change all projects in your solution. You can also use the Build menu, Configuration Manager to change Debug/Release for each project in your solution (or all at once for all projects). -ner
  21. I think the tag is a holdover from VB6 but it can be used for whatever you find necessary. I've used it to hold objects in some rare circumstances. As Robby pointed out, you can now easily create a new class to add a few custom properties to controls. I've put boolean values in a TabPage.Tag (to determine if it's ever been visited), for example... -nerseus
  22. Two lines of code is one of the worst ways to do something? :p I think it's pretty convenient considering that in VB6, before FileSystemObject, you had to try and open a file and trap for an error just to see if the file existed... :) -Nerseus
  23. Here's a sample to set tabstops in a standard Listbox. // Declare the SendMessage API to set the tab stops // You can put this at the top of a form private const int LB_SETTABSTOPS = 0x192; [DllImport("user32", EntryPoint="SendMessage")] private static extern int SendMessageTabStops(int handle, int msg, int tabCount, int[] tabStops); // ... in Form_Load: int[] tabStops = new int[] {0, 50, 100}; listBox1.Items.Add("dan\tjones\tMe"); listBox1.Items.Add("bob\tjones\tHim"); listBox1.Items.Add("hagatha\tjones\tHer"); SendMessageTabStops(listBox1.Handle.ToInt32(), LB_SETTABSTOPS, tabStops.Length, tabStops); The above creates three tabstops. One at 0 pixels (left aligned), one at 50 pixels and one at 100 pixels. You can create as many as you want. If you don't know C# syntax, let me know and I can convert to VB.NET (maybe). Not sure how to do a tab character in VB.NET, maybe it's still vbTab? Wishful thinking... :) -Nerseus
  24. For the record, I *hate* when windows flash. I turned the option off in XP because it annoyed me. The only time I find it acceptable is on a LONG-running process to alert me that it's done or when I've set a breakpoint in VS.NET and it hits but a form is on top (then the IDE flashes so that I can tell it's on the breakpoint and not still running). That's just my opinion - maybe you've got a good reason to want to flash. -Nerseus
  25. Assuming you're dragging and dropping all on the modal form, there shouldn't be any problem. If you want the modal form to be able to drag stuff and drop it on the parent form, then you can't do that. What you may want is to make your "modal" form non-modal again but mark it as Always On Top (can't remember the property offhand). That makes the form more like a toolbar. You'll be able to work with either form but the one marked Always On Top will be.... well, always on top :) -nerseus
×
×
  • Create New...