Jon Bishop's Q&A profile
Windows Forms How to make currently selected row invisible ?
This the message I get when I try to make currently Selected Row invisible. "row associated with the currency manager's position cannot be made invisible". I want to make all the rows in the dataviewgrid to be invisible.Any help My Code: if (dataGridMain.SelectedRows.Count > 0) { dataGridMain.Rows[0].Selected = false; } for (int nIndex = 0; nIndex < dataGridMain.SelectedCells.Count; nIndex++) { dataGridMain.SelectedCells[nIndex].Selected = false; } for (int nIndex = 0; nIndex < dataGridMain.RowCount; nIndex++) { dataGridMain.Rows[nIndex].Visible = false; } No this is what I want. I want to make only few visible rows in the grid based on some searching. It ...Show All
.NET Development HttpWebRequest Post problem
I have a "The underlying connection was closed: The connection was closed unexpectedly" error when trying to POST using HttpWebRequest. There's a GET prior to this call that works fine. I have done quite a bit of web research and all of the following have been tried: request.KeepAlive = false; request.ProtocolVersion = HttpVersion.Version10; System.Net. ServicePointManager .Expect100Continue = false ; request.PreAuthenticate = true ; Install WindowsServer2003-KB898708-x86-enu.exe on IIS Server. Here's the part of the Trace with the HTTP POST, maybe something here will help: System.Net Verbose: 0 : [3628] WebRequest::Create( http://w2k3pdwads01/access/oblix/apps/webgate/bin/webga ...Show All
Smart Device Development Getting own Phone Number using C#
Hi, Is there a way to get the Phone Number of my pocket pc device without having to use c++. I would really like retrieve this information using C#. Any help would be greatly appreciated. Regards, Jesse Hi, Apparently my searching abilities are not up to snuff. I found this: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnnetcomp/html/netcfphoneapi.asp Arg.... ...Show All
Windows Forms Input String was not in a correct format
Hi I am a new bie to the c# programing . i am getting this error at the time of form_load. where when i run the form it works properly.i have come to the conclusion that the problem is at the line cmd.Parameters["@vendorid"].Value=int.Parse(cmbSrchVendor.SelectedValue.ToString()); Problem is that , this problem only exists at the time of form_load. required help and a solution ASAP. private void cmbSrchVendor_SelectedIndexChanged(object sender, System.EventArgs e) {SqlConnection con; try { con=new SqlConnection("connetion string"); con.Open(); //int id = Convert.ToInt32(cmbSrchVendor.SelectedValue.ToString.SelectedValue); // string str="select * from tblvendor where (vend ...Show All
Visual Studio Tools for Office Mo Actions Pane in Word 2003 - newbie question.
Hi. I've been developing Office solutions int .Net for about a year now. My company had some proprietary code that was letting us place user controls in Word (Document Map) but it's time to phase that hack out with Office 2007 coming. So I downloaded VSTO (the version currently distributed) and installed it. Then I started looking around for code samples how to attach a custom Actions Pane. It appears that if I start an Word 2007 project in VS2005 there is ActionsPane but if the project is for Word 2003 - there is no such property and no obvious way of getting a public property that would do. I'm not sure if I'm doing something incorrectly and it seems more and more frustrating after 3 days of digging around. After initial atte ...Show All
Visual C# Generics type parameter attributes
Hello, I've been reading the C# 2.0 Language Specification and have come across something I don't quite understand. In the section detailing generics, the following definitions are given: type-parameter-list: < type-parameters > type-parameters: type-parameter type-parameters, type-parameter type-parameter: attributes opt identifier The last line surprised me... I've never seen attributes used in a type parameter list. Are there any examples of such a construction being used in real-world code Am I reading this incorrectly or does this say that something like: class C<T, [attr]U> {} would be a legal construction Go easy on me.. I new to this :) - Justin Voshell ...Show All
Visual C++ how do i use OpenCV code in windows forums
hi, i am tyring to use OpenCV code in VS .net 2003 Visual C++ Windows forms. when i build, it give me no error but when it start it give an error : An unhandled exception of type 'System.TypeLoadException' occurred in cam1.exe Additional information: Could not load type CvCapture from assembly cam1, Version=1.0.2371.20291, Culture=neutral, PublicKeyToken=null. The error seen to be form this line: capture = cvCaptureFromCAM(0); note: i am doing my program in mix mode ( managed and unmanaged ) You can get support for OpenCV at this forum . ...Show All
Visual Studio Express Editions transparent form borders like vista
I am trying to make a form that has a vista form appearance. The header/border for example has some transparency and the rest of the form is normal. It looks nice. Can not quite seem to get it to work. May try overlapping a borderless form on a semitransparent form somehow. Anyone done this yet These may help a little......... http://www.codeplex.com/Wiki/View.aspx ProjectName=ASCENDNET ...Show All
Visual Studio Express Editions Instance of Class and context
Hi, I have a project that contains the following: Form1------------------Form AccountsForm-------Form Search-----------------Form AccUpdate-----------Class I have created the following instances of the above AccountsForm in Form1 and called it ObjAccountsForm Search in the AccountsForm and called it ObjSearch AccUpdate in Search and called it ObjAccUpdate My question is When I need to reference, forexample, the instance of the AccUpdate Class form within my project I am having to type the full context to its instance Form1.objAccountsForm.objsearch.ObjAccUpdate. somepublic property in this Class My project contains many more Class's, and I have had to draw a table to keep track of where each instance of a ...Show All
Visual Studio 2008 (Pre-release) Use of <dataContractSerializer>
It's possible to specify the KnownType of the DataContract in the configuration file with <dataContractSerializer> element. I tried to use the following: The code snippet: [DataContract] public class SomeSet { ... [DataMember] public IList items; } [DataContract] public class SomeItem {...} Configuration file contains the following (in the <system.runtime.serialization> section): <dataContractSerializer> <declaredTypes> <add type="SomeSet, SomeData, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> <knownType type="SomeItem, SomeData, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/> </add> </declared ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Drawing Primitives with Xna
I can't seem to be able to find any documentation on how to draw 2D primitives in Xna (lines, triangles, circles, squares, verticies etc....). All the documentation relating to 2D Xna seems to be about sprites. I'll give an example of why I need this and if someone could tell me the best way to do this, that would be great. I'm making a magneticfield demo in which you place a charge somewhere and you move around another charged particle. Then, the demo draws a vector relating the two particles (using coulombs law). In order to do this, the magnitude of this drawn vector will have to be changed. Thank you very much. You might be better off using the System.Drawing classes and GDI stuff ins ...Show All
Visual C++ a++++; what abt ++a++
hi i hav this problem. int a; a++++; gives an error.. ' operator ' needs l-value but ++++a; compiles properly. plz help me... I hope you're not actually writing code this way! If you need to increment the value by two, just say "a+=2;". The difference between ++X and X++ is that in the former X is incremented before the evaluation of the rest of the line, while in the latter it's evaluated afterward. "++++a" is evaluated as "++(++a)". I'm not sure how "a++++" would be evaluated, and I suspect the compiler feels the same way. ...Show All
Visual C# Object Oriented Programming
Hi all. Im a C++ Programmer that just moved to C# and am having problems learning about classes and objects, i just cant seem to understand it. Im not sure whether i have the wrong book, so any advice and help on the best place i can learn OOP for C# from would be much appreciated. Thanks. I read both the books you referenced in the opening posts both are very good if you follow along and work through the examples. The Binary Tree example is a great sample that shows you what objects are capable of. Also they go over class constraints and some of the common interfaces, which can lead to very powerful uses of Generics (C# flavor of templating) Some things that are new from C++: *Get and Se ...Show All
Visual Studio Team System Unit Tests and Nightly Build
Using VSTS for Developers. I have a solution with a test project for my unit tests. When I create a new build type and select the metadata file, (".vsmdi") the "Test list to run:" list is always empty. The only mention that I can find about test list says to create them within test manager. But I do not see a test manager tool within VSTS for Developers. Does anyone have some insight into getting my unit tests to run during the nightly build Thanks Has there been any progress or word on this tool I have a team using VS for Software Developers and I want to run the unit tests using Team Build. VS for SD can write unit tests, but we can't run them on team build We should need to buy a w ...Show All
SQL Server SQL 2005 LDAP Query Error: Msg 7321, Level 16
Hello I am trying to run a query via tsql against ad. Below is the error I am getting. I have read the http://msdn2.microsoft.com/en-US/library/ms190803.aspx and changed the domain but still having issues. Any help would be appreciated. EXEC sp_addlinkedserver 'ADSI' , 'Active Directory Service Interfaces' , 'ADSDSOObject' , 'adsdatasource' GO SELECT * FROM OPENQUERY ( ADSI , 'SELECT Name, SN, ST FROM ''LDAP://ADSISrv/ OU=Users,DC=XXXXX,DC=LOCAL'' WHERE objectCategory = ''Person'' AND objectClass = ''user''' ) Msg 7321, Level 16, State 2, Line 1 An error occurred while preparing the query "SELECT Name, SN, ST FROM 'LDAP://ADSISrv/ OU=Users,DC=XXXXX,DC=LOCAL' ...Show All
