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

Software Development Network >> Visual C#

Visual C#

New Question

settings.settings vs application configuration file
how to delete a row in both listbox and database
Subtracting Times with Date
Let me know how I'm driving.
Wrong Empty string convertion
Schedule Event
Visual Studio 2005 - conditionally suppress auto fomat
recursive locked methods
override and out keyword
Where *is* the right place to ask for C# book recommendations?

Top Answerers

jam281
TheBlackDahlya
goh6613
mstcrow5429
Qaja
arcoant
AlanCam
bbaldwinwa
S.Jan
Troy Lundin
sitemap
Only Title

Answer Questions

  • cmwith Mailbox unavailable. The server response was: 5.7.1 Unable to relay for [email]

    Anyone have a clue I have tried many different examples, but I just not sure about the credentials. I also do not have access to the SMTP server. please post the code you are using. for now check this out: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=760457&SiteID=1 No need. THanks. THe article helped. I was missing one line of code, mailclient.credentials = credentials... Thanks again. ...Show All

  • averge joe Windows Form Controls and Threads

    Hey, I'm trying to pass a ListView (called lstCode) to a seperate thread. I'm not changing the listview in any way, I'm just using it like this: [code] private void tsbPlay_Click(object sender, EventArgs e) { macThread = new Thread(new ParameterizedThreadStart(ExecuteAll)); macThread.Start(this.lstCode); } private void ExecuteAll(object lst) { ListView list = (ListView)lst; foreach (ListViewItem node in list.Items) { Macro.Execute(node.Text); } } [/code] I get the usual "Cannot use because of cross-threading blah blah blah". I've googled everywhere but I still need help. You could set CheckForIllegalCrossThreadCalls = false; But it would probably be ...Show All

  • alwayssmiling Generate set and get automatically

    Hi, is there a way to generate set & get via mouseclick from a classvariable e.g. int _someId; -> public int someId { set{ ;} get{ ;} } Right click the private variable, go to Refactor \ Encapsulate Field, or click the variable and Ctrl + R, Ctrl +E. ...Show All

  • Russ McDaniel how do i handle copying to a folder?

    Hi, we have an application that has to do something when copying or moving to a specific folder finishes. How do we handle if a folder has copying or moving process on it in c# t_pack wrote: Hi, we have an application that has to do something when copying or moving to a specific folder finishes. How do we handle if a folder has copying or moving process on it in c# I hope this snippet of code will give you ideas, please feel free to post if this solution is not what you are looking for. Im willing to help you. Thanks for the reply. Copy is done externally either from a local source or by the network, not inside the code. Only the name of the target folder is k ...Show All

  • AlexBB 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 I'm well aware that I can roll through the object model and compare properties. I was wondering if there was a standard shortcut to avoid having to do this. I have 100's of properties that I would have to check for... If you don't care for efficiency, and your clas ...Show All

  • Petru66 Data structures in C#

    Hi, I need some advice on the data structures to use in C#. My need is to construct a something like a code syntax tree. what would the embedded data structures in C# to use so as to ensure memory optimisation and run time efficiency currently, stacks/lists/ dictionaries are my choice of options. If any experienced C# developer would give me some sound advice, I would like to hear from you. Thanks well, i would love to avoid unnecessary data structures if need be. right now, the stack is there because of the nesting of the 'whiles' and the 'ifs' cos i need to traverse back to their root nodes in the stack to build onto the existing tree. well, if stack's pushing and popping wouldn't get in the way, ...Show All

  • nadlerb100 how do we translate my connection string from VB to Csharp

    Hi, Just place an @ sign before the string. Or use \\ to specify a single slash. This is because C# strings could contain format strings example is \n for newline. Your connection string should look like this: string myConn = @"workstation id=myPC;packet size=4096;integrated security=SSPI;data source=""myPC\LOCALHOST"";persist security info=False;initial catalog=myDataBase" cheers, Paul June A. Domag in my VB: myConn="workstation id=myPC;packet size=4096;integrated security=SSPI;data source=""myPC\LOCALHOST"";persist security info=False;initial catalog=myDataBase" Csharp doesn t acept : ""myPC\LOCALHOST"" withing another string . ...Show All

  • CGuyArun Attributes

    I just wanted verification on this. If I use custom attributes to document bug fixes in my code, will that effect run-time performance [ BugFix("01/01/07", "Fixed problem with calculation...")] [BugFix("01/04/07", "Added error-handling....")] public void MyMethod() { ................ Dont' worry about it I'll figure it out myself, there has to be a way to though to enter in custom attributes for comments so that intellisense will include it in it's list, and then you wouldn't even have the problem of a larger assembly. I just think the idea of getting bug fixes through reflection is kind of cool, you could build a class browser like the one smalltalk uses that dis ...Show All

  • Sanjoy Bhowal Disk Partition Free Space

    I am attempting to programatically retrieve the free space for all partitions on each disk in any given system. Using WMI, I have found a way to get the free space for logical drives within Windows but, I have found no way to get the free space for partitions that are hidden to Windows Explorer. For instance, dell PCs ship with a hidden partition that hold the restore image. This partition (and it free space) is visible in computer management (disk manager) but I can find nothing in WMI to retrieve this information. Is there a way using WMI or other means to retrieve this infomation in a C# windows app Thanks... if you are using .NET 2.0 you would be better in using the DriveInfo classes as it wou ...Show All

  • thusinh How to get a page source code of URL programmatically?

    From a C# routine I need to go to a URL page and download the HTML source code of that page bypassing the browser. I then intent to analyze the code and extract another URL -- but I already know how to handle it. I prever to have this page in memory, as a string variable, not as a disk file--it is intended for a very temporary usage. The challenge for me is to figure out how to have the program download the HTML code without alerting the Internet Explorer Browser. I am sure it is a simple problem for a longtimer. Hope for help. Thanks What do you mean by execute Open it in a new IE (or other default browser) window Try Process .Start(url); Andrej You can fetch the html page using HttpWebRequest class: Ht ...Show All

  • bhavu Check for null reference

    I have this check box thats gets loaded and it is of Type System.DbNull...But it breaks my code due to the fact i dont think this line checks for null values....How would i transform this line of code to check for a DBNull Value so it wont break my code... this .chkIsPrimaryContact.Checked = ( bool )_ContactToEdit["IsPrimaryContact"]; Check out the following: this.chklsPrimaryContact.Checked = Convert.IsDBNull(_ContactToEdit["IsPrimaryContact"]); Did that work Actually, I'd thing he'd want something like: this .chklsPrimaryContact.Checked = Convert.IsDBNull(_ContactToEdit["IsPrimaryContact"]) false : ( bool ) _ContactToEdit["IsPrimar ...Show All

  • Sriman exception on eventhandler SelectedIndexChanged

    private void ComboBox1_SelectedIndexChanged( object sender, EventArgs e) { // ComboBox take data from a BindingSource this .TextBox1.Text = this .ComboBox1.SelectedValue.ToString(); } Why this code generate an exception NullReferenceException when closing the MainForm if I make this.. this .ComboBox1.SelectedIndexChanged -= new System. EventHandler( this .ComboBox1_SelectedIndexChanged); the exception is not generated but I haven't the event that I need !!! Can anyone help me Thank all. Soe Moe wrote: Hi.. Normally, the ComboBox1_SelectedIndexChanged event won't occur after Form closing event. Did you do anything in the Form closing ...Show All

  • JasonRL Assign a bmp resource to a bitmap variable

    I create a resource bitmap as bmp. I can not assign this resource bmp to a Bitmap variable. What I would like to do is change or swap between two bmps every second in a picturebox image. thanks in advance for your help and time, Edward if its under a folder called resource, then im not sure if it will still need to "navigate" to that folder. Example: someFolder\filename.bmp or if it will still treat it as a single file: filename.bmp have you tried specifying the name of the folder\filename ok the problem was that the image was not embedded as a resource. After changing it to be embedded as a resource, everything worked fine. Once embedded, the resource name will be in the ...Show All

  • Jon Stalnaker C#: Launch URL from inside a windows application

    Hi,   I am new to C#, and was wondering if someone could provide sample code for launching a default website from within a windows form I have a userform with various buttons. I would like to click on a button and then launch the desired intranet website. I poked around the web and this is what I have found:-   Private void button8_Click( object sender, EventArgs e) { string targetURL = @http: //www.duncanmackenzie.net; System.Diagnostics. Process .Start(targetURL); } Any help is much appreciated.     Hello, How are you wanting this to be implemented Are you using a browser control in your form (a web browser will open within your appli ...Show All

  • Bulldog.NET C# & vb2005e

    Hi, I'm fairly new to c# and would like to check with the c# gurus out there... I need to to create a project that goes fairly in depth into the innards of dshow programming and I've been told that C# can go to some lengths that vb2005e cannot. Is this true I guess what I'm asking is can c# do all that vb2005e can and more To give you a simpler answer: C# allows unsafe code, whereas Visual Basic does not (and most probably never will). I gues that for using DirectShow, there are currently much that is not available for managed code, hence the idea of being able to go deeper into it if you are using C#. If you are interested in working with DirectShow from C# ...Show All

777879808182838485868788899091929394

©2008 Software Development Network

powered by phorum