Can-Ann's Q&A profile
Visual Basic copy & paste in visual basic 2005 datagrid
Hi I am building a datagridview form in VisualStudio 2005 and I want the user to be able to copy or paste the content of a cell without needing to select its text first (as this can become tyresome after a while). In excell databased tables you're able to copy the cell's content just by selecting the cell and pressing ctrl + C (not actually selecting the text inside the cell). Can't seem to do it with my visual studio form. Thanx for any help Hi, i have a similar problem. I cannt seem to copy or paste into my datagrid view. I always have to right click on my mouse to copy or paste. Why ...Show All
Visual Studio Express Editions Clipboard Help
Hello all, good morning :) need some help with this one please: I have 6 textboxes on my form. I need to assign each textbox with a shorcut key (eg. alt + 1, atl+2 etc..) and then copy the contents to the clipboard. I take it that I would have to put the code in a timer event & would the shorcut keys still work even if the form is not displayed on the screen Thanks, Stuart ReneeC, is it poss you could explain some of what the code means aswell I just didn't want to copy you code without understanding a few things. Whats the "D" after the keys mean and come from (eg. Keys.D1) Tb=sender.text And I take the e stands for Event which is declared in the sub Thank you, ...Show All
Software Development for Windows Vista Manifest affect BAT file?
Is it possible to have a manifest affect a batch file E.g. MyBatchFile.bat MyBatchFile.bat.manifest And when you execute the batch file, it gets elevated permissions as per the manifest file Applying a Manifest file to an .Bat file is not possible. UAC or Manifest file is for Exes/applications called in the Batch file. UAC is for the process level. In Windows Vista, the correct way to mark your applications is to embed an application manifest within your program that tells the operating system what the application needs( Administrator/AsInvoker). DLLs running under RunDLL32.EXE that need elevation should be modified into an executable EXE with its elevation level indica ...Show All
SQL Server Problem creating stored procedures
I am getting the following error message every time I try to create a stored procedure - any stored procedure: Msg 6354, Level 16, State 10, Procedure AuditOperations, Line 14 Target string size is too small to represent the XML instance A search of books online and MSDN didn't return anything. Thanks. Geez! How stupid ! I'm working through examples preparing for the 70-441 test. That was it. Thanks so much! ...Show All
.NET Development find out the caller of a method
assuming two objects x and y. object x calls y.foo(). Is there any chance that I can find out in object y who called y.foo() With the ICorProfilerXXX stuff one can intercept the prejit event of the CLR, is there anything alike from within .NET Because what I want to do is the following ... x calls y.foo() but maybe foo() is now bar() so x would have to call y.bar(). If I can find out what x calls just before it calls it I could probably transparently redirect a call from x (if I needed to). Is it possible to define a method with the same parameters but where the name is not "important" You can use the StackTrace object found in System.Diagnostics I'm not completely sure abo ...Show All
Software Development for Windows Vista install error 1330 - steps to success after it (June 06 ctp Windows SDK)
When I try to download it, it reports : The download you requested is unavailable. If you continue to see this message when trying to access this download, go to the "Search for a Download" area on the Download Center home page. Jason, I have downloaded from this page. Down at "Related resources" there is a link to " Windows SDK for .NET Framework 3.0 June CTP " ...Show All
Visual Studio Team System Consistent rules across multiple projects in VS2K5 solution
Hi there, This might seem like a very simple question and I apologize if I've missed it, but how do you apply the same Code Analysis template across multiple projects in the same solution Sure I can go to each project, and set the properties manually, but is there a way to set it at the solution level For example I wish to disable warnings associated with strong names across a solution with about 20 projects in it. Manually this is quite time consuming. Cheers Hi David, For now, a quick fix is just fine but I'll be looking at the shard targets suggestion too. It's just a bit of a shame there's not way set Code Analysis options at the solution (or solution folder level). Hopefully TFS wil ...Show All
Windows Forms Setting parent does not Undo correctly
I've implemented a custom DesignSurface and added a simple implementation of an UndoEngine to it. Most everything "undoes" correctly, though I've run into a case where setting the Parent of a Control will not undo correctly. I have the following code (child and parent are Controls with non-null values): ... parent_pd = TypeDescriptor.GetProperties(child)["Parent"]; if (parent_pd != null) { prev_parent = parent_pd.GetValue(child); using (DesignerTransaction transaction = m_Host.CreateTransaction("Reparent object")) { try { parent_pd.SetValue(child, parent); transaction.Commit(); } catch (ArgumentException) { // parenting cycle... parent_pd.SetValue(child, prev_parent); ...Show All
Visual Studio Team System VS hangs while checking custom rules.
I have 2 simple custom rules - one that checks if all classes are marked with author attribute and the second that checks filed names. I noticed that VS hangs while running that rules. It helps when I uncheck that rules and build a few times checking one more rule after every build. Is it possible that my rules couses a deadlock While in hang my VS doesn't use processor time. How can I debug it or find out what is wrong Marcin I can't find out what is wrong. Disabling one custom rule that checks private fields names helps and the problem exists only inside VS not in standalone FxCop. Anyway, the problem is general and it probably is in VS build process which is slow, unpredictable and very ann ...Show All
Visual Studio Express Editions downloads
i want downloads of visual studio express, & themes to put on my laptop, You can download all the Express products here: http://msdn.microsoft.com/vstudio/express/ Is there any other question you have ...Show All
Visual C# Getting started with Business objects
Hi guys, i m trying to get started with Business Objects, but i m a little bit lost here.. hope you guys can help me out. So far all the tutorials i read on the internet just show you how to make an "employee" or a "product" class, coding that is very simple, and i don’t have any problems using them and even binding them to Windows Forms using BindingLins<T>, etc... i ve been testing it out and it works fine. But right now i m trying to make something that have some relations, and i cant figure out how i am supposed to do it, what i m trying to do is a simple "Order" class that is related with a customer and some products... something like: Order Customer Products So, could you guys help me out with this ...Show All
Windows Forms Formatting text with different fonts in DataGridView text cell
Hi I have a column in a DatagridView which contains text. Is there anyway to get different parts of the text to display in different fonts. I know I could do this with custom painting but I want this particular column to set the height of each row using AutoSizeRowsMode which is proving difficult manually with custom painting. I was hoping there was a way maybe with OnCellFormatting to be able to set different parts of the text displayed to use different fonts. What I am trying to achive one way or another is a text column, the height of the text in this colum determines the row height for each row and the some lines of the text are displayed in bolld/underline, some in bold and some with neither such as Line 1 Line 2 L ...Show All
Visual C# String.Join on an array of objects instead of strings
Question The string.Join is a handy operation, but it doesn't operate on objects and extract the joined string from an overloaded ToString(). Is there a better way to write this code snippet or am I missing fundamental Code // List<Portfolio> Portfolios is a list of Portfolio objects which // are a specialized class where ToString returns a data ID which // needs to be joined. List< string > ports = new List< string >(); foreach (Portfolio pf in Portfolios) ports.Add(pf.ToString()); string portfoliosJoined = string .Join( "," , ports.ToArray()); WHY Winform controls such as the combo box, will take an array of objects and use the overloaded ToString() to use as the Text to display to the user. ...Show All
SQL Server For Loop Container does not check condition first time
Hi, It seems like For Loop Container works like do-while loop in C++. I have set its EvalExpresstion to @[User::SyncStats]==0 , I have an Execute SQL Task before this container that sets the variable to 1 but Container still executes atleast one time. Anybody else been through this Well, Silly me, There were actually 2 variables of same name but one with Loop Container scope one with global scope. And I wanted Loop Container to check the Global one. I changed the namespace and it works Thanks anyways. ...Show All
Visual Basic How to release an mdb file's file lock protection?
.NET 1.1 VB 2003 i have create a program where the program will dynamically create a mdb file, create a table, then populate the table via ADOX.dll using com interop. After populating the table i would like to FTP the said file to some FTP folder, to my dismay everytime i try to upload the mdb file i always get 0 kb, then i found out that the mdb file is "FILE-LOCKED" by some unknown process, but i dont know why because i have manually released all the resources that has been used, here is my code Private Sub GenerateMDB(ByVal strCompletePath As String) Try 'if file exists then delete mdb file If File.Exists(strCompletePath) Then File.Delete(strCompletePath) End If Dim objCatalog As New ...Show All
