zhihao's Q&A profile
Visual Basic Addhandler cause error even the event signature is the same
Hi, I was a VB6 user and kind of new in delegate. I try to create a delegated sub that will validate all the controls bind with the bindingsource. Somehow, myValidating at the addhander procedure will be underlined and said "...cannot be converted to system.componentmodel.CancelEventHandler". I can't figure out the reason. Appreciate for any suggestion... Here is my code. Delegate Sub CustomValidating( ByVal sender As Object , ByVal e As System.ComponentModel.CancelEventArgs) Private Sub SetupValidation( ByVal _bindingsource As BindingSource, ByVal myValidating As CustomValidating) For Each b As Binding In _bindingsource.CurrencyManager.Bindings AddHandler b.Control.Validating, my ...Show All
SQL Server Please Help Immediately...
Hello everyone... plzz help me,im getting this error whenever i want to connect my pc with another remote pc which i've designated as Server and my database is saved there so i want to connect my pc with tht remote pc and save data entered by my pc to that remote pc's database... but i get this error....PLEASE HELP IMMEDIATELY... Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (.Net SqlClient Data Provider) ---------------------------------------- For help, click: http://go.microsoft.com/fwlink ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476 ---------------------------------------- Error Number: -2 Severity: 11 State: 0 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How best to learn 3D basics?
I've really enjoyed learning the 2D stuff, and have lots of synchronized moving, rotating and resizing pictures of stick monkeys. None of this post is a complaint to the XNA team which I think has done a great job. Unfortunately, coming from a C# but not a 3d graphics background, it's exceedingly difficult to figure out how to get simple things to work in 3d. I wasn't able to get the simple cube up and running (it was plain black) until reading a helpful forum post. I was baffled for a long time by the huge list of vertices. It took me a while to figure out that you just take the first 3 vertices and make a triangle out of that, then you take the next 3 and make a triangle out of that, etc. But it's still confusing--for example (not the ...Show All
Windows Forms Controls and Generics?
Is it possible to define a Control with a generic in the class name Seems like this two things do not live together: here is what i've tried but this does now work: i've created a CustomControl1 : Control compiled everything and CustomControl1 appeared on my toolbox added a generic public partial class CustomControl1 <T> : Control everything compiles but CustomControl1 is not on the toolbox anymore :( what is even worse - the form would not open in a designer if i modify an exiting control to use a generic - the designer will say " Could not find type 'WindowsApplication1.CustomControl1 " ...Show All
Visual C# Auto launch setup file when CD is inserted?
Hi, I have created a setup installer package with my application using Inno Setup Compiler 5.1.9. Is there a way to automatically lauch my setup when the CD is inserted, possibly using an AUTORUN.INF file I know this is not really C# related, but someone may know. Thanks again, Please see the following article on the MSDN Library: Creating an AutoRun-Enabled Application ...Show All
Visual J# vjc throwing an exception
I do not have this problem when compiling from VS 2005. This started after I uninstalled the J# redist and then reinstalled it using the MSBuild created bootstrapper program (testing it). When I build using nant which calls devenv to build the solution I get the popup asking me what program I want to use to debug vjc because it hit a problem. Even weirder, the compile continues - it does not return an error. But the rest of the projects are not compiled. What is going on and how do I fix it thanks - dave Hi; More info - it is now totally random. About 10% of the time all projects build. Other times between 1 and 4 J# projects fail (the C# ones always succeed). And which project changes. 2 of them are the most common ...Show All
Visual Studio HideDuplicates and Extra White Space!!
Hello All!! I am trying to create a report with 3 different groupings: A I a data data1 data2 data3 b data data1 data2 II B I have set the "HideDuplicates" property to hide any duplicates in the corresponding group. However, when the repeated data is hidden, it still leaves in the space where the data should have been if it was visible. This pushes all the other rows down and the extra space is taking up a lot of room!! I'm new at reporting services, so I was just wondering if anyone had a good solution to get rid of the extra space when the repeated grouped data hides itself. Hope this makes sense. Thank you!!! ...Show All
Visual C# file.Read statement in NPlot.
Background: I downloaded a graphics C# package NPlot from a website. It is freeware. I included the whole set of files (4 demos and a library + dll) into my project where I intend to use NPlot as a part of my application. After a few snags it easily compiled. A part of it is running lready, however, here is the situation I cannot resolve: <This code is part of PlotWave function in PlotSurface2DDemo.cs > System.IO.Stream file = Assembly.GetExecutingAssembly().GetManifestResourceStream("NPlotDemo.resources.light.wav"); System.Int16[] w = new short[5000]; byte[] a = new byte[10000]; file.Read( a, 0, 10000 ); I get an error at the last statement during runtime (debug): 'Use the "New" keyword ...Show All
Visual Basic Datagrid RowHeaderWidth changes to 15 when rebuilt
I have a read only datagrid in one of my forms. I use a context menu that has Edit to open another form to edit the values in the right clicked row. The editing form sets it's dialogresult to OK if the UPDATE SQL command terminates sucessfully. When the form with the datagrid is returned to it rebuilds the datagrid to reflect the edited changes. This includes setting the TableStyle which sets values such as the Column Width, Column Field Name (of the datatable) and the Column Name. After the Table Style is set datagrid parameters are set such as AllowNavigation - False, BackgroundColor, ReadOnly - True, and RowHeaderWidth. The RowHeaderWidth is 5, however, after this line is executed after an edit the RowHeaderWidth value sets to 15 ...Show All
.NET Development XML Parsing vs Rich Objects
Hi In our project we are storing process flow as xml.I have a doubt regarding which is the best way of the two in terms of performance, whether to deserialize and use the object or to parse the xml using xmlDocument reader Thanks Sivaraj R.P First of all the XmlSerializer uses XmlReader under the covers. But performance of your system depends on the kind of processing you plan to do on that XML data. Suppose your XML looks like this: < Flow > < Activities > < Activity > < Id > 123 </ Id > < Priority > 1 </ Priority > < Description > the quick brown fox </ Description > < Command > test.exe </ Command > < Opera ...Show All
Visual Studio 2008 (Pre-release) Feb CTP Questions
Are there any details available on the level of WPF designer support in the Feb CTP Will the Orcas CTP's be shipped at Virtual PC images or full installs Steve No details available at this time, please check back at our Cider Channel9 wiki: http://channel9.msdn.com/wiki/default.aspx/Cider.HomePage Thanks, Jim ...Show All
Visual Studio Team System Joint Application Development
Hi, How TFS can be used for Joint Application Development Can we use two Team Foundation Servers and synchronize with each other Is there any method to take back up for a single team project in TFS Thanks, Renil Excellent summary as usual, Martin :) "Keep two servers in sync" and "Backup/restore team projects independently" are both on the wish list, no doubt about it. I'd urge anyone who wants the former to look at the proxy and let us know specific reasons why they need to keep two TFS servers in sync instead of just using a single one with proxies. I'm sure there are scenarios, but nailing down what those are, and what their specific needs are, will go a long way to helping drive it moving ...Show All
Visual Studio Team System Tool for folder based access rights
Hi, I am searching for a tool that allows granting access rights based on folders. Once, I believe, I read about such a tool but now can't find it any more. Does anyone know such a tool for TFS, tool Name or vendor Tom Tom, If it is folders in version control that you are after then you can do this from within Visual Studio 2005. Simply right click on a folder in the source control explorer and select Properties then look at the Security Tab. Be careful with the "Inherit permissions" check-box - when you un-tick it all permissions (including your own) are removed. If you press ok before you have given yourself some rights to the folder you could get in a bit of a mess. See the following post for mo ...Show All
SQL Server Backup/Restore
are the backup/restore features available in SQL Express the feature available in sql express, you can make schedule for back your database.... right click your database name, and choose what you want.... Jebat Thanks ...Show All
Visual Basic createing a text file
Hi...i used to play around with vb 6 and now i have 2005 and i gt say...i can learn chinese faster then i can learn it... can someone show me how to create a simple text file in the programs folder and can you explain the code so i can learn how it workts..thanks! um...i think we are in trobble still....we arent compareing nick names we are comparing the username text file one (Added.txt): has usernames of all the people the person has added (as in the combo box selected item is saved to this file when the check box is selected) text file two (list.txt = already made with the data in it and in program folder and will be installed with the exe): Usernames , nick name and wii numbers. Proc ...Show All
