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

Software Development Network >> Visual C#

Visual C#

New Question

Web Parts Question
pointers??
namespace overlap
Anonymous Methods & Object Events
How to make VS to add lines(splitter) between functions ?
Copy and paste data between 2 notepads in C#
How to suspend events when setting a property of a WinForms control
SecurityException
How to create a LogFile...?
Playing sound in C# Applications

Top Answerers

Jon Axon
Koukai Chou
leodippolito
Pieter Pabst
Ultrawhack
Svennis
DLO_dk
SimonJohns
claesbrandt
freddieb
sitemap
Only Title

Answer Questions

  • gwestwater How to embed DataGridView in dll

    I want to create a dll with following function, but when i compile i face error, Error 1 The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference ) D:\ClassLibrary1\Class1.cs 9 48 ClassLibrary1 How to solve this problem, is there any alternative method solve this problem. public void fillDataGrid(System.Windows.Forms. DataGridView DataGridName, string DataMemeberName, string Query, System.Data.SqlClient. SqlConnection ConnectionToDatabase, System.Windows.Forms. Form frm) { if (ConnectionToDatabase != null ) { System.Data. DataSet ds = new System.Data. DataSet (); System.Data.SqlClient. SqlDataAdapter ad = new System.Data.SqlClient. Sql ...Show All

  • vdv_phuong Reducing memory "bloat" in C# apps?

    Hello all, I've developed some fairly simple C# Windows apps in Visual Studio 2005, and they seem like they're utilizing a lot more memory than they ought to be. To test, I created a new project with just a GridView to my database, ran it, and it took up a whopping 20 megs - it may not seem like much, but try running in a Terminal Server environment with a lot of clients, and it starts to add up! Does anyone know of some tips or tricks, or even third-party apps that reduce memory utilization in VS2005 C# apps Not everything is as it seem in that total you are seing, check out this article Reducing Memory Footprints, Gathering Process Info with MSDNMagProcessMonitor which will show that the ...Show All

  • gkostel Keyboard shortcuts for Find - Toggle Match Case, Toggle Match Whole

    ...in VS 2005. Also there appear to be no toolbar buttons for these either. I used to find these handy in previous versions of VS and VC++, because I often do a search and don't realise that I've got one or other of these toggles set. But the button states enabled me to quickly change modes and redo the search without having to display a dialog. In the absence of the buttons the keyboard commands would be useful. Kevin See thread http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=143616&SiteID=1 These features have been removed from VS2005 ...Show All

  • prashant mulay 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 it is a tree used to store code in terms of statements and expressions. it is pretty much alike to the binary search tree but not all nodes have 2 edges. what do you mean by implementing the stack implicitly using recursion the stack simply is to handle nested statements like 'while' or 'if'. and the push ...Show All

  • JZavala Cannot implicitly convert type 'uint' to 'int'

    I try to declar this statement: private static int [] MyArr = {0x243F6A88, 0x85A308D3 , 0x13198A2E}; And got this error Cannot implicitly convert type 'uint' to 'int' What wrong am I Thank Hexadecimal constant is interpreted as unsigned integer, you need to add casting: private static int [] MyArr = {(int)0x243F6A88, (int)0x85A308D3 , (int)0x13198A2E}; If you're coming from a C++ background, C# is much more strict with types of literals. 0x85A308D3 is not considered an int because the top bit is high, forcing it to upcast to a uint so it will fit, despite legally representing a valid int value. Use the unchecked keyword to avoid the error. Fo ...Show All

  • Christina853 C# Question to MSFT

    So.. When is C# going to see the WITH keyword Java has it (and so does VB). with ThisClass { .ThisProperty = value; .ThatProperty = value; } Sure would save typing Brian Never! I doesnt make that much of a saving and personaly I dont really like it that much - I mean what if you do this:- with ThisClass { .ThisProperty = value; .ThatProperty = value; with ThisOtherClass { .ThisProperty = value; .ThatProperty = value; } } it all gets a bit unreadable! Remember this isnt a .net thing, its just something VB does before compiling it to clr. It could easily be added to c# in theory, but wasnt! Ross ...Show All

  • Blackwood Inserting a record using databound controls

    This seems like it should be simple.  I'm probably missing something obvious.. but here goes... How do I have a form for entering a new customer ( for example ),using databound controls on that form   I'm not opening a dataset to start with, so I can't just insert a record into that dataset. I suppose I could do a select saying something like "where customerID = -1" ( which would return zero rows ), and then insert a row into the empty dataset, but that seems kind of ugly. Is there a "right" way to do this    My appologies if this is a stupid question. Thanks, Kirk   Hi, See: http://msdn2.microsoft.com/en-us/library/ms233812(VS.80).aspx Thanks I neglected to mention that I am ...Show All

  • R.Tutus Region highlighting problem with Emacs mapping scheme

    I use the Emacs keyboard mapping scheme. I've just upgraded to Visual Studio SP1 beta and have found that Ctrl+V and Alt+V now select and highlight a new region starting from the insert cursor's starting point. I've checked Ctrl+V and Alt+V are bound to their default commands Edit.EmacsScrollPageDown and Edit.EmacsScrollPageUp. This seems to be a regression introduced with SP1. Is there any easy workaround (I know I can press Ctrl+G to cancel the highlighting, but it's a bit of a pain as these commands are used all the time). Thanks, John. John, This sounds like a bug. I don't know of a workaround, but I've forwarded it to the folks responsible for the emacs emulation internally. They are investigati ...Show All

  • steveh999 How do I configure my VS.NET 2003?

    I am new to C# and use VS.NET 2003. I tried compiling a small application code written in a book using this code at the C prompt: csc.exe /out: FirstCSharpProgram.exe FirstCSharpProgram.cs I got this message: 'csc.exe' is not recognized as an internal or external command, operable program or batch file. Can someone help me to solve this problem Run the same command in the Visual Studio command prompt. From the Start Menu go: Micorosoft Visual Studio -> Visual Studio Tools and run the Visual Studio Command Prompt . The problem you describe is that the Visual Studio Environment paths have not been added to your system path, so going to the command line fails. Its been awhile since I h ...Show All

  • M. Nicholas stdole.IPictureDisp to Bitmap/icon conversion in C#

    I am having a 3rd part DLL which contains Icons. I have to use this DLL to get icons in C# application. That DLL returns the icon wrapped as an object of stdole.IPictureDisp. Now how to convert this to get the bitmap or icon. I am trying for image option but runtime exception comes as cant cast it. any Help. Hi, An icon is not an image. You need to use the correct class in the correct context. You cannot merely cast an Icon to an Image when they are not in the same object heirarchy. You will need to construct a new Bitmap with the Icon data to convert an icon to an image. (Bitmap does in fact inherit Image). You need to understand how the object heirarchy is laid out. You are ab ...Show All

  • MethMath Share Resource File between Projects?

    Hello, I have an solution that generates two executables as output. Basically, one application is a GUI tool, and the other is an nonGUI executable that processes output from the GUI tool. The GUI tool inserts tokens (i.e. MYTOKEN) into a text editor, which the nonGUI executable replaces with meaningful text when it processes the text. Both applications are localized for several different languages... My goal is to avoid replicating tokens and token translations into two separate sets of resource files. I would like both projects in the solution to use a common set of resource files. Is it possible for the nonGUI application to use the GUI's resource files when it builds and in code In other words, I would like to embed all r ...Show All

  • Blipwort Inconsistent accessibility???

    I have a CustomerContacts class and I create private Tracking.BusinessObjects. CustomerContacts _ContactsOfCustomer = Tracking.BusinessObjects. CustomerContacts .NewContacts(2); Then i make a public property and i get this error for some reason that i dont know Error 3 Inconsistent accessibility: property type 'Tracking.BusinessObjects.CustomerContacts' is less accessible than property 'Tracking.BusinessObjects.Customers.ContactsOfCustomer' C:\Freight Enterprise Tracking Database\EntepriseFreight\ClassLibrary1\Customers.cs 135 68 BusinessObjects Any reason to why i am getting this error public BHFreight.Tracking.BusinessObjects. CustomerContacts ContactsOfCustomer { get { return _ContactsOfCust ...Show All

  • Charles Tam Any tips for locating type info file for COM objects?

    Hi, Right now I'm trying to figure out how to get the IDockingWindowSite interface to be available to my C# project. I don't know what file contains the type info that I can import from. The VS IDE has the object browser you can search, but it looks like this only searches loaded types that it knows about. I've ran into this problem before. Please share tips on how to figure this out. Thanks Thanks for the reply. I did look at Shlobj.h, but I was hoping there would be a dll or some other file where I could make it easy to import. I'll try and dig through some MSDN docs and learn more about how to define COM interface imports in C#. Right now I'm not sure how to map the types from the C++ version to C#. ...Show All

  • jchewning Anybody?

    Hi, I am using Visual Studio 2005 Team Edition for Software Developers. While running the web application, its running like http://localhost:3232/ProjectName/default.aspx I don't want any port number to be used.. just I need to run as http://localhost/ProjectName/default.aspx How to configure this Thanks Hi, Anybody AFAIK the port number is assigned itself since VS2005 has its own webserver I think, im not sure. Best place to ask this one would be the ASP.NET forums: http://forums.asp.net since they will be able to deal with this issue better than here, especially in the IDE Forum since its not a C# IDE related query ...Show All

  • MunishGupta OnShutdown() is not being called at Windows shutdown

    Hi! I have written a service in C# that needs to do some cleanup when Windows shuts down. In order to detect the shutdown the documentation states that i should override OnShutdown() which will then be called when Windows shuts down and set CanShutdown to true. The problem is that the function is never being called! I'm using VS 2005 version 8.0.50727.42 and .NET framework version 2.0.50727. In the service class I set: this .CanShutdown = true ; I also override the OnShutdown function like this: protected override void OnShutdown() {    handler.StopService(); } Please give me some pointer as to why this function isn't being called or maybe an example of a workaround if this is a know ...Show All

585960616263646566676869707172737475

©2008 Software Development Network

powered by phorum