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

Software Development Network >> Visual C#

Visual C#

New Question

Changing windows time from my application ??
Locating files using wildcards
Visual Studio 2005 TS crashes under Windows Vista Ultimate
Dots and Commas
Type initializing function throws an exception
Exception in custom sink not handled when debugging
Exposing soap functionality to c++ using c# via com...
Only support "DateTime.Now.ToLongDateString()" in file name?
Close() & Dispose(): which one or both?
*csv string conversion

Top Answerers

pkrug
graye
László Nánássy
pfh
Mehdi Mahdloo
Biocide
Raguvind
DiZASTiX
Scott Boyd
Pareshbsel
sitemap
Only Title

Answer Questions

  • MilesP How to get names of Columns without datatype?

    Hi, i want to get the columnname of an dataset, but without the datatype attached. The dataset is filled by the readxml-method and the columnname looks like this: defaultUser_text My xml-file contains this: <defaultUser>admin</defaultUser> Is there a way to rip off the _text or do i have to cut it the dirty way, manually Thank you. That's exact my problem, i do it THIS way :) and i don't know how to kill that _text without parsing and splitting. public Dictionary < string , string > getSettings() { DataSet dsSettings = new DataSet ( "dsSettings" ); try { dsSettings.ReadXml(fullPath); } catch ( Exception ) { return null ...Show All

  • Jiffy How to send Fax Using C# ??

    Hi I have config the Fax service in Windows 2003 . but How to send Fax Using C# And thanks with my best regarding Fraas Hi All, I used the following code and it worked fine when runing the web application from visual studio: doc = (FAXCOMLib. FaxDoc )server.CreateDocument(TheFile); doc.FaxNumber = faxnumber; doc.SenderFax = "765765765" ; doc.SenderName = senderName ; doc.SenderAddress = "test" ; doc.SenderCompany = "My Company" ; doc.RecipientName = recipientName; doc.DisplayName = displayName; response = doc.Send(); return response.ToString(); server.Disconnect(); But when I tried it from Internet explorer, it gives me th ...Show All

  • sureshsundar007 Can't see my design form in VS2005

    Hello I have an application, I dropped a DataGridView onto it and then put 3 rows namely Event, Time and date into it. It does not connect to a database - I put the text into the rows as follows: string [] s = { sSensorEvents[iAlarmType], sRecord.Substring(25, 2) + ":" + sRecord.Substring(28, 2), sDay + "/" + sMonth + "/" + sYear }; dataGridView1.Rows.Add(s); and repeat this a number of times This works fine and the data displays when I run it. However when I return to the visual design form (i.e. close VS2005 then re open) I get the following Warning message: Unable to cast object of type 'System.Windows.Forms.DataGridViewTextBoxColumn' to type 'System.ComponentModel.Component'. a ...Show All

  • skinnybuddha Filter an Array

    I have an array that is loaded with any files that the user has selected in a file browser dialogue. Right now the array gets loaded with everything in the folder, but I just want it to load image files that can be used as a wallpaper. Also I would like it to grab anything that is in any sub directories as well. you could also do this: foreach(string currentFile in Directory.GetFiles(fbdWallpaperDirectory.SelectedPath)) {    this.clbSelectedWallpapers.Items.Add(currentFile, false); }   this will not select the items initially (unchecked) when the user checks them, perhaps place a button which does the randomization. private void cmdPickPicture_Click(object sender, Ev ...Show All

  • prashantpsoft Using DeviceIoControl and IOCTLs from C#

    Hello, I'm currently working in a C# project where I require the use of DeviceIoControl(). It seems that there is no implementation of this function under c#, is this correct If this is the case what would be the best way of including calls to this function within the project Would it be best to create a separate project within the solution, and if so is there a link out there that goes over this type of solution/project Thanks, Devan Putting the code in a separate C# project will not in any way make it easier to call the function. It will only affect the modularity of your code. You have to call the function through P/Invoke either way. Thanks for the hint about P/Invoke Mattais. P/Inv ...Show All

  • rocky_don How to force VS2005 to NOT load a .CS file in design view.

    Hi All, I have a standard run of the mill CS file, which contains a couple of classes. Actually the project has several CS files and all of them open perfectly normal except this one, which VS05 wants to open in design view. The offending item is that this particular class is based on the system timer. using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; namespace MyNameSpace {     public class MyOrdinaryClass : System.Windows.Forms. Timer     {     } } As you can see this class is super ordinary with the exception that I based it on the system timer, which is fine. I just want VS05 to open this file in ord ...Show All

  • Shaiq Bashir Create a snap-in using VisualStudio 2003 C#

    Hi I have to create a snap-in(for a MMC). I'm trying to do that using VS2003, C#. The .NET framework version is 1.1 I searched for information and I found a basic sample at the following link:http://windowssdk.msdn.microsoft.com/library/default.asp url=/library/ en-us/managedmmc/html/56f458d3-5c65-4664-8107-2ba04efd7d65.asp I tried to compile the code, but I got an error message "The type or namespace name 'ManagementConsole' does not exist ". So, I succesfully installed the MMC 3.0 version for XP(with SP2). I also found the microsoft.managementconsole.dll file(C:\Windows\system32\) and I tried to add a reference to it in my sample project, but I got an error message: "...This is not a valid assembly or COM component" ...Show All

  • Avi29 How to open Excel sheet and use macros in .NET 2.0

    Hi all, I need help regarding this. I've to open an Excel workbook and then a worksheet in that workbook and then use the existing macro's script to generate the Pivottable report. My main concern is how to initialize and open Application,Workbooks,workbook and worksheets in Visual c# 2005. Any kind of help is great welcome Regards Amit ...Show All

  • BurritoSmith move file to a directory

    Hi everyone, i’d like to move files from a directory to another directory, with move() or copy() i can only move a file to another file. Can you tell me how i can solve this problem please. Thankyou Hi ahmedilyas, thankyou very much for your help! that works for me. Hi, Do you mean you wish to move all files from a directory in one go You could use Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory() but remeber to add Microsoft.VisualBasic as a refrence. Regards you really shouldnt be adding references from a different language/using a different language assembly. It's not recommended. you can move all files from a directory, by going through each file/ ...Show All

  • doank Capture program state and resume it on other pc(device)

    I'm trying to save the program state when a application is shut down to resume it later from whatever the user left it before shutting it down. In the long run it should be possible to save the state of program, transfer the program to another device (online via network, ofline with a file) where it's dynamically loaded throe reflection. Kind of Mobile agent but not that advanced. First problem is how to get the state of a program saved to a file. Currently I'm trying something with ExecutionContext to see what this is and if it's usefull to me. Is there anyone who has done this before or has any idea how to do this Cause I'm not sure if I'm capable of doing this in the time i have and i'm certainly not a C# guru ... would ...Show All

  • JRLiem Base class array to string array conversion

    System. Array myvalues = (System. Array )range.Cells.Value2; Now wanted to convert the base class array myvalues to string [] array. How should we do it Thanks! edukulla, The problem I see in your code is that arrays are zero-based in C#. This means that: vals = new string [10]; will allocate an array with 10 elements, numbered from 0 to 9, while you are trying to access vals [ 10 ], which is the 11th. Try to change, in your code: vals [ i - 1 ] = ((Excel.Range) worksheet.Cells [i, 1]).Value2.ToString (); HTH --mc I'm not sure your cast to System.Array is correct in the above code, though - it looks a bit odd. Assuming it's fine, though - Since you don't know ...Show All

  • Nirdesh Dabas How to find the folder or file path dynamically?

    Hi.. I needed to access the folder name in which the user has selected. For this i tried the FileInfo method. This is the code i tried: FileInfo fi1 = new FileInfo (path); txtDocName.Text = fi1.Name; But i need to get the path of the folder or file which the user selects. so here i cannot pass the path as static one. How to provide the folder or file path dynamically You need to be more clear, how it this linked to your application I am creating a context menu item in the windows explorer. When the user clicks on my application name which is available in the context menu, i am displaying my application which has the items similar to the property menu item popup. My application h ...Show All

  • ron nash Get the computer Id

    I want to get computer id that always be uniqe even if windows of that computer have been changed. please tell me how and where I can find something like this. Code sample is helpfull too. There are a lot of things to get a strong unique ID of computer like, CPU Serial Number, Mother Board Serial Number, Hard Disk Serial Number, MAC Address and OS Version. These things are usually for some strong licensing: http://www.codeproject.com/useritems/Trial_Maker.asp This article include ways to get CPU and Main Board Serial Numbers, There are also other examples easily available on internet to get Hard Disk Serial, MAC Address and OS version. Best of Luck ;-) where can i find my compute ...Show All

  • Kimbe How to set focus on control after thread exits

    Hi, Iv'e got a form containing some usercontrols. When the form loads some calls that manipulate the usercontrols are added to a threadpool. Now on to my problem. I'd like to set focus to a control within one of my usercontrols, but if I do so before my threads exits the focus is lost. Ideal would be to have the focus during thread execution so the user can start interacting with the GUI while the usercontrol is being manipulated by the thread(s) and the focus is not implicitly changed or anything by the threads. If thats not possible then is there a way to set focus to a control after (whatever thread exits last) the thread exits and is done with the control /J If you are using .NET 2.0, you should c ...Show All

  • Mapa3matuk Asynchronous call and Asyncstate

    Hi! How to work with the Asyncstate in the target method That is, I call a BeginInvoke with a state object ... MyDelegateObject DO = new MyDelegateObject(MyTargetMethod); DO.BeginInvoke(MyCallBack,MyStateObject); Target method works... MyTargetMethod() { // Where is MyStateObject // Code to complete work ... } And AsyncCallback is called when target method finish... MyCallBack(IAsyncResult ar) {  // ar.AsyncState <-- here is my StateObject, but is the equal that when i call BeginInvoke ... } But... I want for example, that the result of the target method modify the state object and thus have a result, or when i call to EndInvoke  IAsyncResult.Asyncstate have the ...Show All

525354555657585960616263646566676869

©2008 Software Development Network

powered by phorum