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

Software Development Network >> Visual C#

Visual C#

New Question

CryptUIDlgSelectCertificate question
For Statement Help please
Static fields, inheritance, and Reflection...
waking the service every five minutes
Add C# arraylist to JavaScript arraylist
Build up a variable name with a string
need help with code
What is with all of the files for a simple program?
How to create a LogFile...?
Attenuating SoundPlayer Volume

Top Answerers

Ian_E
Fidence
Tony Maresca
SalvaPatuel
pompöös
R_Vogel
fcatacutan
sagittarian
ArchieW
sangminny
oXygen
Only Title

Answer Questions

  • stuart54321 Defining custom functions for code snippets

    Code snippets allow you to use functions to do some processing on the data that gets inserted. AFAIK, currently there are only three functions available for C# (for instance SimpleTypeName). Would it be possible in any way to expand this set of functions For instance, I'm looking for a CamelCase function to be able to create a code sinppet that outputs code such as this: private int _myNumber; public int MyNumber { get { return _myNumber }; } Because of this naming convention, I only want to specify the type and name, and not as in the current propg code snippet, also specify the fieldname. Any ideas Why is functionality necessary Is there a reason why supplying another snippet, built to your own speci ...Show All

  • JustinParkes Inaccurate/Wrong calculations

    Hi, I working on a fairly large project in C#, combining numerous components such as SQL and DirectX. We all, however, seem to have come across a severe problem! We can't do basic arithmetic! For example, in VS.NET 2003, I need to subtract two UTC style time values - eg 11565456546546.1342345566 etc. double large_val1, large_val2; ... double difference = large_val1 - large_val2; Instead of the result I expect (and indeed the result shown in the Watch window during debug for large_val1 - large_val2), I get a servely rounded value instead - that is entirely useless!! Help!! I can do this in a standard command line / console application and everything works fine - why should there be any difference ! I have tried decimal, ...Show All

  • Scheinka Capturing the up/down arrow key in a child form

    Hi, Recently, I was trying to capture the UP arrow key from my window forms application. I was able to capture the key in the parent form but once i open a child form, I would not be able to capture all the arrow keys but the rest of the keys like 'a', 'b','+' and etc are ok. I have searched the web but did not find any solution. Does anyone know how to overcome this problem Thank you. Soh GavH is correct. You should avoid using KeyPress or KeyDown event because will produce some Debuging problems and will not catch some special keys. ProcessCmdKey is a right way to do it. soh99, What is on your form Most controlls capture the various keys as they are used for example moving the cur ...Show All

  • Mutola SqlDataReader in .Net 2.0

    I need to know how do i pull all my data items in my columns in my sql table i am using VS.net 2005....When i do it in 2003 all my items return and i am using the same code....what seems to be wrong here is my code...this only returns the first name in the column why is that private void button1_Click( object sender, EventArgs e) { string sqlconnect = System.Configuration. ConfigurationManager .AppSettings[ "conn" ]; SqlConnection cn = new SqlConnection (sqlconnect); string cmd = "Select * From Employees" ; SqlCommand scmd = new SqlCommand (cmd, cn); cn.Open(); SqlDataReader dr = scmd.ExecuteReader(); if (dr.Read()) { listBox1.Text = "Connected" ...Show All

  • kleinma Some error when open 2003 project in 2005.

    Problem is form and control which is designed in 2003 can not be opened properly in 2005, don't know why, any changes in 2005 Show us an error message, show us the line of code that it dies on... One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Object reference not set to an instance of an object. Hide at System.Resources.Tools.StronglyTypedResourceBuilder.DefineResourceFetchingProperty(String propertyName, String resourceName, ResourceData data, CodeTypeDeclaration srClass, Boolean internalClass, Boolean useStatic) at ...Show All

  • Adie30 Marshalling issues when marshaling a struct with other structs as members in c# for ansi c extern call

    Ok Any help on this would be useful. I have a c# struct [StructLayout(LayoutKind.Sequential,Pack = 4,CharSet = CharSet.Ansi)] public struct RF_INTERFACE { public ushort NumTaxes; public ushort NumEarnings; public ushort NumDeductions; public ushort NumWeeks; public RF_EMPLOYEE_ENTITY Employee; public RF_EMPLOYEE_WORKSITE EmployeeWorkSite; public RF_EMPLOYEE_TAX_ENTITY EmployeeTaxes; public RF_EMPLOYEE_EARNING_ENTITY EmployeeEarnings; public RF_EMPLOYEE_DEDUCTION_ENTITY EmployeeDeductions; public RF_EMPLOYEE_WEEK_ENTITY EmployeeWeeks; } which is a mirror of the c struct from a header file. typedef RF_STRUCTURE struct { RF_USHORT NumTaxes; RF_USHORT NumEarnings; RF_USHORT ...Show All

  • Prashant jain An unhandled exception of type 'System.StackOverflowException', how to handle this problem?

    class CreateCage (simple code, not complete) // this.cButton.Location = new System.Drawing.Point(88, 168); this.cButton.Name = "cButton"; this.cButton.Size = new System.Drawing.Size(88, 23); this.cButton.TabIndex = 3; this.cButton.Text = "Create Cage"; cButton.Click += new System.EventHandler(cButton_click); fmhandler = new Form1(); private void cButton_click(Object sender, System.EventArgs e) { string temp = fmhandler.getCstring(); MessageBox.Show(temp); fmhandler.infotextBox.Text= temp; this.Hide(); } public int getNumber() { try { number = Convert.ToInt32(inputtextBox.Text); return number; } catch(FormatException) { MessageBox.Show("pls input integer"); return -1; ...Show All

  • TRID OLEDB Row update error

    I don't understand why this exception crops up    All of the fields in the database are of type text and when I load the Dataset, they all load fine.  However, when I try to Edit and click on the Save button, I get this message (shortened due to space) when the method attempts to execute the updtCmnd.ExecuteNonQuery statement: Error trying to edit current record:   (Note: I have displayed all of the fields (13 total) here) Error: Data type mismatch in criteria expression. Error Data:  System.Collections.ListDictionaryInternal Error Code:  -2147217913 Errors:  System.Data.OleDbErrorCollection Source: Microsoft JET Database Engine TargetSite: Int32 Execute CommandTextForSingleResult(System. ...Show All

  • KIWIDOGGIE Naming conventions

    Hello everyone, As projects get larger it becomes harder and harder to remember all of the variable names and types. I'm wondering if there is some form of naming convention out there for the C# programming language... What I'm really after are 'conventions' for variable nameing... An example is 'append List to all of your objects of type list, name all your global variables tith a '_' prepended, etc. Does such a document already exist Thanks Chris oh yes, we have had rather a good heated discussion about it too just recently - if only I could locate that thread but here is one with the doc: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=818003&SiteID=1 Let me recommend the following book for y ...Show All

  • OptikConnex How to run 2 Windows Forms at the same time??

    Hi, The language that I am using to do my work is Visual C#. Here is my problem. Under Console Applications, I have created 2 Windows Forms and would like to run both of them at the same time when I run debugger mode. How do I go about doing that How do I use Application.Run 2 Windows Form Hi, What I am trying to achieve is to have windows form 1 with a location of (0,0) and another windows form 2 with a location of (640, 0 ). In otherwards side by side. Assuming they are both equally the same size. So when I click windows form 1 button, the first windows form will lead me to windows form 3 location of (0,0) in otherwards just beneath windows form 1. Keeping in mind ...Show All

  • Terence Tung ListView Project.

    Hello All, I'm doing a project like the Event Viewer Form " frmViewMessages " where I have a ListView " lvMessage " that is showing me the list of X items. If you double click an item the detail form " frmMessage " open and display the information in read only Text boxes. In that form " frmMessage " I have two buttons which I intend to move the select Item in the form " frmViewMessages " to the preview or next items. Here is were I have the problem. Could some one tell me how to achieve this part. Here is the code I have so far and is working OK but only allow me to move to just one Item down. For further refernce look the Event Viewer "Application log " in your PC. and d ...Show All

  • clint 2 Problem with passing arguments in shell command

    Aloha, I'm creating a GUI for a dos program I use a lot. Here i a sample of my code: [code] proc.StartInfo.FileName = "D:\\Program\\xyprogram.exe"; proc.StartInfo.Arguments = this.openFileDialog1.FileName; proc.Start(); [/code] This generates "xyprogram filename.txt" and it works. My problem is that I want the result to take another argument called -i so the result would look like "xyprogram filename.txt -i" I have tried [code] proc.StartInfo.Arguments = this.openFileDialog1.FileName + "-i"; [/code] but it don't seems to work. Any suggestions Doh!!!! Thank you very mutch from the land of midninght sun! You'll nee ...Show All

  • juanraul TreeNode Tag problem

    I am having some problems with a TreeView control, the thing is that I have populated a tree with nodes an attached different objects to the different nodes using the Tag property. My problem is that when the user clicks the nodes, different things is supposed to happen depending on which type of node is clicked. How can I determine which object is embedded in the nodes Tag when the select event is triggered Regards, Peter Larsson! You could implement a interface for all your tag objects, and then in your click event handler you cast the tag object to that interface and call a method on the interface and let the different implementations of the tag objects do what needs to be done. Hi, you&nbs ...Show All

  • Dotnet007 ControlTemplate best practices (after Cheng R. :-)

    Hi, I would like to discuss the usage of Xaml elements from code. MSFT people say it is discouraged, though it is impossible to avoid it in complex solutions. For example, lets consider Toolbar class. Toolbar is not a complex control, however it uses the names from its template from code ( "PART_ToolBarOverflowPanel", "PART_ToolBarPanel" ). And I believe many other controls do the same. There is even an internal class StyleHelper that partially serves as "names locator". So how can we, ordinary people, be forced to stop using template names from code if it is barely possible in the simplest cases So what's wrong with this approach Will it really be impossible to split UI and logic entirely Or we just a ...Show All

  • deen create ATL dll using C++ .NET 2003

    Hi, I need help for a problem. I am trying to creat a ATL dll using C++ (VC7) from .NET 2003 and access the dll from C#. New Project -> ATL Project -> Add Class (ATL Simple Object) -> Add a Method to the interface. I want to send a number to the dll which manipulates it and returns it back to the C# The problem is the out, retval field in the Add Method field are disabled (in the Add Method tab). I try to manually add them in the files. [id(2), helpstring("method myatlp2")] HRESULT myatlp2( float a, [out,retval] float *b); It gets compiled but in my C# I can only see -  myatlp2( float a)    ( I've tried add reference from both COM and NET wrapper) Any thoughts &nb ...Show All

828384858687888990919293949596979899

©2008 Software Development Network

powered by phorum