Roxanne163's Q&A profile
Visual C# DataGridView - KeyDown and KeyPress events
I need prevent emergence signs from numeric keypad in cells of DataGridView and rerout their entry at textBox1. This code is solve the task in textbox controls, but at DataGridView no prevent entry at cell, nor from them does pass-off. Does anybody know how to solve this private void dataGridViewOrders_KeyDown (object sender, KeyEventArgs e) { if ((e.KeyCode >= Keys.NumPad0 && e.KeyCode <= Keys.NumPad9) || e.KeyCode == Keys.Add || e.KeyCode == Keys.Divide || e.KeyCode == Keys.Multiply || e.KeyCode == Keys.Subtract || e.KeyCode == Keys.Decimal) { // Determine whether the keystroke is a backspace. if (e.KeyCode != Keys.Back) { // Set the flag to true and evaluate in KeyPress event. flag = true; } } } private void dataGridView ...Show All
.NET Development How to Sort items in a generic List Collection
Hi Can anybody tell how to sort the generic list based on more than one column. I'm using fallowing code to sort the Generic List for one column. List<ClassProp> listItem3=new List<ClassProp>(); listItem3.Sort( delegate ( ClassProp p1, ClassProp p2) { return p1.OrderSo.CompareTo(p2.OrderSo); }); The above is for sorting based on only one column,But I need more than one column. How Thanks In advance. How about: listItem3.Sort( delegate ( ClassProp p1, ClassProp p2) { return p1.OrderSo.CompareTo(p2.OrderSo) == 0 p1.SecondColumn.CompareTo(p2.SecondColumn) : p1.OrderSo.CompareTo(p2.OrderSo); }); A sort by a second column makes only sense if the values in the first column ...Show All
Visual Studio 2008 (Pre-release) How to solve this problem when we transform a picture?Help me
The formatter threw an exception while trying to deserialize the message: Error while trying to deserialize parameter http://tempuri.org/:GetUserPhotoResult . There was an error deserializing the object of type System.Drawing.Bitmap Thank you, Now, We solve it. transform Stream instead of the Bitmap is likely ok! but, i did not know why.. ...Show All
Windows Forms WebBrowser instead of a FileView?
Has anyone got any links to info on using a webBrowser control as a fileview control. If you're not sure what I mean then spawn a webbrowser control and .Navigate("C:\"). It is the same control used in Explorer/Internet Explorer right I mean it browses files perfectly. It just doesn't seem to be to easy to find the selected files... Yeah, I've seen all of them. ExpTree is the best out there. I have even completely recoded it so suit my one project. I am really interested in seeing an actual implementation of an explorer shellview. Complete with context menu support, drag images etc. The closest I've seen to this is the WebBrowser control. It may only implement the IE view but it's still pretty much the same thin ...Show All
Visual Basic Read/Write Decimal Value to File Problem
Hi, I'm having a problem with writing Decimal values to file and reading them back again. For some reason, the last digit is truncated when I read the value back again. Take a look at the following code snippet. Dim Value As Decimal = 0.1234D FileOpen(1, "test.dat" , OpenMode.Binary, OpenAccess.Write, OpenShare.LockReadWrite) FilePut(1, Value) FileClose(1) Value = 0D FileOpen(1, "test.dat" , OpenMode.Binary, OpenAccess.Read, OpenShare.LockReadWrite) FileGet(1, Value) FileClose(1) For some reason, when I read Value back again, it is 0.123 instead of 0.1234. The '4' is truncated off the end. It is not a rounding issue as this is a Decimal type and it truncates any digit off ...Show All
SQL Server any good conferences or training coming up..
I would like to attend a good sql server training conference here in USA. What would you recommend My areas of interest are: OLTP, SSIS, SSAS, Data warehousing etc.. I googled for some excellent training or conference events but could not find one. There are two big conference providers that I know of - SQL Server User Group - PASS ( http://www.sqlpass.org/ ) SQL Server Magazine Connections ( http://www.devconnections.com/shows/sql/default.asp s=0 ) There are no doubt loads of training providers out there, but it depends on what you want, public course, private on-site, MOC courses. Discalimer, I work with these people - Solid Quality Learning ( http://www.sqlu.com/ ) Rather than ha ...Show All
.NET Development help handling data from the web service!
Could someone possibly help I have managed to connect to this web service and it is accepting my log on credentials but it returns no data... I suspect i am struggling on that part....now the documentation from the provider states that some addresses may have more than one match(this is a credit search). Therefore when more than one match is found...an address and name picklist is returned for the user to choose one match and this is resubmitted. Once resubmitted it should return name and address as entered(the match) as well as other components of a credit search(on a web form) My problem is processing this picklist...i tried this code but would not work: [code] <%@ Page Language="VB"%> <script runat=" server & ...Show All
Software Development for Windows Vista Runtime heavy CPU Load
I want to have a single runtime which will be able to run several workflows here I thought on a remoting server I start my runtime once and attach several workflows to that runtime instance. But the Problem for me it seems that the runtime is always producing 100% CPU load Can anybody tell me if my idea is wrong, may be suggest better one. Or do I have some config problem I create a workflow runtime like this: runtime = New WorkflowRuntime() runtime.StartRuntime() Console.Write( "Workflow started" ) Console.ReadLine() than I see my machine utilization is 100% without staring a workflow instance. ( using 2.2) thanks Wolfram The Problem only exists in VS2005, ...Show All
Visual Studio 2008 (Pre-release) Possible odd TreeView bug (sample included)
Using some custom style with a StyleSelector for my TreeView, I found a really strange bug, more related to ItemContainerGenerator, I think. I had to implement some drag and drop, and it appears that switching (my removing and re-inserting them) two sub-items in a sub-collection of a previously switched item in the parent collection used as ItemsSource for my TreeView lead to some unexpected error : The container passed to StyleSelector.SelectStyle while reinserting the sub-items seems "invalid" ! It isn't related to the TreeView anymore : it isn't able to find ressources and if you try getting its parent ItemsControl, it is now null ! View the sample application I made to test this bug, since explaining here doesn't m ...Show All
SQL Server Changing Database Mail Host Database
Hi I am trying to change the host database (MSDB) of Database Mail to some new database (say NewDB) and unable to make DatabaseMail90.exe point to this new database (NewDB). Is it possible to do this Thanks Uddemarri When I passed the database name and server name as command line parameters to DatabaseMail90.exe , it picked messages from the queue but did not send any mail. The following error is logged in sysmail_event_log. 1) Exception Information =================== Exception Type: System.NullReferenceException Message: Object reference not set to an instance of an object. Data: System.Collections.ListDictionaryInternal TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Object ...Show All
Visual Studio HOW do I close a connection from CR Report View to OLEDB Database?
I designed a report with link Oracle DB by using OLEDB. when user views report (It make a connection to Oracle DB). After that they close ReportViewer form, this connection is kept open. When 200 users view report, server oralceDB is overload. I can't find out the way to solve it. Anyone can help me. Thank. I use the following code to call report (VS C#.NET 2005 and RAS server 9): ReportClientDocument m_crReportDocument= new ReportClientDocument() ReportAppSession m_crReportAppSession; m_crReportAppSession = new ReportAppSessionClass(); m_crReportAppSession.ReportAppServer = strReportServerName; m_crReportAppSession.Initialize(); m_crReportDocument = (ReportClientDocument)m_crReportAppSession.CreateService("CrystalRep ...Show All
Visual Basic Excel 2003 Add To List Code
this code works and adds an entry to the list but the entry in the worksheet doesn't become the last item in the list instead it gets entered at the last counted row. I think that the Resize part of the code may not be quite right. Hope this makes sense. Can anyone help on this please. Private Sub CommandButton1_Click() Dim SourceData As Range Dim found As Object Set SourceData = Range("ListRange") Set found = Nothing ' Try to find the value on the worksheet. Set found = SourceData.Find(ComboBox1.Value) ' If the item is not found in the list... If found Is Nothing Then Message = MsgBox("This Item is not in your list of Room Classifications, do you want to add it &q ...Show All
Microsoft ISV Community Center Forums Scorecard & Sharepoint
Can anyone help!!!! After deploying scorecards to sharepoint, most users when trying to view the scorecard webpart get the following error: Web Part Error: A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe. In fact the only users to be able to view the scorecards are the two accounts used in the creation of the scorecard - almost everyone else gets the above message. To make this problem even more confusing some of the users can view the scorecard. After reviewing two users with the same domain & sharepoint rights one of which can view them the other can't - absolutely no consistancy - so making this a dam hard issue to figure out. I ha ...Show All
Visual Studio ReportViewer Conditional Formatting Anyone?
Hello, I'm completing an application based on VB2005/SQL2005 Standard using ReportViewer. According to the documentation (see http://msdn2.microsoft.com/en-us/library/ms252095(VS.80).aspx ) conditional formatting is supported. However, when I attempt to implement this, the report text is not formatted, but the color specification text is printed as in "Red", instead of the number printed with red color. I am obviously missing something here - any help is much appreciated. My customer specified conditional formatting in the requirement doc, so it is actually rather important to me... Thanks again! Atle Sorry, I should have read the doc a little closer - I found the reference to setting the Color property ...Show All
Internet Explorer Development IE7 and issue with TrackPopupMenu(Win32) within ActiveX-control
Hello. I have a trouble with calling win32-function TrackPopupMenu from ActiveX in new Interner Explorer 7 (RC1 and all betas). The situation is: I have some ActiveX-control - "MyPopupMenu". This control is being used to show context popup menu. To do it, it used win32 function from winuser.h. There's an issue with one of them - TrackPopupMenu. Control has worked fine in IE6, but in IE7 it doesn't. When TrackPopupMenu is called in non-dialog window, nothing happens! There's no popup menu (it was constructed by calling CreatePopupMenu and InsertMenuItem previously). But popup menu still works fine in dialog windows (ones that created in script by window.showModalDialog). Can anybody help me THX. It looks li ...Show All
