TheBlackDahlya's Q&A profile
Windows Forms Add entries to ComboBox in DataGridView
The best way to ask this question is to describe the simplest scenario of what I am trying to do. So here goes. I have two business objects: 1) Address - For simplicity assume only 3 columns : ID, Street, City_ID 2) City - Columns: ID, CityName I would like to have a form where the address is in a DataGridView control and the User can get the City from a dropdown or combobox. Thats the easy part, I know how to do that. What I want to achieve is something that is easy to do in MS Access but an equally simple solution in VS2005 has been eluding me: First, if the list of Cities is empty, I don't want a gridviewcomboboxcell error. Second if a user types in a city that does not already exist, I want that city to be added dy ...Show All
Visual Basic GDI newbie help
I am jus beggining to work with GDI with visual basic. Trying to draw a line with the system graphics, I get a nulll exception error. Dim bb As System.Drawing.Point bb.X() = x_plot bb.Y() = y_plot hit.DrawLine(Pens.Black, x_plot, y_plot, 580, 195) I get the error on hit. what I am missing. Thank for help You need the new operator to create the Point instance. Insert bb = New System.Drawing.Point or make it more compact like this: Dim bb As New System.Drawing.Point(x_plot, y_plot) hit.DrawLine(.. ...Show All
SQL Server temporary table
hi ! i used some temporary table in store procedure ( sqlserver 2005 ) our team have report software calisto . the calisto use crystal and reports which use this store procedure . because of that , we have list of many temporary table with the same name #dbo . sug_name ... , #dbo . sug_name ... ,...... in the system database . what could be the reason for that and how can we drop it Msg 3701 , Level 11 , State 5 , Line 2 Cannot drop the table '#sug_name' , because it does not exist or you do not have permission . " Missed the last notification of your post, Madhu is right, you should alway be cle ...Show All
Visual Basic How to use this API :StartServiceCtrlDispatcher
hi. API: StartServiceCtrlDispatcher This API use to run services. but i cant use it in vb6. Please help me. Payman wrote: This API use to run services. but i cant use it in vb6. Just to be clear, StartServiceCtrlDispatcher doesn't run a service. Rather it is called by the service implementation to associate a ServiceMain function with a Service Name. If you really want to implement a service in Visual Basic, you might find it easier to use Visual Basic .NET and the ServiceBase class. http://msdn2.microsoft.com/en-US/library/system.serviceprocess.servicebase.aspx If Visual Basic .NET is not an option, there is an old article in the archives that describes one way to implement a servi ...Show All
SQL Server Problem with Performance Monitor
Hi all, I’m trying to start the Performance Monitor to collect data of the counters of SQL Server: - Access Methods - Buffer Manager - General Statistics - Locks - SQL Statistics But when I perform the start, it occurs an error. When I see the Events Log, the only information that appears is a warning that indicates that the service could not start. I’m using Windows Server 2003 with SQL Server 2000. thanks!!!! ...Show All
Visual Studio Team System cannot create unit tests
when i try to create unit test for selected methods the following message is prompted "Template file for selected project file is missing" Thanks The originl poster may not be still having the problem. However I have the same problem. Where are these templates stored so I can check and see if they are in the correct place Do they have a specific file extension Andy ...Show All
Visual Studio 2008 (Pre-release) Show page in new window with WBA
Hi, I want (for an example) to develope a store system with WPF/xbap. Every store item can have a "product deteils" URL. This details page comes direct from the manufactuter. From the first look WBA seems to be a real great idea for such a solution because I have a lot of functionality to build a rich UI. The only problem is that I have to provice information from manufacturer sites. And I don't want to loose my application focus for this. So it is (from my point of view) very normal to show the content in a new window. Otherwise the user gets lost since there is no way to bring him back from the manufatorers site to my WBA. And event to open a new page with a "BACK button" and a frame with the manufaturers pag ...Show All
SQL Server Stored Procedure Performance
Hello, Given that a stored procedure and T-SQL code in query analyzer are exactly the same, why would the stored procedure run much slower When I mean much slower I mean 3 sec for the code in query analyzer as opposed to 2:33 sec for the stored procedure. Exact same code! Profiler also gives more reads and writes for stored procedure, and a lot of BatchStarted and BatchCompleted directives between the 'start' and 'end' of the stored procedure. Any help is greatly appreciated. -Tim I thought I was updating the statistics and rebuilding the indexes on this database weekly (and I do have it in the 2005 (9.0) compatibility mode); but upon further inspection of the execution plan I fo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Mouse Sensitivity / Speed in Full Screen Mode
I'm developing a Mouse based game - The user only has to position the mouse on the right place at the right time and click :-). I'm using a 800x600 screen. While debugging, I'm running the game in a window, and mouse feel is fine. When I switch to full screen mode (uncomment graphics.ToggleFullScreen() in my Game's c'tor) the game looks the same but the mouse is way too fast. It's like setting the "Pointer Speed" in the Console Panel/Mouse a few notches up towards "Fast". Is this intentional Is there a way to control the mouse speed that's specific to full screen mode Is there some settings I can use to change the sensitivity (and I'll have to revert it when leaving the game) If you a ...Show All
Windows Forms validate password
I have a password field in my login page (ASP.NET 1.1), how can I validate password based on at least 6 characters, one number, and one capital letter. Hi Jim, You should a Regular expression to verify the password. An example of what you need can be found here (c#): http://weblogs.asp.net/erobillard/archive/2004/09/29/235889.aspx The example uses Microsoft's defintion of a strong password: at least seven characters long contains at least one character from each of the four groups: uppercase lowercase numerals symbols found on the keyboard. With a few changes, you can change the sample to match your needs Hope this helps, ...Show All
Visual C# Web Reference Wizard problem
Hi all , hop your goin to be able to helpme out with this. I'm using the the VS2205 Add webreference Wizard to expose Webservice that i need for my project. I'm getting all of the information back execpt for one deffined type. I have TypeA which stores 5 properties and thers no problem with that i then have TypeB which is basically a array of TypeA. Normally i would expect to beable to getboth typeA and TypeB however i'm only getting TypeA and TypeA [ ] Is there a reason why VS2005 is seeing TypeB as just a Array of TypeA and not Auto Generating the code for the typeB i have looked at the WSDL file myself and i can see the type defined in it but VS2005 decides that the TypeB is not need and its easier just ...Show All
.NET Development Windbg - "Failed to request ThreadStore"
Hi, I'm debugging a C# app (that sits on top of an unmanaged c++ app). I've loaded my .dmp file in windbg, and loaded the sos extension. Running the !threads command gives the above error, searching around I can't find any information about what can be causing this I can use the ~ command to see all native threads running. Running the !dumpheap command gives the following: The garbage collector data structures are not in a valid state for traversal. It is either in the "plan phase," where objects are being moved around, or we are at the initialization or shutdown of the gc heap. Commands related to displaying, finding or traversing objects as well as gc heap segments may not work properly. !dumpheap and !verifyheap ...Show All
Windows Forms How do I set a DataGrid View
I am building a Windows Form, using C# The Dialog box I am working on is a Mini Search Function. The user types into a txtbox, then the script will look in the MSQL db, to find where all products are like the txtbox The code I have so far is SqlConnection conn = new SqlConnection(@"MyConnectionHere"); SqlCommand cmd = new SqlCommand("Select * FROM tbl1 WHERE Nombre LIKE '%"+txtSearch.Text+"%'", conn); conn.Open(); SqlDataReader rdr = cmd.ExecuteReader(); if(rdr.Read() == true){ MessageBox.Show("Here I will add the results into the DataGrid", "Next Step", MessageBoxButtons.OK); }else{ MessageBox.Show("I am afraid there are no products where where the product name is like\n ...Show All
Gadgets File upload with Sidebar Gadget
Is there any possible way to upload a file through a gadget I am creating a gadget that takes a word document or .txt file as input, post that to our servers and then we display information to you every day based on that information through the gadget. (the user gets a infoId that will give them their own customized info) Any ideas would be appreciated. Thanks. Thor. You can manipulate the local file system. You can read a file to upload via XMLHttpRequest, using an FSO binary stream. If you want to allow the user to select a file, use System.Shell.chooseFile. Combining the two: var adTypeBinary = 1; var cfItem = System.Shell.chooseFile(true, "Word Files:*.doc:Text Files:*.txt::", "", ""); if (cfItem.path != "") { oStrea ...Show All
Visual Studio 2 problems with V1 release
1. Showing context menus gives an OLE error 2. The version of TxtTemplating is 8.1 not 8.2 (unlike what the migration guide says) and I get a warning about inconsistent versions. Rest of product looks good 1. I solved this by referencing 8.2 version of all assemblies. TextTemplating assembly is not (why ) directly pickable from .NET tab. But you can find it manually and select in Browse tab.In my case it is in directory C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.TextTemplating\8.2.0.0__b03f5f7f11d50a3a\ Second way (i suppose to be right) is to hand-edit .csproj file. ...Show All
