Answer Questions
Nagendra Kumar method signature problems
I am involved in a project whereby I have to use a methods from a Win32 dll. There are two methods for which I can't write signature in C# I have even tried using p/invoke wizard, but it didn't gave the right answer. The C/C++ declaration for these methods is BOOL __stdcall CodecStart (int hRadio,void __stdcall (*CallbackFunc)(void *),void *CallbackTarget); and DWORD __stdcall CodecRead(int hRa ...Show All
KMahon usage of const
Hi all, I am a beginner of C# language and have a question about const. Does C# allow to use const keyword to parameter option like C/C++ After trying several times, I wonder that C# doesn't. If so, aren't there ways to avoid the code like this : class Hoge { .... methods or something are declared... } class HogeHoge { public UseHoge( ref Hoge h ) { h.somepro ...Show All
Nithyakumar Restricting mouse movement on dragged mouse events
Hi Once I click and start dragging my mouse, I would like to bound (restrict) its movements to the component it initially started from...is this possible Can't find anything on it... Thanks Ashwin Directly no... however with a little math you can determine the position and size of your control on the form and the monitor and create a rectangle area from it and use that to set the Clip property ...Show All
Crystalz Is this possible??? Word document to SQL
I have some documents (all are exactly the same) with some people information (name, address, phone number,...) and i want to copy into my sql database, but only the information. If in the document if have: Name: XXXXXX XXXXXXXX Address: SSSSSS SSSSSSSS Phone; AAA AAAA And I have the same fields in the SQL Database, so I want to copy directly from the document. Is this possible Thank You I don't know if people will understand what i need ...Show All
SchildB Foreach loop
Dear All, I had this for each statement that used to grab the cell value for the column. But after I execute this statement, it give me an error Error 2 'System.Windows.Forms.DataGridViewRow.Cells' is a 'property' but is used like a 'method' Does anyone know what is the problem Thanks foreach (System.Windows.Forms. DataGridViewRow dgv in dataGridView1.SelectedRows) { MessageBox .Show(dgv.Cells( "Txn ...Show All
Coeamyd User Defined Simple Types
I need to create a couple types that are really just floats (with possibly some operator overloading at some point). If you could inherit from a float (you can't), the code I am wanting might look like this: Measurement m1 = new Measurement ((Feet)12.0f) ; Measurement m2 = new Measurement ((Inches)248.0f) ; public struct Inches : float { // Code for type conversion, opera ...Show All
GreenStone90 XMLTextReader
Hi, I am trying to use the XMLTextReader's Read(), I get an exception always, saying that file is being used by another process.. I know not where is that being used.. Any thoughts... Hello, I just figured it out.. I am using 3 controls to display the same file in different formats... Now I was trying to load in 2 controls and therefore I got this exception.. Anyway I need to load the same in the 3 controls... Any techniqu ...Show All
Russ V. App.Config
The following connectionString is present in App.Config <configuration> <appSettings> <add key="ConnectionString" value="Data Source=machine1;Initial Catalog=database1;User Id=user1;Password=password1;"/> </appSettings> </configuration> Now I would like to retrieve it using the following code public static string GetConnectionString { get { return Configu ...Show All
Nataraj S. Narayana DllImport in C#
Hi, I am trying to import a few IC ( "msvfw32.dll") functions to C# but getting a few errors Would you please assist in converting the following typedef struct { DWORD dwSize; DWORD fccType; DWORD fccHandler; DWORD dwFlags; DWORD dwVersion; DWORD dwVersionICM; WCHAR szName[16]; WCHAR szDescription[128]; WCHAR szDriver[128]; } ICINFO; I converted to public struct ICINFO { public UI ...Show All
Vijay Chilamkurthy How do you REMOVE or DELETE Items from Recent Projects list in VS2005 RC?
I have been testing VS2005 RC and as a result, I have built many applications. Most I am no longer interested in or use and would like to DELETE them from the RECENT Projects list, but I dont see how ! I have been achieving this by manualy deleting the project from IIS, but there's got to be a better way ! Any ideas cheers, yousaid One way I discovered are to remove the project directory from the [ ...Show All
T_Mac editing resource files
I am using a ResourceManager to retrieve values from a .resource file. I would like to be able to update the values in the file from within the application. Can this be done How Thanks. There are so much alertnatives with have other roamings, the registery can have Machine roamings, version roamings, user roamings and so does the filesystem when you look at direcoties like Application Data and User Settings ...Show All
RobinP 2005 .item() & .Select() replacements?
In 2003 I could set, for instance, the datagrid.item() and datagrid.select() to select a row after filtering the dataview results. These aren't available in 2005, how can this now be achieved still no Item property in intellisense. I did figure out the row select method in 2005 though, dgv.Rows .Select = true; which is slightly different from 2003, dgv.Select . Error 4 'Sy ...Show All
ShawnStovall XmlDocument.load Security issue
I have been working this problem for over 2 weeks and have reached the end of my rope. I have written a web app (in VS2003 hosted on Windows 2003 server) that has an embedded object in one of the HTML pages. This object contains a method that calls the xmldocument.load method with a path that is on a mapped drive on the server. When this call is made I get the following error: Request for the permission of type 'System.Secur ...Show All
Leslie Sopoco "That assembly does not allow partially trusted callers." - happens on all new projects
Something weird is going on... Whenever i create a new project, and use the MySQLDriverCS.dll to connect to a Mysql database, i get the following error: "SecurityException: That assembly does not allow partially trusted callers." Thrown at this line: { Application .EnableVisualStyles(); Application .SetCompatibleTextRenderingDefault( false ); Application .Run( new Form1 ()); <== THIS LINE } The problem is, that ...Show All
Krishi location of a program
hi , i need to retrive the data of the location of a program. for example you can choose the folder (maybe craeate it) when you install a software program to your computer. i need location of that path the info of the path may be in registry in that case i need to readdata from registry so need to know how to deal with it. thanks in advance I'm not sure what you're asking. Is this path requ ...Show All
