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

Software Development Network >> Visual C#

Visual C#

New Question

How to add SQL ConnectionString editor form.
validating gender
Getting applications Paths
Constraints in generic clases
Constraints in generic clases
SQL 2005 selected maximum between columns for each record
How can I strip HTML code?
How do I change the default language in Visual Studio 2005?
How to Save/open data to/from a file
C# size of objects question

Top Answerers

danmor
createdbyx
YWLMB
ahmed921983
Bulldog.NET
Dan Waters [MSFT]
dalterio
Ben S
Simpson474
Dan Mikkelsen
sitemap
Only Title

Answer Questions

  • ooh_flirty Writing to multiple files

    Hi, I want to read in a file which contains words ending with ';'. And after that, i want to write the content of it to multiple files. Depending on what the letters the word contains. Suppose the word is 'reader'. Then i want it to cute and paste this word to a doc called "EA-words". I declared and created the files. And i read in the document called "mixedwords.txt" and put its content to an arraylist. This is as far as i got: //declared 15 files to write to. while((linesInArray = sr.ReadLine()) != null) { compareLines.Add(linesInArray); } Anyone any ideas Thanks in advance! *confused* so you want to read a file which contains words ending with a semicolon ';' so basically ...Show All

  • DaveRogers Windows Service Problem

    Hello, I’m hoping someone at MS can help me. I’ve created a C# Windows Service project whose service main function instantiates a class library that spawns a new thread to create a new process with which to launch osk.exe (the Windows on-screen keyboard). The purpose for creating this service is to have the on-screen keyboard appear immediately after startup (before the login screen) on a system that will have no keyboard hardware. I had first built a test program (C# console application) to call the class library and test its functionality and it worked fine. Then I created the Service Project including its installer classes and installed the service with installutil. [Incidentally, all three projects—the class ...Show All

  • Paul B - Miami Set and Get text file properties

    Hi All, My application creates text files. I need to modify, programmatically, the created file's properties (available via righ-click > properties > Summary). Example 1: Set the string "Modified by Jack" into the comment field. Example 2: Get the Revision Number. Thanx, El. What you actually want is to access the Structured Storage, which apparently, is not available via the .Net Framework. Fortunately, this guy ("Mark") wrote a C# class to do it. http://www.hightechtalks.com/dotnet-framework-interop/reading-file-summary-net-186754.html (Warning -- it seems that High Tech Talks' URL rewriter ignores everything in the URL except the ID number at the end. ...Show All

  • JohnnyBlade How to Delete a XML node on a particular line using C#!!

    I am trying to delete a particular text value along with its root in an XML file  on a given line number, using C#. But i do not know how to do it, Please can anyone suggest me a solution!! Hi, you can't really delete by line number since one the data is read into memory there are no line numbers, however you can use XPath and XmlDocument::SelectSingleNode to locate the node if you know what you are searching for i.e. /Root/Books/Book[@Title='hello'] then you can get the nodes parent and delete the child i.e. XmlNode selectedNode = ..... selectedNode.ParentNode.RemoveChild(selectedNode); Mark. This is not possible using XML apis. Mark gave you work-around to do that but witho ...Show All

  • nice_boy_super A little bit stupid question..Sorry

    Excuse me but I`m a beginner in C#. My question is: I have a string s = "xxx xxxxx xxxxx xxxxxx xxxx", How I can convert it to: "xxx", "xxxxx", "xxxxx", "xxxxxx", "xxxx" Thanks ! Best Regards ! I want it to be exact that: "xxx", "xxxxx", "xxxxxx" Is this possible String s = "xxx xxxxx xxxxx xxxxxx xxxx"; String[] elements = s.Split(new char[] {' '}); String retval = ""; foreach (String elem in elements) { if (retval.Length > 0) retval += ", "; retval += "\"" + elem + "\""; } ...Show All

  • espana Attenuating SoundPlayer Volume

    I use SoundPlayer to punctuate long file downloads and other processes and give me sound cues of the app state in broad sense. One problem I have now is that the volume is so loud that after a long pause it might frighten me a bit with some sounds. Manually adjusting volume in SoundPlayer 10 does not seem to help. I cannot get a hang of it although I tried numerous inroads. SendKeys.Send ( "VolumeDown" ); did not work. I tried to exploit Volume.exe: Set Volume Control Levels Using Visual Basic at http://support.microsoft.com/default.aspx scid=KB%3bEN-US%3bQ178456&%5d and another related sites to no avail so far. It may all boil down to controlling volume in MS kernel sound mixer or something, I do not know. Please, h ...Show All

  • Dot Net Engineer How to use the controls from another form in form I working in.

    I have problem, I was using the Visal Basic, and now have to migrate to the C#. Its not a problem. But in first steps with C# I have found a few diferences from VB. One I cant solve. For example in Form1 I have a TextBox1 and a Button1. I enter in TextBox1 "sviec", and click the Button1. Then opens the Form2 with Label1 on it and label says "sviec". In VB the Form2 code looks like this: Public Class Form2 Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Me .Label1.Text = Form1.TextBox1.Text End Sub End Class So how I can translate this Me .Label1.Text = Form1.TextBox1.Text from VB to C# Thank You! ...Show All

  • aconquija Formatting Textboxes

    Hi there. I have several textboxes on a Windows form that are currency values. Is there an easy way to format them as such Meaning I want $1,200.00 instead of 1200. Thanks, Mike you may wish to look into this also: http://www.codeproject.com/cs/miscctrl/ValidatingTextBoxControls.asp http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=218113&SiteID=1  <- VB.NET you maybe better using a MaskedTextBox to do your custom formatting. Here is the doc for it with some samples: http://msdn2.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx I hope it gets you started However with limited experience personally with the maskedtextbox, still not sure it woul ...Show All

  • LiveGadgets Special Keys (arrows) + multiple key press

    I'm facing a problem considering the (UP,DOWN,RIGHT,LEFT) arrows when those four keys are pressed, the function doesn't feel with those keys any other keys are detected. private void form1_keyDown( object sender, System.Windows.Forms.KeyEventArgs e) Also,i would like to know how to detect the press of multiple keys at the same time thanks in advance sorry, but i don't understand what u meant by keeping track of events for keys i hope to detect Also, i am developing a real time game, so i need to get @ least 2 keys @ the same time. For example, right + up sorry for disturbance, and thnx There is no event for multiple keys, each key generate ...Show All

  • jwadew How to Get the Size of Each Partition of Hard Disk Drivein C#..

    Hello All, How to Get the Size of Each Partition of Hard Disk Drivein C#.. Suppose Hard drive has 4 partitions ..i wanna get the total size of that partition and free size in of that partion.. One Method is DriveInfo [] drives = DriveInfo .GetDrives(); but it does not return me the exact size.. i have 2.36 GB Free space and it is showing me like 2.02 or some thing less than 2.36....This problem occurs in each disk partition through this method... I have already Gone throug the WMI DiskDrive Class bt in it i found the property for partitions which return me the number of partitions nt the size of each partition... Any idea.. may be there is other method to get the size of each partion throug WMI Regards, A ...Show All

  • Simon Nunn documentcomplete event

    I've got a really weird problem with my application; it works on some pc's, and it doesn't on some others. What I've got: A Visual C# 2005 console application with references to MSHTML and SHDOCVW. I use mshtml to get a list of currently open browser windows, and attach events to it to edit the list when a new browser window is created or closed. I attach a documentComplete event to each open browser window and handle it the event there (let's say it prints out the url where is navigated to). So when I run this program, it should detect when I open a new browser window, when I close one, and it should print out the url of a site when it is done loading it. And there's my problem. On a few pc's, it all works perfectly. But o ...Show All

  • WedgeSoft How to design a class which can be used as "Enum"?

    Example: public Enum Type{T1, T2, T3}; Type myType = Type.T1; string typeFromDatabase = "T1"; myType = typeFromDatabase; // This is a obvious error!! Can I design a class whose functionality is just like "Enum" and much more powerful Your advise is very useful. I wonder which one is more efficient (Parse() or foreach (enType t in Enum.GetValues(typeof(enType)))   There is another question: What if the value in  "Enum" type is different from string type. What can we do For example public enum  Alphabet {Apple, Boy, Cat} Alphabet myLetter = Alphabet.Apple; myLetter = "A"; // What if the database only record "A" not "Apple" Anyway, t ...Show All

  • bluestar Compa Thread performance in C# and vb.net

    Hi! Are there some difference thread performace in c# and vb.net I have an app in vb.net with use some threads for imaging processing. So, it's some hard. I wanna know if a c# implementation would be better. Thanks a lot. VB and C# compile both in MSIL... then substantially is the same... If you want better performances you have to use unmanaged code with C++ or assembler... Ok... but .. is the MSIL produced by c# more optimized than vb.net Thanks again. I don't' know specific situations, but generally, if you write a code in VB and translate it to C#, then compare MSIL from both programs, you can view that they ...Show All

  • Ronaldlee Ejalu File.Encrypt( ) not encrypting...

    Hey guys, I am using the File.Encrypt( ) function to try and encrypt an XML file I have. The filename turns green when viewed in windows explorer (which I assume indicates an encrypted file). However, when I open with Notepad it is not encrypted. I then sent it to a co-worker to see if he can view the contents. It was not encrypted for him either. Am I missing something Thanks, Chris Ok, I understand now. Thank you for time and help. V/R chris Yes, but you are the one who sends the mail. If you open the file, it will not be encrypted. It is usual file for you (current account). That's why you can send it with mail. If you want to protect the file while you are sending ...Show All

  • AndrewLuiHK Update is not effecting to physical dataset

    Hi here i'm trying to add a new row to my dataGridView at runtime so i do like this DataTable dt = _dataset.Tables[ "employee" ]; DataRow dr = dt.NewRow(); dr[0] = "Nagu" ; dr[1] = 101; dr[2] = "Salur" ; dr[3] = 35000; dt.Rows.Add(dr); dt.Rows[2][1] = 600; _dataset.AcceptChanges(); _sqlDataAdapter.Update(_dataset, "employee" ); but it accepting locally but its not effecting the original database. How can i do this Is there any mistake Thanx - Nagu Hi, Have you used command builder, this will take care of sql queries. see the Example SqlConnection myConn = new SqlConnection(myConnection); SqlDataAdapter ...Show All

91011121314151617181920212223242526

©2008 Software Development Network

powered by phorum