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

Software Development Network >> Visual C#

Visual C#

New Question

Drag component IDE bug?
MDILAYOUT BUG
Running native code on C#
Cut String in two parts
Very Beginner and want to learn how to program in C# or VB.NET
Windows Task Scheduler C# 2.0
Communicating with my USB MIDI Keyboard..
Alternative to function calling itself
NullReferenceException
What does type-safe mean?

Top Answerers

Jon Braganza
Crasch
n3sachde
Julibalu
Marko B. Simic
lka
Titu
Flap
hmayer
Scott Masters
Russell Computer Services
Only Title

Answer Questions

  • ar_pad 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 nobugz wrote: 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

  • aler2u Underline text

    I was wondering if there was any way to underline the text of a string... Application: For right now I am outputing a bunch of strings into a message string to display in a message box. Later I will be outputting to a text file. I have searched the MSDN Lib to no avail; if someone could point me in the right direction, that would be great. Can you use HTML code in VC# Thanks Thom it will keep appending to the stream until you finally want to commit changes to the file, then read the entire stream into the file. You of course need to read the entire file into the memorystream, when loading, so it can continue on appending to the stream. You need to of course as stated in the doc/shown by example, make ...Show All

  • raingod_zippo Sorting Structure Array

    Dear All, I have a Console Application that records the top 10 records in a chart. At the moment the code uses a structure array, and uses the Get, Set methods to store values in the Array. I now need to sort the Array, and came across the Array.Sort method, however, everytime I use that method it throws an exception, any ideas I have attached my code for you to see what I am doing. public struct records { public string recordName; public string recordArtist; public int positionNow; public object dateEntered; public int weeksInChart; public int lastPosition; } class recordHandling { public records [] recordArray = new records[MainClass.maxValue]; p ...Show All

  • XNA Rockstar Run Windows Application From Windows Service?

    Hi, I have made a windows service that has a timer checks for a certain time to remind me. Now the time is reached so i want the service to display an alert!! I have made a windows app that shows the alert but when i run it from the service it runs but not GUI displayed!!! I can see it runs from the Task Manager but i cant show the form. So is there any way to dispay i GUI alert from a windows service Thanks a lot window service has a property "Interact with Desktop". Set it to true, Re install the service and see what happens. I hope this will work! Best Regards, Hello Mr TheMaj0r I have doubts on the same topic,But I am new to .NET and I don't have any idea abt .NET remoting ,Can u ...Show All

  • ejamashu Quick question - typedef in C#

    Hi! I'd like to define my own type in C#. Is there any command similar to C++ typedef using DWORD = System.UInt32; should do it. But note that the statement is scoped per file. You can use "using" to create type name alias. OK - thanks. Sorry - that doesn't tell me anything. I tried using uint DWORD; - an error occured Could you give me a code sample how to do this it's explained here, with examples: http://msdn2.microsoft.com/en-us/library/sf0df423.aspx ...Show All

  • M1tt Rich text box problem...

    Hi… In my application…I am trying to add data received on comport in a rich text box. Rich text box is on second form & my SerialPort.datareceived event is on first form. Here is my sample code… form2 f1 = new form2(); Serialport. .DataReceived += new SerialDataReceivedEventHandler (port_DataReceived); private void port_DataReceived( object sender, SerialDataReceivedEventArgs e) { ReceivedData = comport.ReadExisting(); f1.Controls[0].Text = ReceivedData; f1.Controls[0].Invoke( new EventHandler ( delegate { f1.Controls[ 0]. AppendText(ReceivedData); })); } But I am getting error on th ...Show All

  • Batistuta Manipulations on directories.

    Hi, I want to write a generic program to get the directory and all the sub directpries under it. The code which I have with me works only till next immediate sub directory Like string strDirName = @"E:\Cirrus" ; DirectoryInfo di = new DirectoryInfo (strDirName); if (di.Exists) { DirectoryInfo [] subDir = di.GetDirectories(); foreach ( DirectoryInfo dirInfo in subDir) { Console .WriteLine(dirInfo.FullName); DirectoryInfo [] nestDir = dirInfo.GetDirectories(); foreach ( DirectoryInfo info in nestDir ) { Console .WriteLine(info.FullName); } } Console .ReadLine(); } So this will display next 2 levels of directories But let say I have Test/Test1/T ...Show All

  • arcliner Change frame source using C#

    Hi, I'm searching on a method to change the source (scr) tag of the <FRAME> tag in HTML. Ok, this is a little bit hard to understand, isn't it. Well I have this inside a html BODY part: <FRAME NAME=left_frame SCR=main_menu.php> <FRAME NAME=right_frame SCR=main.php> How to change the source of the "right_frame" using a HtmlElement I allready have this function: private void change_url_reception( string url) { foreach ( HtmlElement elem in webbrowser.Document.All) { if (elem.Name == "right_form" ) { //change scr here } } } How to actually change the source now Thx Already Ruben Tacq Hi Ruben, it is the SRC attri ...Show All

  • Henrik Dahl How to use LPBYTE in RegEnumValue registry function - win32 api programming

    HKEY hTestKey; long res; LPTSTR vn[255]; DWORD vl=255; LPBYTE data[255]; DWORD dl; long i=0; res=RegOpenKeyEx( HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",0,KEY_READ,&hTestKey); if(res) { msgb("nof found");return; } while(res!=ERROR_NO_MORE_ITEMS) { res=RegEnumValue(hTestKey,i,(LPTSTR)vn,&vl,NULL,NULL,data,&dl); data[dl]=0; i++; msgb((LPTSTR)vn); // msgb((char *)data); } RegCloseKey(hTestKey); when the variable data is provided the return values are not proper. when it is given null the function giving the proper result. i want to know how to make use of LPBYTE . argument number 7 for ...Show All

  • Rhubarb VS2005 IDE freezes

    I'm having an issue with VS2005 where when I try and save or when it tries to Save AutoRecovery information, the IDE completely freezes. I only just started having this problem, so I really don't know what the problem could be. Are there any suggestions / fixes for this issue With some searching through the forums, I have found other people that have similar problems, but no solution in sight! Any/all help would be greatly appreciated. No... But I have since reinstalled my development machine, and haven't noticed any problems since doing so... Unfortunately, that means I am completely clueless as to what might've been causing this problem. :( Is it possible some of your ...Show All

  • EvilPenguin Make an login windows in app.

    Hello. I am making an application that has restricted access. It is just simple. I have an main form that where everything happens. So i just need user to type in the password to get in. I thought just to make an window with masked textbox and button. And behind button this code: if (maskedbutton.text == "password") { mainform.show(); } else system.close(); It does not need to be any more difficult then that. But this does not work so i need help. I cant get to my mainform from my login window and I need help with my code to close my form if password is wrong. I have done this before and this code worked....but now now. Do you have any suggestions I u ...Show All

  • AndrewLuiHK Listing files and folders, TreeView usage problem.

    There is problem with the Nodes.Add, What i need to create treeview as it should be Here is the code, try run it if you dont see the problem. private void Form1_Load(object sender, EventArgs e) { // Dirs foreach (string dirs in Directory.GetDirectories(@"C:\")) { if (dirs != "C:\\System Volume Information") { TreeNode node = new TreeNode(); node.Text = dirs; treeView1.Nodes.Add(node); // this works // Subdirs foreach (string test in Directory.GetDirectories(dirs)) { TreeNode subdirs = new TreeNode(); subdirs.Text = test; treeView1.Nodes.Add(subdirs); // here it is. Should be &qu ...Show All

  • frozennose Need Help in developing MS WORD like application

    Dear All, I have seen applications that has tool bar, with different buttons which are same like MSWORD 2003 look like, and when click on one button suppose table button , a list popup which also same like MS WORD 2003, and there are increase and decrease indent buttons, center align, lift align or right align buttons, and its functionality is also same like MS WORD. I want to implement such functionality in my own application, but remember please don’t refer me to MS Visual Studio Tools for Office Development, show me some other way by which I could do so. Refering me to code for downloading office like application will be highly appretiated. thanks most likely you would need to creat ...Show All

  • nabeelfarid FAXCOMLib

    Has anyone had any luck to get faxing working with C# Here is the code I have using System; using FAXCOMLib; namespace ConsoleApplication3 { /// <summary> /// Summary description for Class1. /// </summary> class Class1 { public Class1() { } public void FaxDocument(String TheFile, string faxnumber) { FAXCOMLib.FaxServer server = new FaxServerClass(); FAXCOMLib.FaxDoc doc = null; int response = -11; try { server.Connect(Environment.MachineName); } catch(Exception e) { System.Console.WriteLine("1"+e.Message); } try ...Show All

  • george maina Simple text to html parser

    Im trying to build a small application where you can copy text from word into a richtextbox it will then look for text written in bold, underline and if there are any bullets and simply put the text out in another box with the html tags. The way the program works it that is scan each word in each line and see if it's normal, bold, underline or if there is a bullet infront of the line. Right now it works with normal text and bold. How ever I cannot get it to detect when there is a bullet. some of the code: for ( int i = 0; i < lines.Length; i++) //loop for each line in the text { string [] words = lines .Split(delimiterChars); richTextBox2.AppendText( "<p>" ); for ( int j = 0; j ...Show All

808182838485868788899091929394959697

©2008 Software Development Network

powered by phorum