Hatchman's Q&A profile
Visual Basic about copying info from a ".txt" file to a listbox
This myt seem lyk a very stupid question for most of you people out there, so i apologise for my ignorance. I am learning computing at school this year, and i had to do a project at school. Anyways, i am really really stuck on this, i have been trying 2 do it for the past 3 hours and it seems like i really need some help. I have got this txt file with the info like this: "DEF $13.45" "ABC $12.95" "Cheese Lovers $11.90" "Vegie Supreme $11.90" "$50.20" I was wanting to copy the whole file into a listbox. So this is what i tried, but it never seemed to work. This is what i have thought of, i have tried alot of other methods but they dont work too. Fi ...Show All
Software Development for Windows Vista question about the custom debugger on windows forms application
I've been using the custom debugger for windows forms posted here: http://wf.netfx3.com/files/folders/design_time/entry1929.aspx And it works great. Just a question. When a different view of a composite activity is being "debugged" (like the Faults View), I cannot make it to appear automatically, so if the activity being debugged is in that view, I have to change it manually (clicking on the views tab on the designer)... So, I would like to know how can I make the debugged view (in this case, the Fault View) to appear without user interaction when an activity that belongs to it is active. I've been trying the methods ActivityDesigner.EnsureVisible() and activityDesigner.Parent.EnsureVisibleContainedDesigner(activityDesigner) ...Show All
Windows Forms Only the last value is sent???
I was wondering if anyone could tell me why it only appends the last row of data in my listbox to my xmlserializer to write it to my xml file....the infomation comes in the listBox but only the last row of data is written to the xml file.....why is that and how would i go about fixing that...any help would be great! empinfo info = new empinfo(); string connect = System.Configuration.ConfigurationSettings.AppSettings["connstring"]; SqlConnection sql = new SqlConnection(connect); string cmd = "Select * From Employees"; SqlCommand scmd = new SqlCommand(cmd, sql); sql.Open(); SqlDataReader dr = scmd.ExecuteReader(); if (dr.HasRows) { while (dr.Read()) { //s ...Show All
SQL Server SELECT Help Please
Hi All... Consider the following table: RecId AssocId Text 1 10 blah 2 10 blah 3 20 blah 20 blah 20 blah Certain records are "associated" with each other using the column AssocId. I have a select statement that uses several other columns not shown and gets me a set of records. But I also want to include the records that are associated with each of those records in the set regardless of their other columns. That is if I have: SELECT * FROM Table WHERE RecId = 3 How do I also include those other 2 records whose AssocId match the one I got with the WHERE (and of course I want it in the same SQL statement...) Any thoughts Than ...Show All
Visual Basic Help, My program exits unexpectedly with no error codes.
My program exits for no apparent reason unexpectedly with no exit codes errors. My guess is that it might be related to timers that could be destroying the stack. I say that because every time that I could catch it I found the following condition. Timer A would start its timer elapsed routine, during that execution time timer b would fire its routine, and before timer b finished, timer a would exit its routine. I originally had 4 different timers involved, and reduced that to just two, one having a very short execution time, and the problem got a lot better, but still happens. I have made the two timers involved to be thread timers, hoping that it would eliminate any conflict, but it does not seem to help. How do I go about determining fo ...Show All
.NET Development Date Format
Dear all, How can I format a Chinese date format to a English(United States) date format(01-Mar-06), It means how can I make a date format regardless of Computer's Regional setting Thanks you nobugz wrote: Hmm, no, that's not redundant in the format the OP wants it. Specifying the culture is essential to get the correct 3-letter month abbreviation correct. "December" in German is "Dez" for one, wonder what it is in Swahili. For the record: I'm not German. Yes, in this case it would prove useful. In general, unfortunately, it's not a good way of translating words as it's a language/region combo. e.g. languages that don't have a region (like Gael ...Show All
Visual C++ cpp_quote error in MIDL
I'm new to the MIDL compiler and I need a little help. The MIDL compiler doesn't seem to recognize the cpp_quote keyword. interface ITest { cpp_quote ("#define TEST 10"); } This code produces the following error on the cpp_quote line number: error MIDL2025 : syntax error : expecting a type specification near ";" Thanks nobugz. I cut and pasted an example from the MSDN website and figured it was cpp_quote that was causing the problem, but it was the semicolon. ...Show All
Visual Studio Express Editions Filter to form2
I am brand new to VB Express 2005 and only just getting starting to understand it. Here is my problem. I have two forms connected to a SQL Express database within the project. Table 1 and Form 1 lists the customers Table 2 and Form 2 Lists the email addresses and passwords for each account 1 customer could have up to 30 email addresses. I can get the customers to show on Form1 and all the emails and passwords to show on Form2 with no problem. I can even add a button that opens Form2. What I am trying to do is open form2 and only shows the data that relates to the selected customer. It’s probably very simple but I am a beginner after all ...Show All
Visual Studio 2008 (Pre-release) xaml projects
I just installed vc# express and the .net3 runtime and the windows sdk but I get no xaml/wpf project templates. How can I create a xaml project with vc# express Hi ahmedilyas, thanks for the quick reply, I did, but I get an error telling me that the .net runtime is not installed (althought I did install it - dotnetfx3setup.exe September CTP) when you say "not supported" what do you mean Do you mean not doable ...Show All
Game Technologies: DirectX, XNA, XACT, etc. rotated text
Hi all, I'm trying to rotate a text by certain degrees. I tried doing it by using 'Mesh.TextFromFont' method. Before calling 'Mesh.DrawSubset' method i changed the world matrix. The problem I'm having is that I have to scale the mesh to the size I want it to be, but when I do that the text looks really bad, really really bad (depands on the amount of scaling, ofcourse). How can i solve this problem I didn't found a way to set the size of the mesh. I tried doing it using 'Font.DrawText' method, but I couldn't rotate it Is it possible Please, don't send me to the SDK example I've already viewed it and did not manage to solve the problem. Thanks. You could use Font.DrawText to render to ...Show All
Visual Studio Team System Help urgently required - Team Server sharepoint problem
Running the TS 6 month trial edition - everything seemed to install ok. when trying to create a team server project from VS.NET 2005 wizard: Event Description: TF30162 (Sometimes TF30170): Task " SharePointPortal " from Group "Portal" failed Exception Type: Microsoft.TeamFoundation.Client. PcwException Exception Message: Client found response content type of 'text/html; charset=windows-1255' , but expected 'text/xml'. The request failed with the error message: System. ArgumentOutOfRangeException : Ticks must be between DateTime.MinValue.Ticks and DateTime.MinValue.Ticks On the Team Foundation Server, can access the Team Web Site, the SQL Server Reporting Services Web site, but not the Sharepoint admin site ! ...Show All
SQL Server Count(*)?????
I am trying to find the significance of using the Count(*), does that mean it only pulls one value according to the query that the procedure calls or what i am a lil lost on this particular feature CREATE PROCEDURE dbo.Sales ( @UserName varchar(256) ) AS DECLARE @Exists int SELECT @Exists = COUNT(*) FROM SalesPerson WHERE UserName=@UserName IF (@Exists <> 0) BEGIN SELECT SalesPersonId FROM SalesPerson WHERE UserName=@UserName END ELSE BEGIN SELECT -1 END RETURN GO For this particular SP, you don't need to do any check. Simply do below: create procedure dbo.Sales ( @UserName varchar(256) ) as select coalesce( (select SalesPersonId from SalesPerson where UserName = @U ...Show All
SQL Server Need to Subtract the result of two stored procedures
I am trying to take the results from two stored procedure and subtract them to get credit from two columns. The stored procedures look like create PROCEDURE mw AS select * FROM pla p where p.st in ('ds', 'sd') and (iPlayerID = '5345') compute sum(p.amount) RETURN both procedure have the same syntax. I am not able to use AS in to insert the values into a variable. Is there a wizard to use stored procedures are --Money Played stored procedure CREATE PROCEDURE MoneyPlayed AS select * FROM table s where s.strStatus in ('GP', 'GB') and (id= '4134') compute sum(s.iAmount) RETURN --Money won stored procedure create PROCEDURE MoneyWon AS select * FROM table p where p.strStatus in (' ...Show All
Silverlight (formerly WPF/E) WPF/E Export: Text as Path, how to change?
Hi, why isn't it possible to export text as an WPF/E XAML Text element. I currently get all my text exported as a path instead. I'm missing something Michael I'm assuming you're talking about the Expression Designer again. I think the reason you're seeing that is because Expression Design is really for creating graphics, not neccessarily for doing things like what WPF/E is used for. Think of it more like Paint rather than Word. What we really need is for Blend to support WPF/E. :) ...Show All
Visual C# some questions I could use a little help with
Hi all, I am trying to understand what these methods are IsOdd, IsInteger, and extractAlpha. Also, how would you implement them in the following statements. bool IsOdd(int number) bool IsInteger(string strValue) and string ExtractAlpha(string strValue) Thanks you want the functionality of those function (if so) Description;this function tells that the number is odd or even. bool IsOdd(int number) Description:This function tells that whether the given parameter is of integer or float or string or any other datatype. IsInteger(string strValue) Description:This function extract only alphabets that contained in the strValue variable, some times v pass numbers and special character ...Show All
