Answer Questions
Hussain Saffar Simple Computer
I'm trying to create a Simple Computer simulator in C#. Its been going well up until ive reached a point where i need to have actions performed step by step when a button is clicked. A little background: The simple computer is a simulator that helps show students how lower level languages interpret commands. In the program: I have 99 Text boxes representing memory cells, 99 Text boxes representing input cards, 99 Text boxes representing output cards, a text box representing the accumulator (basic arithmatic portion of the simple computer), a text box representing the Instruction Register, a text box representing the Program Counter, a button that manually steps through the program entered in to the memory cells, and a button that should s ...Show All
AlxJ Detecting changes for "Save" and "Save As..." purposes
I have a base abstract class that contains a generic dictionary. All of the derived concrete classes inherit this dictionary. The Value of the dictionary is of the base class Type. This is to allow adding/deleting of derived types. Ok, what I would like to do, is detect when changes have been made in the object model, so that I can implement a "Save" and "Save As..." method. What is available out there that allows me to do something like this ok, but in the example that I just provided, wouldn't that mean that these were the same objects I don't think there's any kind of short cut. In http://msdn2.microsoft.com/en-us/library/bsc2ak47.aspx Notes to Implementers This method can be overridden by a de ...Show All
veXed Error when exporting to Excel
Hello, I am using Microsoft Excel 11.0 Object Library to export data to excel spreadsheet and I am getting COMException. It seems like whenever I have tab characters in my data, I will get the exception. Does anyone have any ideas Thanks You'll probably find a very knowledgeable audience for this sort of question in the forums at the Office Developer Community , or more specifically the Excel Developer Community . -- Peter ...Show All
Tom25 Turn off "Are you sure you want to delete all of the bookmarks?"
This is more of a minor annoyance than a real issue but if anyone has a solution I'd be very appreciative. When you delete all of your bookmarks from a solution in VS2005 (Ctl+B,Ctl+C) you always receive a confirmation dialog asking you if you're sure you would like to do this; does anyone know a way to disable this confirmation I've haven't been able to find anything in the Options (though I may have missed it) and I know that some VS options are really surfaced in the UI but can be controlled by registry keys. Has anyone ever ran across how to turn this off Thanks in advance, Jeremy Yeah. It's pretty annoying. Is this something that will be customised or removed in a service pack or ...Show All
pdurbha Write text over images...
Hi, How can I write a text over a image, defining the position of the text... Like I have a picture of a man holding a whiteboard and inside it I want to write "Enter"... I have the coordinates already... Thanks I don't believe it's possible unless you do alot of messing around with unmanaged code. The Chanel 9 link i posted may do it. OK, That's solve my problem but I got this error " A Graphics object cannot be created from an image that has an indexed pixel format" Graphics Manipulation primiarly starts from the Graphics object. void WriteText( String input, String output, String text, Int32 x, Int32 y) { Bitmap TmpBitmap = ...Show All
cuetumayu System.Diagnostic.Process.GetProcesses()
Hello, I have a quick question about the process array being returned from the GetProcesses(). Specifically, why does the process array contain an entry for explorer.exe but I can not get the title of any of any explorer windows open. For example, I have 3 explorer windows open each viewing a different directory. But, none of them show up when I bind my list of a grid control. So, do I need to ignore what I get from the GetProcesses() call and just enumerate all top-level windows that are visible Is there another technique that would allow me to continue to use the Process[] without having to resort to interop Thanks for your time/help! .jdt. Not ...Show All
hrubesh How can i avoid the Unicode File conversion wizard at the time of opening up the document? [C#.net---Ms-Access---MS-Word]
Hello All, We are supposed to create a Word doc file for our client that is to be used for printing a large list of names and addresses. I am facing some problem at the time of retrieving the data from MS-Access and showing it in the Ms-Word Document[here i am using C#.net Windows Application]. The below is the code for your reference: private void button1_Click(object sender, System.EventArgs e) { try { button1.Enabled = false; StreamWriter sw; DateTime dt = DateTime.Now ; string strFileName = @"Rene's book .doc"; string strMyOdbc = "SELECT * FROM Contacts "; strMyOdbc += "ORDER BY Account, LastName"; OdbcConnection m ...Show All
wadnerk How many threads should a process possess?
Hi, everyone: My application runs with its thread number ranging from 40 to more 60. I wonder how many threads a windows process should have. I have checked a lot only to find that the general MaxThreadNumber for ThreadPool is "25". But how about threads created by Thread.Start Further more, after Thread.Start() was executed in my application, I was surprised to find the the thread may remain "Unstarted" under a uncertain condition which brings about a hang-up. Does this happen just because of too many threads in my application Thank you Thank you very much for your reply. My application is a background service without any graphics in Embedded XP. It has many connect ...Show All
Ayatollah89 Stored prcedyre help nr. 3
I am making an winapp in C# and have SQL Express database that I want to get posts from. User can type in the search criteria so I made an Stored procedure. look here: ALTER PROCEDURE dbo.finnKunde @fornavn varchar AS SELECT KundeID, Fornavn, Etternavn, Adresse, Postnummer, Poststed, Telefon, Epost FROM Kunde WHERE (Fornavn LIKE '%' + @fornavn + '%' ) OR (Etternavn LIKE '%' + @fornavn + '%' ) OR (Epost LIKE '%' + @fornavn + '%' ) 1.) first problem is that when I run this sql in Sql buider it works fine, it returns correct values, but when I run this stores procedure it returns all posts from my table...any suggestions. Defining t ...Show All
Burrough Good examples for interfacing c# with sql server on the web?
Hello, I am looking for some good examples for managing data in a database with c#. I need the basics, preferably relating to using c# in visual studio. Can anyone point me to some decent material on the web Thanks, Toben Here is a 7 lessons tutorial http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx you can also take alook at database section at this site http://www.c-sharpcorner.com/Database.asp and this a good article about sql server do and don't other http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/ADOPlusOverview.aspx On this same question for Managing Data with sql..... Is it possible to generate a "TEMPLATE" to pull the data from sq ...Show All
ACraigM119 Unhandled exception only when running in release without debugger attached.
I am beyond baffled by this. My application throws a System.AccessViolationException only when it is run in Release mode without the debugger attached (as in, I run the exe directly, outside of Visual Studio or I do "Start Without Debugging" in the Debug menu). Debug mode - everything works great; Release mode with debugger attached - everything works great. The very nature of how this error is thrown makes it impossible to debug, so I have no idea where to look into correcting it. Has anyone else ever come across such an error Does anyone have an idea how to hunt down such an error The application is not just a few hundred lines, it is easily on the upper end of tens of thousands of lines. I cannot seek it out with a debugger be ...Show All
Ranier Music
Does anybody know how to play a mp3 file ALso does anyone know of a way to trigger an event after a songf is done playing Maybe get access to its length and time it or something Steve Moved from windows forms designer. where would i be able to find these different SDKs and files take a look at this: http://msdn.microsoft.com/library/default.asp url=/library/en-us/wmplay10/mmp_sdk/usingtheplayercontrolwithmicrosoftvisualstudionet.asp http://msdn.microsoft.com/library/default.asp url=/library/en-us/wmplay10/mmp_sdk/embeddingtheplayercontrolinanetframeworkapplicatio.asp http://msdn.microsoft.com/library/default.asp url=/library/en-us/wmplay10/mmp_sdk/embeddingtheplayercontrolinavisualbasicnetsolution.asp ...Show All
BobInIndy Instantiate Objects
I have an class which has a method that will open a form. I want to pass which form this method should open as a parameter when instantiating the object. I don't want to instatiate the form until the method is called. How can I pass to the object the form that the method should open. It seems like there should be an easy way to do this. Thanks well you would need to, I guess, use a generic object (since you need to know the type of form it is to open it) and then check the type of form, create an instance of that type found and then open the form - but there will be a better way. why must this method open any form you give it why cant you instantiate and open the form before hand and the ...Show All
StSt Returning Focus of a "lost" window
Hello, I am working on a project in which the application will only allow one instance of itself to be running at a time. I have figured this part out but the part that has be stumped is if the instance already running is "lost" (hidden behind another window or minimized or somehow off the screen) to bring it back to the front of the screen. I have tried focus and bringtofront options but those do not seam to work. Thanks for any advice on this. Hello, Have you tried this way: http://msdn2.microsoft.com/en-us/library/ms996475.aspx to force only one instance of the application Hope it helps. Thank you using System; using System.Runtime.InteropServices; using System.Windows.Forms; u ...Show All
XNA Rockstar Management a binary data stream
I have to download a set of binary records (S1) from a remote server. I do it easily. The problem comes up when I try to download a set of sets , so to speak in a loop. Processing a single set (essentially, this set ends up in a DataTable) is handled in a Thread . I use a demo that I've adjuted to my wrapper (app) and I really still do not understand how this thread is set up. There is no explicit Thread class instantiation in the code. Perhaps when a new Socket instance is created the thread is set up automatically, I do not know. Anyhow, downloading one DataTable causes no trouble. When I tried to automate process for many tables I ran into a problem. In a loop where the request is formulated there is a call to the routine that handle ...Show All
