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

Software Development Network >> Visual C#

Visual C#

New Question

does managed code take precedence over native code?
Getting shortcut properties
ASCII character value
Picture + Text in One richTextBox
How to show a form inside another form?
How to make other controls active while reading data from large text file?
C# Naming Conventions - ID
very strange System.Net.Sockets.SocketException
Turn off "Are you sure you want to delete all of the bookmarks?"
Cast Problem with ArrayList.ToArray()

Top Answerers

Pooja Katiyar
kjudge1974
Prabagarane
SHG
leo_asp
Robert Shurbet
Joe Case
binod m paul
amiune
Weebmaster
Summarizing data with
Only Title

Answer Questions

  • Rensoc naming convention: _property vs. this.property

    private string _property; public string Property { get { return _property; } set { _property = value; } } private string property; public string Property { get { return this.property; } set { this.property = value; } } Is there a design guideline on how to name fields that are encapsulated by a property Wich of those two versions should be preferred and why In the 2nd version FXCop complains that Member names should never differ only by case. But most code I see seems to prefer the 2nd version ... It is not easy to answer your question because something like "best approach" does not exist at all. Anyway recommendation is to use: private string _field; for class fields that will be encapsulated by a property ...Show All

  • supagu Make a File readable only by my application

    HI, I'm developing a windows application in c# and i use video with DirectX. My problem is that i don t want the video to be readable by classic players and only by my program. I ve try to use cryptography but it take to long to charge the video. If anybody as an idea... Sorry for my english, and happy new year, Laura. Hi and thanks a lot for your answers. I've tried it today. No problem to change the header but after there s no way to delete it. I ve to create a new file and it takes ages, even longer that decrypt it. I've done it this way : FileStream fs = new FileStream(System.Windows.Forms.Application.StartupPath + "\\Intro.avi", FileMode.Open, Fi ...Show All

  • mt2 A problem with WebBrowser control

    Hello, I have a very strange problem with the WebBrowser control... When the WebBrowser control have the focus, all my main menu strip shortcuts stop working, and when I set the focus to another control it start working correctly. How can I solve that Your help would be greatly appreciated. Sounds to me like when you turn short cuts off in the web browser control, it disables the parsing of all shortcuts within the host app. Which means you need to do something at a finer granularity ( that is, if you can catch a keypress and pass it to your main form but stop it from being used as a shortcut that's defined within the web browser ). Hi, I have created a sample application with webBr ...Show All

  • cobain81 File Upload in asp.net

    I am uploading file using (<Input type="file" runat="server">) html brwose control. It is working fine and uploading file on the server. Problem is here After some time using the web site, when i return back to the file upload screen and then press browse button for file path selection, it will put the file name with path in the text box. Now if i press the submit button to upload selected file, the text box of the file upload control will blank out. This is happened only after some time of brwose the web site and then return to the file upload screen. Now if i close the browser and reopen the site, it will work fine. Any help will be appreciated. Thanks in advance. Sounds like a vie ...Show All

  • Corby111 Warnings and classes

    Hi! I'm new here and i've begun to learn C#. I have Microsoft Visual Studio 2005,and I think I found some bugs: 1. class Car { public int Year; } Why does this code create a warning (Field 'Car.Year' is never assigned to, and will always have its default value 0) Now this warning should be ONLY with unpublic fieds in structs and classes (written in MSDN - here's the link http://msdn2.microsoft.com/en-us/library/03b5270t(VS.80).aspx ) and Year is public! Is this a bug 2. When I compile code and having warnings, so when I hit the 'build' button again they just disappear! Strange... Thank you very much for the help! Yes, it matt ...Show All

  • spandon Shutdown.exe problems

    Process shutdown = new Process(); shutdown.StartInfo.FileName = "C:/WINDOWS/System32/Shutdown.exe"; shutdown.StartInfo.Arguments = "-s -f -t 20 -m \\deruu"; shutdown.Start(); I can get it to log me out using argument -l only, but with that I only get a "Frozen" cmd window titled "Shutdown.exe" and nothing happens. Damn, I suspected it had something to do with that but figured C# would ignore it if it wasn't followed something valid. Thanks for the help edit: oh yeah, On my list over connected computers they appear like this: MSHOME/DERUU, How can I get rid of "MSHOME/" editagain: nevermind, problem solved. Opens up shutdown.exe ...Show All

  • Whoisit Microsoft .NET Security Warning

    Hi all, I have developed a Windows Control Library that is called from a web page like explained in these sites: http://www.windowsforms.net/articles/iesourcing.aspx http://support.microsoft.com/kb/555687 All works fine, but if I open a modal dialog from my Windows Control Library, I got this message: Microsoft .NET Security Warning Never enter personal information or passwords into a window unless you can verify and trust the source of request. Source: localhost The permission sets at Runtime Security Policy to my strong name (of my DLL) is a copy of the FullTrust permission set with all permissions available selected. Anyone can help me This message doesn’t ...Show All

  • cgraus Error handling

    Hi, I'm developing a three tier application, and have some conceptual question about the right way for error handling. the tiers are : 1. Presentation Layers - PL 2. Businnes Logic Layer - BLL 3. Data Access Layer - DAL now lets tak a very simple example, Let say i have an aspx search page on "Users" table. Search fields are : UserName, FromDate (on BirthDate Column), ToDate(on BirthDate). The validation checks for the search are : 1.UserName - 2-10 charecters 2. FromDate/ToDate -Valid Date 3. ToDate is Bigger than FromDate My Questions Are : 1. Should i perform the validation checks on each Layer 2. Should I put the call from the PL to the BLL, and from the BLL to the DaL in try & ...Show All

  • MyselffNot NoOp for specified amount of time

    hello, Once I reach a certain point in my app, I need all of my threads to keep running for a specific amount of time (in this case, 2 seconds). I think I want to NoOp, since have the threads sleep, or wait, or do anything where they aren't actually doing their task won't work. Is there some easy way to do this Thanks for any help. Thread.Sleep(2000); will halt your current execution thread for 2 second, while your other threads keep going. I was recording some stuff and wanted to wait 2 seconds after they stopped. I ended up just using a timer and having that wait for 2 seconds before continuing. Thank you for your help, though. I realize that, but I need t ...Show All

  • Brad B C# Or C++ .net?

    Does C# Have The Power Of C++, Or C++ Still The Best I Am Talking From 3D Application Side Thx Alot, And I Hope That I Success In This Thx For Your reply. So, I Can Use C# As My Mail Language, And C++ As The Hidden Language " Am Talking From 3D Application Side" I would say C# is more powerfull in this scenerio because Programming in C# is rather easy than in C++ so any code written for 3D application in C++ requires more effort to do the same work done in C# with less effort. Today, DirectX fullly supports 3D game development in Managed programming environment as it does in un managed programming Environment, with less effort required to develop the same thing what you do with C++ while f ...Show All

  • Trinka "OUT of Memory" String construtor

    Hi, im getting a "out of memory" exception when I try to pass a large char array in the the string construtor. The array has a length of about 200MB, its XML Data. I need to convert this to a string for the further handling. For smaller data stuff works fine. Any ideas how to convert the data to a string Thanks Dob Yeah I appreciate what you're saying, but it does seem from his original comment that he needs the whole thing in memory at once, otherwise he would have parsed bits of it surely I know that the Xml Document Object model will be pretty heavyweight, but it was just one suggestion - along with streaming which I mentioned first up :) It is ofcourse possible to use a XmlDocu ...Show All

  • manyowa Difference in allocating memory when static or local

    I have a static array of struct that I use in a lot of code. Recently I have found need to try and create this variable with an array size over 27M. I am able to do this, as a test, if I create a local variable, but my code requires that it is static and when I try to create it - I get an OutOfMemory Exception. My machine has 4G ram and can easily hold the array. How might I get around this problem Moon Hi could you post the code of the struct and the array recsize it 40 buytes. No I need it in memory for speed. I have 4G ram - the total amount of memory I am trying to use is only 1G. Hi what is the value of recsize ...Show All

  • DarrenARBell Multi Interface inheritance

    Lets say you have two interfaces: interface IA: IComparable { int A {get; set;} } interface IB: IComparable { int B {get; set;} } and a class which implements both IA and IB class C: IA, IB { } class C now has to implement CompareTo, but the problem is that CompareTo should do different things if being used to compare this object to another IA, IB or classC. How do you implement the CompareTo function For instance lets say there is code like this: C c1 = new C(); C c2 = new C(); IA ia = c2; int comp1 = c1.CompareTo(ia); int comp2 = c1.CompareTo(c1); In this case, comp1 should equal 0 if c1.A == c2.A, and comp2 should equal 0 if both c1.A and c1.B are equal to c2.A and c2.B. Since you can only have one CompareTo method on class C how do ...Show All

  • Melvinsb how to set the system time using WIN32 API Dll calls?

    hi all, i have written a code for setting the system time. the server will send the time to the client and that time is collected at the client side and the new time is set in the client side... server side code: using System; using System.Collections.Generic; using System.Text; using System.Net.Sockets; using System.Collections; using System.Net; using System.Timers; using System.Threading; namespace Server { class Program { static ASCIIEncoding ASCII = new ASCIIEncoding (); static Byte [] outstream = new Byte [256]; static TcpListener tcpl = null ; public Program() { } public static void Main( string [] args) { tcpl = ...Show All

  • David_Steele Retrieve Exchange 2003 Site\Server and Domain Controllers information.

    Hello Guys, I would like to create an application that bring me a list of all Exchage Site and Server names in my Organization. I'm planning to use Visual Studio .NET 2005 C#. I'm guessing that I need to request that information to the Active Directory Service using LDAP or maybe Exchange2003SDK somehow Also I would like to query and retrieve all Domain Controllers and Computers Names in the Organization. e.g. 001 <Site Name1> <Server Name1> e.g. 002 <Site Name2> <Server Name2> e.g. 00X <Site NameX> <Server NameX> Thanks a lot, PRJUANL. ...Show All

606162636465666768697071727374757677

©2008 Software Development Network

powered by phorum