ashley_bnb's Q&A profile
Visual C# help with events to make this little code from patterns & practices work
Hi I saw this code in patterns & practices for defining events for business entity: My question is right at the buttom. // Define a common event class for all business entity events public class EntityEventArgs : EventArgs { // Define event members, to provide information about the event } // Define a delegate specifying the signature for business entity-related events public delegate void EntityEventHandler(Object source, EntityEventArgs e); // Define a custom Entity class that raises events when the business entity state changes public class OrderEntity { // Define 'before' and 'after' events for business entity state changes public event EntityEventHandler BeforeChange, AfterChange; // Private field ...Show All
SQL Server RS2005 Date parameter - JScript error
I have a RS2005 report that was deployed to a ReportServer and has been running for over 1 month. I personally have not run this report in the past month, however, today when I tried to run it I got an error trying to select a date parameter. I can't paste samples of the windows displayed, so I'll do my best to explain. When I click on the report, it goes to the View window and displays 2 date parameter fields. When I click the icon next to one of the parameter fields, I get an error window that says A Runtime Error has occurred. Do you wish to Debug Line: 383 Error: 'resultfield.id' is null or not an object I click Yes and get a VS Just-in-Time Debugger window, where I choose New instance of VS 20 ...Show All
Visual Basic Drag and Drop Problem
All, A simple problem I hope. I have a list and drag items from the list to another control starting the the drag and drop operation on the mousedown event of the list. However when the mousedown event fires the drag and drop operation begins but the list doesn't update until after the drag and drop has completed. Basically, I want to click on an item in the list, the list to update something with the selected item, some code to run to determine whether the item clicked is allowed to start a drag drop operation, and if so to begin a drag drop operation (all in the mousedown event) pheewwwww!! I ve currently got around this by using the hover selection option on the listview but I d rather click on an item to select it rather than hover ov ...Show All
Visual C# Conversion of DateTime to FILETIME
hi, I need to convert a date time value to file time, i tried this .... FILETIME ft = new FILETIME (); //from System.DateTime to System.Runtime.InteropServices.ComTypes.FILETIME ///////////////////////////////////////////////////////////////// long hFT1 = DateTime .Now.ToFileTime(); ft.dwLowDateTime = ( int )(hFT1 & 0xFFFFFFFF); ft.dwHighDateTime = ( int )(hFT1 >> 32); ///////////////////////////////////////////////////////////////// in order to check that conversion is right I converted file time back to date time using this code ... ///////////////////////////////////////////////////////////////// //from System.Runtime.InteropServices.ComTypes.FILETIME ...Show All
SQL Server Reporting Services
I want started service Reporting Services but there is display of a mistake message how I can start this service therefore ...Show All
Visual Basic Label - Multiline
Hello. A question please. I'd want to fill a label with different texts. Theses texts can have 2 lines. Can I set the number of characters in each line of the label Thanks... Hi, Do the following instead.>> Drag a textbox to your form. Set the following properties to TRUE. ReadOnly=True MultiLine=True Then drag the vertical height of your textbox and adjust the width to suit the font and text you are using. Adjust the textposition property to Center if you want too. In code textbox1.text=" This is line 1 " & VbCrLf textbox1.AppendText(" This is line 2 ") Hope that helps Regards, S_DS ...Show All
Visual C++ please help!
I made a short program,when I then sent it to a freind without .net seted,my program didn't work on his PC giving the error: "This application has failed to start because the application configuration is incorrect". I was wondering ,that's release. when I use .net2003 ago,there's no such error! thanks! Also with Visual C++ 2005 regular C++ programs (one's that don't use .NET) won't run on other computers unless you have installed the appropriate C/C++ runtime on the other computer. ...Show All
Windows Forms Using Visual Studio Deployment Projects to install standard windows shortcuts instead of advertised shortcuts
I have found many questions in various MSDN forums posted by people who are having problems with the shortcuts that are installed in the Start>Programs menu. These problems boil down to the use of advertised shortcuts by windows installer as a default. An example question is ( http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=155266&SiteId=1 ): Shortcut problems I created a VS 2003 deployment project and I've set it up the way I want, even with a custom installer class. At first I had shortcuts on the desktop and in the program files that were working. Now, the shortcuts will uninstall the program if you double click them. When looking at where they are pointed, they show the install ...Show All
SQL Server Same DB, Different Performance on Different Servers
Hi, We are doing response time testing on our application with SQL Server 2000 SP4. But it is found that a query have different performance on the same DB (restore from the same backup) in different servers. The execution plans are different on the 2 servers. Server A: the execution plan use parallelism with varying response time (from 3 sec to 64 sec). Server B: it is a single thread execution plan with faster response time (about 1 sec). Here is the server configuration: Server A Dell 750, you can access Dell homepage for more detail. CPU – P4 2.8 GHz CPU Memory – 2G Disk – RAID 1 SCSI OS – Windows 2003 Enterprise Edition SP1 Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18: ...Show All
Visual Studio Info / documentation on solution level targets
Hello! Where can I find info / docs on the solution level tasks, such as "ValidateSolutionConfiguration" Are there others like it, some task that happens at the end /marcus Hi, Im not sure if there exists such document. The available targets are: ValidateSolutionConfiguration Build Clean Rebuild Publish And targets for each project that is a part of the solution. For more info the best thing to do is to have a look at the project file that is created to represent the solution. You can do this by setting the envrionment variable msbuildemitsolution=1. Then rebuild the solution, following this you should see a .sln.proj file. That is the msbuild project file that represents the so ...Show All
Windows Forms only allow user to select value 1 through 4 from listbox,textbox....?
I want to have the user select/input 6 values. They choose/enter 1,2,3, or 4. I would like them stacked in a vertical fashion. These values relate to a character string in a listbox What is the best way to have these values lined up and limit the choices to 1,2,3, or 4 Thank You ex: (listbox on the left, value on the right) _____________ | Some string | 1 | Some string | 1 | Some string | 4 | Some string | 3 | Some string | 2 | Some string | 1 ----------------------- ...Show All
Windows Forms host usercontrol on a modal child form?
I just set the Mainform's 'IsMdiContainer' property to true but when adding the following code to a tab controls selectedIndex changed event, the form does not appear. Any ideas Can I do this (successfully) Can I simply change this formerly NonMDI app to on that supports modal forms thank you. -greg NewMDIChild.Controls.Add( Me .UserControl) NewMDIChild.Location = New System.Drawing.Point(100, 100) NewMDIChild.Size = New System.Drawing.Size(400, 200) NewMDIChild.Visible = True NewMDIChild.TopMost = True NewMDIChild.Show() Hi, have you tried adding the following line before your NewMDIChild.Show() line NewMDIChild.MdiParent = Me This line sets the current form as the par ...Show All
Visual Studio 2008 (Pre-release) How does WPF Handle simple control focus?
I don't know if I am missing something, but WPF seems to be having trouble handling focus changes. If I make 2 textboxes and a button to switch the focus between them, something strange happens. WPF thinks it changed the focus upon the button.Click event, but it actually takes another mouse click (actually anywhere on the window, even the titlebar!) to make the cursor actually move from one textbox to the other. using System; using System.Collections.Generic; using System.Text; using System.Windows; using System.Windows.Controls; namespace Project3 { class Starter { [STAThread] public static void Main() { Application application = new Application(); Window1 window = new Window1(); application.Run(window); ...Show All
Visual Studio 2008 (Pre-release) LINQ syntax in VB.NET
I've been looking into this LINQ thing, and it's looking good. Thumbs up! I watched the videos on Channel9 with the Great Dane Anders Hejlsberg (ok he lives in the US but I like to think of him as Danish) - godt gaet Anders og co! I really like the syntax in C# where you turn the query around when compared to SQL, so it is like FROM {x} WHERE {y == 1} SELECT {z}. This I understand was done because of IntelliSense, which is great. Now I have learned that the VB.NET implementation is not turned around, it's more like SQL, and I wonder why... Are we gonna lose IntelliSense over this /Klaus Enevoldsen Now that we're breaking SQL compatability (which doesn't bother me at all) I'm reevaluating what I consider l ...Show All
Windows Forms The deployment identity does not match the subscription
hiya, I get this error when I try to deploy a project that was previously successful. I re-tried, after deleting allthe manifests..but stilll no joy. Can anyone suggest anything many thanks, yogi Are you getting this error when trying to update the application on client box to new version This error is displayed if anything in the deployment identity other than version has changed across updates. The most common reason would be if you signed the new version of the app with a different certificate which changes the publickeytoken. Try uninstalling the existing app from client machine and then install the new version. You can check the identity tag in both deployment manifests (.application ...Show All
