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

Software Development Network >> Visual C#

Visual C#

New Question

What is the difference between debug mode and release mode?
error message: An object reference is required for the nonstatic field ....
DataGridView.Rows.Add... problem!
Developing web apps using VC#
is as Keyword
panel.visiable's problem..I've to double click then it works
Time validation
Interfaces and Contravariance Q. - No Delegates
( ), { } and [ ]??
Process Module

Top Answerers

Smriti
JKountouroglou
i7hira7
Dhow
kennm
Burnt1ce
MelissaA
rod 001
ramesh_1031
Indigo Cowboy
sitemap
Only Title

Answer Questions

  • SomeDeveloperPerson using classes

    hi! i don't know how to phrase my question but here it goes... i have many functions in my program and they are all placed in the form1.cs what i want to do is separate it and place all of them in a class. how would i do this do i just copy it and now how can i call it in my program thanks! Firstly I'd suggest having a look through the book recommendations thread at the top of this forum. You can extract pretty much any of the code in the form class and put it in your own, but you need to fix up any dependencies also. Think about breaking items out by function and role. Group similar types of code. And don't group too much stuff together, try to keep your classes nice and manageable. ...Show All

  • dagfari Weird one - Router Death by Vista

    Here's a weird one. It seems that Vista RC2 is routinely killing my ADSL router I have a dual boot system (patched up XP Pro vs Vista RC2). Vista seems to be killing my D-Link DSL-500 like...., several times a day while Vista is running. Has anyone else noticed this I'm thinking.... some sort of weird network plug and play thing (which is disabled - by the way) RickW The symptoms sound similar. I will try disabling IPv6 too. BTW: When I went to reply.... the router had hung and needed to be rebooted . hi, Yeah it D/C'ed for me too. Also found that when i start/shut down vista it resets the router. Haven't found ...Show All

  • Ketan1985 Visual Studio runs like a dog with more than 30 projects

    Hi, Not exactly related to VS SDK, but don't know where else to post, looking for thoughts from people with a deep understanding of the VS IDE. Over the past few years of developing with VS, each time I add a new c# project, VS seems to get a little slower to do things, to the point that it sometimes takes 5 mins to just load a form in designer mode in the IDE when I have over 100 C# projects in my system. It only takes me a couple of months of full time development to get to 100 projects (99 projects compile to individual DLLs that contain 3 or 4 Winforms typically, one project contains the main exe) and then the whole thing runs like a dog. One of the projects is also a used by all other projects as having the base classes fo ...Show All

  • Young_Bai Where is add Main Menu?

    Hi, The tutorial says, add Main Menu from the components, but I see no Main Menu there. Is that because the tutorial is an older version I have Visual Studio 2005. Thanks. Beatrix, you are right, the tutorial is probably outdated. The MainMenu control was available in VS2003 and was replaced by MenuStrip. You can still have MainMenu in your toolbox: just right-click on the toolbox, select "Choose Items..." from the context menu, and then select MainMenu from the list. Two simple suggestions: 1) Since the two controls aren't that different, try MenuStrip first and see if you can go through the tutorial anyway without cluttering your ToolBox with an obsolete component. 2) A lot of things changed with C# 2.0. ...Show All

  • MarcBeuret Convert UInt16[] to Byte[]

    I want to send data to a stream as a byte array. So I neet to convert my structure to an array of bytes. I have been using RawSerialize from http://www.vsj.co.uk/articles/display.asp id=501 however it fails when I pass in a array UInt16[]. So I am converting every field of the struct individually. Then I will have to concatenate the Byte[] somehow (still to figure the best way to do that) However, I still have a problem of converting the UInt16[] to Byte[]. Any thoughts The only thought I have is than unsigned ints are not CTS compliant, try to cast it to another type. anyway you may try with the BinaryWriter Class: It writes primitive types in binary to a stream and supports writing str ...Show All

  • Eugenijus Drabuzinskas Parent and child form maximize problem!!

    Hi all, 1. I have two forms, FormA and FormB. There's a button on FormA that when click will brings up FormB. The trouble I have is When I maximize FormA (the parent form of FormB), FormB doesn't maximize with it. Please, help me on how to do that. and another question! 2. How to let the user enter only numbers in a textbox and not letters Thanks Jason Hi, here's full code for FormA, hope it answers some of your questions... public partial class FormA : Form {     FormB childForm;     public FormA()     {         InitializeComponent();     }     private void textBox1_KeyP ...Show All

  • OliWarner save as dialog box

    Hello. I am making a web application and am using this code: Response.ContentType = "application/x-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(" ") + ".csv"); Encoding encoding = Encoding.GetEncoding("Shift-JIS"); Response.BinaryWrite(encoding.GetBytes(csvStr)); Response.End(); It works fine..the data gets saved nicely to an excel file. The user pushes the button to download the file and then a dialog box pops up that asks if they want to save or cancel. If the user presses the save, another dialog box pops up where the user can change the name of the file and choose where to save the file. The problem is that I have ...Show All

  • Mahender partial class and conditional compiling

    Hi, I have a following class declaration: #if LOW_LEVEL public sealed class Core #else internal sealed class Core #endif { } Based on the conditional compiling directive I want to control the access to the class. I do not define the LOW_LEVEL compiler directive (either in code or in project settings). I compile this class. It works fine. But when the class definition is split across files like below: //class1.cs #if LOW_LEVEL public partial sealed class Core #else internal sealed class Core #endif { } //class2.cs #if LOW_LEVEL public partial sealed class Core #else internal sealed class Core #endif { } and when I compile the two classes now ...Show All

  • Cristian Botiza password help!!

    When I'm inserting the pass word how can I erase a character that I inserted by mistake, the last one or all of then (one-by-one) using 'backspace' I know how to remove the last character but the * stay the same! Ex:   *****   >>abcde After removing the last character it stays the same!  *****   >>abcd Hi Schmack, add this when you want to delete the last * Console . CursorLeft = Console . CursorLeft - 1; Console . Write ( " " ); Console . CursorLeft = Console . CursorLeft - 1; -- SvenC ...Show All

  • Kamen private fields, public properties...why??

    Why is it preferred to have private fields and use public properties to access and/or set the variable values Some of the books i have read do explain why...but only vaguely. Does anyboday know the real 'life threatening' type reason why we should do things this way Thanks add verastility to the list of reasons why. you could add a property to a class that takes a single type as parameter and the value off that parameter could effect several member fields. eg. foo.Position = "200,200" ; Position is a property of foos type that takes a formatted string, verifys the value and stores the result in the private field x and y. Oh and it fires an event to any listners that ...Show All

  • GLutz78 params parameter must be a single dimensional array - (It is! Tell me it isn't!)<g>

    Wasn't the goal, and hope for .Net 2 / the next version of C# not to rely on boxing of objects For it is the cornerstone of Generics... typesafe arrays and no more boxing ! But one area was overlooked.....take for example this code using the params keyword public void Columns(params string[] ColumnNames) { ... } Nice convention! It saves keystrokes and makes code easier to use ...but it was not updated to use generics! The following code in .Net 2 gets the dreaded CS0225 error erronously telling the user that a single dimensional array is not being used.... public void Columns( params List<string> items ) { ... } Feel free to tell me that List<string> is not a single dimensional array. I sure think it is. Obviously the err ...Show All

  • Dave198026 How can I write a program that makes another program?

    I want to write a program that produces another program (i.e. a game creator or something of the like). I've done a bit of research and from what I've come up with it seems that this is a very hard thing to do. It won't be anything nearly as complex as a game creator, but I'm a relative beginner so I was wondering if there is a way to easily accomplish this. If someone could explain how to do this, or point me to a good resource, I would be delighted. Thanks for your time. Diego You could use the System.CodeDom to build components of the code directly, which I wouldn't advise, as it's probably a bit heavyweight for what you want. I'd personally generate the C# code as text and then use the CSC compiler t ...Show All

  • Memroid FolderBrowserDialog Exception when creating folder on Desktop

    Hi, I have a problem with a FolderBrowserDialog. I use VS2003, C# language on a Windows 2003 System and I ran the test project from an Administrator user. So, I tried to specify a path to a folder using the FolderBrowserDialog. However, if I browse to the current user Desktop and press "MakeFolder", an exception occurs: System.Runtime.InteropServices.SEHException: External component has thrown an exception. at System.Windows.Forms.Shell32.SHBrowseForFolder(BROWSEINFO lpbi) at System.Windows.Forms.FolderBrowserDialog.RunDialog(IntPtr hWndOwner) at System.Windows.Forms.CommonDialog.ShowDialog() at TestFolderBrowserDialog.Form1.btnBrowse_Click(Object sender, EventArgs e) in The folder is created but the Fold ...Show All

  • ile sending multiply POST commands simultaneous through Internet?

    Hello there. Currently I am using an online service to send SMS messages to a special group. These SMS include like if there is going to be a meeting and such. However always typing manually the phone numbers of each and everyone is getting tedious. Is there a some way to send a POST command to the website using C# Please let me know. thanks for the reply, however I am having trouble here is the code: thanks for the reply, however I am having trouble here is the code: OpenWrite method in System.Web.WebClient class or System.Web.WebRequest. For example take a look at http://www.codeproject.com/csharp/uploadfileex.asp thanks for the reply, however I am having trouble here is the code: ...Show All

  • Supersonic FreeAllUnusedJunk() ? any such method?

    I've got a program that runs through a loop, and during this loop, consumes a lot of RAM. of course, .NET is smart, and auto-disposes.. so the RAM usage goes something like.. 40MB, 80MB, 115MB, 230MB, 307MB, then it drops back down to something small again. The thing is, when this loop is over with.. the process could be eating up 40MB RAM, or 300MB. Is there some kind of global method I can call that basically frees up ANYthing that's not in use best practice would be to enclose in the using {} statement, the disposible objects which will try to be automatically freed up/disposed of but no guarentee it will at the time of the call. Example, streams: using (StreamReader sr = new StreamReader( file ...Show All

545556575859606162636465666768697071

©2008 Software Development Network

powered by phorum