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

Software Development Network >> Visual C#

Visual C#

New Question

custom buttons in MessageBox
how to instantiate interface
creating a sprite from a file picture
namespace question
Change Service Logon information programatically?
WinForms Problem
Accessing a public item through an interface
C#
Character into bytes
WindowsApplication1.exe has encountered a problem and needs to close...

Top Answerers

Cuneyt Deger
Vj5
Tim Hunter
GriffinSmith
silentC
Rashar
eldiener
anantvemuri
Monah84
Islamf
Kinghost
Only Title

Answer Questions

  • Xp3ll3d A question of OO structure...

    Hello All, I'll do my best to explain what I'm trying to accomplish and look forward to any and all suggestions you have for the "proper" way to do this (realizing there is no 100% correct way, but some methods are more optimal than others). I apologize in advance for my n00bness. For this example, I'll use football (american) players. I want my Player class to have a List<Stat> collection of my Stat class. Each Stat, which is an indicator of how well a player plays a particular position, should have a base value but be able to return a "true" value which is a calculation of the base value plus a percentage of one or more other stats. For example: a Player's Halfback stat might be base value plus 50% of the Fullba ...Show All

  • Electronic75 Operator that adds two Points

    I think I would have to use the following code: public static Point operator + (Point point1, Point point2) {     return new Point(point1.X + point2.X, point1.Y + point 2.Y); } But I don't know why it doesn't go Ok I think the problem is that I wasn't defining the operator in the Point class. Thanks, What probelm do you get The following works fine - I copied & pasted your method into this class: class Point { private int x; private int y; public int X { get { return x; } set { x = value ; } } public int Y { get { return y; } set { y = value ; } } public Point( int x, int y) { this .X ...Show All

  • Eric Marthinsen Updating a User Interface from a Background Process

    How to update the user interface in windows application using the background process in C# ( .net 2003) Hi Venkata, You can update the UI in a Windows application from another process by invoking the desired control by calling "controlName.invoke()" in the other process methods and then calling Application.DoEvents() method to apply the changes. Regards, Ahmed H. Waly ...Show All

  • Phil026 How to show all TODO items?

    When I open the "Task List -> Comments" not all TODO's from the project are shown. It seems that the IDE does only scan the open files. What do I have to do Hi, MartinZ. You are correct. Unfortunately, this is a limitation in Visual Studio 2005 C# projects . For C# projects the Task List will only display comments for open files. From "How to: Create Task List Comments": "With Visual Basic projects, the Task List displays all of the comments in the project. With Visual C# and Visual J# projects, the Task List displays only the comments that are found in the files currently opened for edit. With Visual C++ projects, the Task List displays only the comments that are found in the file currently ...Show All

  • ADub ConfigurationSettings in with Remoting

    Good day ppl, What I'm trying to do is allow my user to edit certain settings in my config file for a .net remoting application i wrote. I know that ConfigurationSettings.AppSettings allows you to enter the AppSettings key. What i want to do is through code, be able to edit my config file keys like - "povider" and "formatter". Really all of this is just to change the port and minor settings. My point is, ConfigurationSettings.AppSettings, limits me to just the "AppSettings" key, and i need to kow how to edit the other keys. ConfigurationSettings.AppSettings is just for setting configration beforehand(and it is absolete now more info: http://msdn2.microsoft.com/en-us/library/system.configuration.co ...Show All

  • Jamie Thomson check valid path

    Is there away to check a valid DOS path in c# ex: if the user types zzz:\test.txt and the path is invalid, return error message.   using VS2003 .NET1.1   Thank you, If you use System.IO.Directory.Exists it will return true if the directory exists, and false if it does not. If you want to check whether the drive is valid, you can use System.IO.DriveInfo.GetDrives to give you the valid drive names. Ok. Is there away to check if the path user entered is valid ( Exists ) or not. because I will never know if it is invalid path or folder does not exit using System.IO.Directory.Exists . Because if the folder does not e xists I can create a folder . Thanks, ...Show All

  • torvaldson Inexplicable behavior following removal/renaming of linked resources

    I am a beginning C# developer, and my project had been coming along nicely until the following: (1)    Before problems occured, I had a program with perfectly functional MenuStrip and ToolStrip controls (the Microsoft standards), many of whose items had image properties set to linked resources. (2)   I added functionality to select and preview sound effects, adding several .wav resources. I had numerous statements in code of the general form below to tell the program which sound to play. player.Stream = Properties.Resources.BloopsQ; (3)     I tested the program with this new feature, and it performed fine. (4)    I decided that one of the .wav files needed to be cleaned up, so I r ...Show All

  • Grotius Am i in the wrong forum with this Query, could somebody direct me to the correct one?C# convert Excel to PDF or any image format

    I have a C# application and i am trying to figure out the best way - or any way to retrive data from my excel file and convert it to a pdf file for printing. Thanks, Pam My main objective is to get the document to print wth all the current excel formatting on the client machines.. which is why i was looking for direct convert to a pdf format... but if i can even figure out how to convert to an image format like .tif, .bmp or a .jpeg i can still convert it to .pdf from there at run time... Currently i am trying to directly print it as: Microsoft.Office.Interop.Excel. ApplicationClass app = new ApplicationClass (); if (app == null ) { MessageBox .Show( "ERROR: EXCEL couldn't be started!" ); return ; //System.Windows.Forms.Applic ...Show All

  • lagu2653 Error:System.StackOverflowException: Exception of type System.StackOverflowException was thrown.

    Dear all, when I executed the following aspx file, the error of "System.StackOverflowException: Exception of type System.StackOverflowException was thrown. " occured.  Pls help to identify the error for me. Thks. CS file: using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Collections; using database; namespace article {  public class webcolumn  {    private string _colid;   private string _colname;   private string _upcolid;   private string _layer;      public string colid   {    get {return _colid;}    set {_colid=value;}   }  &nbs ...Show All

  • LeeroyB how to prevent Editing reference types from out side my class?

    hi, i just want to understand this, its recomended to use properties as wrapper for class members to control editing or to check the value or what ever, actualy thats good but with reference types i found this is almost useless for example i wrote this class to demonstrate my point if i have a list of strings , and the property is ReadOnly but i still can edit the list, yes i can't change it but i can edit it using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main( string [] args) { test tst = new test (); Console .WriteLine( "before Adding\n\n" ); foreach ( string s in tst.Items) { Console .Write ...Show All

  • PsyCadelik Replace char in c#

    I had a string "2006/01/27 00:00:58.747", and I would like to replace "/", ":" and "." with "_". Can anyone let me know how to do it in C# Thanks The Replace method return the replaced result, so change your code to: string newModemNumber = reader[ "MODEMNUMBER" ].ToString().ToUpper(); newModemNumber = newModemNumber.Replace( '(' , '[' ); newModemNumber = newModemNumber.Replace( ')' , '' ); Replace single quotes with doubleqoutes You can use the String.Replace( char, char ) method to replaces all occurrences of a specified Unicode character in this instance with another specif ...Show All

  • Terkamian XML newbie

    I am trying to read all the values under Genre_Country and Genre_Funk. To loop thru each genre...and get the Title and url. Driving me nuts.... < Radio > < Genre_Country > Country </ Genre_Country > < Title > .977 The Kickin' Country Channel </ Title > < url > http://64.236.34.4:80/stream/1075 </ url > < Title > 1.FM - Country </ Title > < url > http://64.62.194.11:8020 </ url > < Title > .977 The Kickin' Country Channel </ Title > < url > http://205.188.215.230:8000 </ url > < ...Show All

  • Ather. Time Passed

    Is there any way to determine the amount of time that has passed from one specific point to another I.E. If the user logs in at 16:00 and logs out at 21:00 is there any way to tell that 5hours have passed Cheers Thomas well if you dont know the end time then how can you get the difference Do you mean to find the diff between the start time and current time take a look at the TimeSpan class, this will do this for you http://msdn2.microsoft.com/en-us/library/system.timespan(VS.80).aspx Example: DateTime startTime = DateTime.Now; DateTime endTime = startTime.AddHours(3); TimeSpan diff = endTime - startTime; MessageBox.Show(diff.ToString()); What if the endTime is not kn ...Show All

  • Rob_MUFC_1982 Class libraries (dll) using in a windows form

    Hi, I've made a class library called: counter. Now I want to use counter.dll in my project yahtzee. How can I say to my form.cs that he must use that dll (soon more than 1). And how can I call the functions that are in my counter.dll I've already got it in references but I assume that's not enough because I can't call any function or methods from that dll. thx Are You Kidding me . I scrolled and Scrolled and Scrolled but it did not ended. Make sure 2 things: Your Application Runs without error when you dont use DLL YOu have Added Refernce to Counter.dll and it exists in the References of the project in Solution Explorer Best Regards, Referenced again and again but's it ...Show All

  • Eljdee1 How to Get One Millisecond Timer?

    Currently I am working on a Signal Graph control. The control will draw the signal state (ON or OFF) for selected device or IO point. I need a Timer that tick every 1 millisecond to scan the signal state because signal state change too fast (ON and OFF). I had tried all the 3 timers provided in .NET Framework, which are System.Timers , System.Threading.Timer and System.Windows.Form.Timer . However, I failed to get a timer that can tick in 1 millisecond. All of them had a delay between first tick and second tick: System.Timers : delay about 15ms System.Threading.Timer : delay about 15ms System.Windows.Form.Timer : delay about 60ms The delay cause me missed some of the signal state. Is there any other way to get ...Show All

171819202122232425262728293031323334

©2008 Software Development Network

powered by phorum