Software Development Network Logo
  • IE Development
  • Smart Devicet
  • Windows Forms
  • Visual Basic
  • Microsoft ISV
  • .NET Development
  • SharePoint Products
  • Audio and Video
  • SQL Server
  • Visual FoxPro
  • Visual C++
  • Visual C#
  • Windows Vista
  • VS Team System
  • Game Technologies

Software Development Network >> Visual C#

Visual C#

New Question

Dumb question
Problem with Registry reading..
Validation
Construct Enum dynamically possible ????
Robotics Studio 2006
how to set the system time using WIN32 API Dll calls?
help needed on C#
Building Deployment projects from the command line (devenv.exe)
How to Make Form "Snap" to the Screen Edge of Another Form?
asynchronously or synchronously?

Top Answerers

jhidey
stefanh
Maxim Goncharov
Slyon
sparkdog
lawrieg
Shaf2k
Max Diamond
Javier Martinez
Jakein2006
sitemap
Only Title

Answer Questions

  • Joe Morel - MSFT Using SerialPort with USB and removing USB cable while port is open

    If I open a com port and then remove the USB cable from PC before closing the com port then there is now way I can dispose the com port after that. Not even Environment.Exit(o) works, i.e. I can not exit my program properly. The following code describes the problem: SerialPort port = new SerialPort("COM94"); port.Open(); int n=0; while (n < 10) { n++; Thread.Sleep(1000); } // (Remove USB cable before the while loop has finished) port.Close(); // <-- won't work port.Dispose(); // <-- neither will this Environment.Exit(0); // < ---and not even this one will work How can I work around this Btw the same scenario will appear if the USB device crash ...Show All

  • NozFx Output window focus.

    When build the project ( i use ctrl+shift+b) the output window get the focus, and i must do click in the editor code for follow writing, is very annoying . Exist any configuration parameter to avoid it Regards. Thanks. Pressing ESC while the Output Window has focus should restore focus to the editor so you don't need to click it. Alternatively: Go to Tools\Options Projects and Solutions\Build and Run uncheck Show Output window when build starts ...Show All

  • michaelmwelch communication between threads

    i am trying to write the sieve of eratosthenes multi threaded but am having a problem getting my threads to invoke and pass information to each other.Any one got any ideas i solved the problem. it was a matter of using the Set() and WaitOne() fucntions from the AutoResetEvent properly in the different bits of code. public void compute_prime() { TPrimes tnext = null; while (true) { int x; // the new number to check // Your code goes here: // Wait for a new number. // Get number here. use condition variable if (isprime(x)) // Check if prime if (n < MAXPRIMES) { /* i.e. we don't have all our primes. */ Console.WriteLine("{0}: {1} is prime", tnum, x); primes[n++] = x; ...Show All

  • Joe Truman change hex string to byte array

    How can I change a string of Hex (2 chars) values to an array of bytes. if I have: string strNumber = "0543af02dda1e6" to: byte[] byteNumber; I already make to get a substring of two characters from strNumber and use in a for(...,...,...) loop System.Convert.ToByte(strSubstring, 16 ); ------------------------------ Q : is there any more efficient, fast and elegant way to do it. Your for-loop is good. Now convert the Substrings with: byteNumber[ix] = byte.Parse(strNumber.Substring(2 * ix, 2), System.Globalization.NumberStyles.HexNumber); ...Show All

  • cybertaz69 Answer compobj.dll is too old for the ole2.dll initialized

    When I try to call using TAPI 3, i get this error; --------------------------- TAPI3 --------------------------- Failed to create call! compobj.dll is too old for the ole2.dll initialized (Exception from HRESULT: 0x8004000E (OLE_E_WRONGCOMPOBJ)) --------------------------- OK --------------------------- any idea please Thank for this solution, I can run the application. I have a voice modem , the model is Motorola SM56 Voice Modem. It is a Unimodem Half-Duplex Audio Device. I have speaker and mic. 100% sure it is work. Now the problem I face is I can make call, I can hear the dial tone from my speaker. The other party cannot hear what I say, I only can hear people talking. What is the problem In another case, I t ...Show All

  • Tim Rupe Transparent background

    Hello.I have a question.I use VC# and I wan' to create a nonrectangular form.I have create the background image with the transparent key: blue, but when I compile the project the application is not transparent! Hey there, if you haven't solve this yet, I have an answer that worked with me.... trying to create a 32 bits image with an Alpha chanel is to dificult... and trying to get the program for that is difficult too. so you can do this... 1° you need to set the Form.BackColor and the Form.TransparencyKey to the same color.. so when you are running the program, the color you set should be transparent.... you can test this by setting both colors White.. so the textboxes or other cotrols with this ba ...Show All

  • PedroCGD Monitoring Suspicious System Time Change

    I'm at a lot as what to search for but heres my problem. The current application I am writing depends heavily on specified dates. The program will compensate for any computations it may have missed since it was last ran. So the program doesn't have to run continuously. Each time the main loop executes I store a LastTick DateTime into a database. So if the System Date is set back I can catch this. But is there a way to tell if the system clock was purposely pushed forward w/out quering a web service The problem arises if a user pushes his clock forward by accident or on purpose and runs the application (or if the application is already running). The app will think that it just hasn't ran in X days since lasttick and compute and store vario ...Show All

  • TechNeilogy Capturing the up/down arrow key in a child form

    Hi, Recently, I was trying to capture the UP arrow key from my window forms application. I was able to capture the key in the parent form but once i open a child form, I would not be able to capture all the arrow keys but the rest of the keys like 'a', 'b','+' and etc are ok. I have searched the web but did not find any solution. Does anyone know how to overcome this problem Thank you. Soh Hi Here is the code in the KeyDown Event. private void frmGraphical_KeyDown( object sender, KeyEventArgs e) { MessageBox .Show( Convert .ToString(e.KeyCode)); } The Message box did not pop up when i press the arrow key but it did pop up showing "U" when i pressed ...Show All

  • Jessica Fisher Independent slide

    I made a custom button, i implemented some "slide function" and it works very good,when the user has the mouse on the control it slides to the right,and reset the default size when the MouseLeave event ocurrs, however, when i put several of the same buttons in a windows form, i put the cursor on top of each one, and they slide right, but they have to wait until the previous button resets it's size, so the slide function is not independent...how can i solve this , is neccesary to use different threads , and if i use threads, they should be declared in the Custom button class or in the windows app that use them All user interface code executes on the thread used to create the control handle. You ...Show All

  • Jeds Making help files for MS Document Explorer

    I remember there was a feature in VS 2003 that you could create HTML pages according to the comments you wrote in your codes, it seems that microsoft has omitted this feature in VS 2005.But i don't know if microsoft has replaced this feature with a beter one. By the way i wonder if you could tell me how can i create help documents of my program for Microsoft Document Explorer. Thanks in advance. Yes. HTML workshop helps you to create CHM files.But i want to create my own help files for Microsoft Document Explorer is it possible And by the way that feature in VS2003 was just something like java doc. Thank you. take a look here A guide to MSDN Collection Integration ...Show All

  • XenoByteZero C# Naming Convention and Guidelines regarding "this" keyword

    Hi there! In the software factory I'm working for, we're trying to define our C# coding standards. Now, I'm having some problems about the use of the "this" keyword. Our standard says now that "this" should be used only to avoid indentifier names collision (classic in constructors). Now, lot's of people in the factory say that "this" should be used everywhere, even if there is no indentifier name collision. for example:         public class Customers: List<Customer>         {             //members and properties omited.             priv ...Show All

  • Koruyucu Making an advanced settings form

    I am working on a user interface that needs to have a form added for advanced settings for the program. I have added a button and set the event handler for the button to call up the new form, but I am unable to get the program to take any of the settings from the advanced form. Everything is under the same namespace, but it will not find them, so when I try to build my program I get an error for each time that one of the settings from the advanced tab is called out. Is there a call out that I am forgetting, or do I need to change each callout to reflect that the setting is on a different form Thanks SVandal Glad I could be of assistance! :-) Yes, the AdvancedForm has the x_counts numericU/D control ...Show All

  • umer riaz Using File.Copy() Correctly

    I have been trying to use File.Copy to copy a file from a z drive that I made to a location in my C drive. The problem is I will get the error of "Could not find a part of the path 'z:\New Text Document.txt'" and I do not know what that means. This is the line I have been using, but let me know if I am wrong: File .Copy("z:\New Text Document.txt", "C:\AAAWorkspace\FTPProgramWinApp2\bin\Debug\New Text Document.txt"); I am 100% sure that both of these places (the z and c drives) exist at the time the code is executed. If it matters, I made the z drive via: sdps = System.Diagnostics. Process .Start( "net" , @"use z: \\" + downloadLocation + " " + pswd + @" /user:" ...Show All

  • jCarlisle C# Threads

    Hi, I have a problem with thread and i'm hoping someone can help me. I start a thread with the following code... Thread m_NewThread = new Thread(new ThreadStart(DoWork)); m_NewThread.Start(); The threaad starts find and executes the code within DoWork, for example: private void DoWork() { ... //Finished work so show thread finished ThreadFinished(); } Again it executes the code within ThreadFinished, for example: private void ThreadFinished() { .... //Thread has finished so show finish form and close frmFinished f = new frmFinished(); f.Show(); this.Close(); } Now this is where it goes wrong. Stepping through this code it show's the finished form as you can see it in the taskbar b ...Show All

  • Ehab EL_Gendy How to write to Excel file?

    I am using Visual Studio 2005 standard verison。 And I want to save data from SerialPort to an Excel file since the TXT file is not powerful... Is there any related material about realizing this I do not have the VSTO and there are few examples using Visual Studio C#... Thanks! Thanks AlexBB! I find a way to write directly to Excel file, however, still a lot of problems for me using Excel = Microsoft.Office.Interop.Excel; // first add reference to the project and then add this using statement using (StreamWriter sw = new StreamWriter((@"C:\" + DateTime.Now.ToLongDateString()+".xls"),true)) { sw.WriteLine(); } I can write data to the excel file, however, the format is not so cor ...Show All

363738394041424344454647484950515253

©2008 Software Development Network

powered by phorum