Larry Surat's Q&A profile
Windows Forms WaitCursor and the TextBox
Hi, I have a WinForm application built in VS.NET 2003. The user enters the data on the form and clicks the Submit button to do some processing and the results are displayed in a multiline textbox. I am setting the form Cursor to Cursors.WaitCursor when the user clicks the button and then back to Cursors.Default when the processing is done. While processing, whenever I hover my mouse on the multiline textbox, it is not showing the HourGlass but it is showing on the other areas of the form. How do I make the HourGlass appear on the textbox also Do I have to set it for all the textboxes manually and then back to default after processing Any help is appreciated! Thanks Basani Your code is goo ...Show All
Visual C# An object reference is required for the nonstatic field, method, or property 'member'
This is likely another stupid newbie question but I need to understand this. I created a project and added a class to it. When i tried to access any of the global members of the class I would get the compiler message listed in the subject. Without thinking about it to much I put static qualifiers on all the members and went merrily along my way. Then I got to thinking about it and it didnt make sense to me. A member of a class whether it be a method an object or a primitive should be accessible to all methods in the class. Looking at other projects Ive done in c# this seems to be the case. This was the first time though that I added a new class from scratch to a project and Im now wondering what I did wrong. Here is a very basic code ...Show All
Visual Studio Express Editions Problem with PictureBox >? Not Working ! Why ?
I want this photo Usa.jpg to show in picturebox . if TextBox1.Text = "Usa" then PictureBox.Show This --> Usa.jpg How ::In Visual Basic 2005 Express Edition:: Not Working Please can you create sample application with this code PictureBox ...... And Upload link here. Please ...Show All
Visual Studio Visual SourceSafe Express?
will Microsoft release a free source control system(SourceSafe) for personal use just like Visual Studio Express Hi tlc660, You can also use Dynamsoft SourceAnywhere Standalone: http://www.dynamsoft.com/Products/SAWstandalone_Overview.aspx It is free for one user. Thanks, ...Show All
.NET Development .NET encourages poor coding?
The more I look at .NET error handling, and how to deal with it, the more frustrating it gets. Take this class for example. It has a single boolean property. You have to know on which side of the call an error will be raised… by the caller or the callee… well here’s a prime example. Say you have to read data from somewhere like a text file and you cannot ensure the format of the data is proper. Well, you cannot depend on a property to check that data for you if you strongly type the property. Read the orange comment to see what I mean, and please let me know how you deal with this situation since to me it appears to require horrible program design. Public Class ...Show All
Visual Studio Express Editions SMTP mail authentication failed
Hi, I have the following problem: sending mail via smtp like this: Dim MailFrom As New Net.Mail.MailAddress( "teszt@teszt.hu" , "Teszteles" ) Dim MailTo As New Net.Mail.MailAddress( Me .txtRecipient.Text) Dim myMail As New Net.Mail.MailMessage(MailFrom, MailTo) myMail.Subject = Me .txtSubject.Text myMail.Body = Me .txtMail.Text myMail.Priority = Net.Mail.MailPriority.High Dim myM As New Net.Mail.SmtpClient( "mymailserver.net" ) myM.UseDefaultCredentials = False myM.Credentials = New System.Net.NetworkCredential( "myuser" , "mypassword" , "mymailserver.net" ) myM.DeliveryMethod = SmtpDeliveryMethod.Networ ...Show All
Windows Forms Property value is not valid - PropertyGrid
Hi, I have got a propertygrid control. Now I want to replace the message box "Property value is not valid". Is this possible Any help would be great. Cheers, Franz Usha, Any chance you could post that example here I need to intercept/disable the "Property value is not valid" dialog at runtime for a control I wrote that uses a property grid. I tried to email you at the address you provided above, but the mail bounced. Or, if anyone else knows which attributes I need to apply to suppress this, I'd appreciate it. Alan ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Rants on XNA 1.0
This is my first reaction when I installed and tried the 1.0 of XNA. To summarize my feeling: it's still 95% for XBox and no nearer to replace the old MDX 1.0. So I decided not to migrate from MDX to XNA though I want to do that very much. I feel like MDX 2 more; amen to MDX 2. The hardest issue for me is the content pipeline, which is very necessary, but the workflow is fixed and it assumes the contents are only built before the program runs. The helper functions wrapping D3DX can only be used with types in the content pipeline. I have to utilize the full content pipeline just for generating something dynamically, of course with significant performance cost. Or I have to write those D3DX utilities my self. Currently I don't have a good id ...Show All
Windows Forms Combobox items Adding!!
Hii, I am using c# windows application: I have two arrays of strings one named textArray and the other is valueArray. I want at runtime to display the elements of the textArray in the combobox while the items value is added from valueArray: e.g say one item is US Dollar and its value is USD. Thanks not sure I quite follow but if I understand correctly, you wish to display the currency of a country that has been chosen by this databound combobox you can probably create a hashtable, which has a unique key and the related field. So say we have United Kingdom, this would be a key, then the currency field value would be £ so when selected from the combobox, simply get the value by giving the instantiated ...Show All
Visual FoxPro Aha, found. To be able to reply first cause an error:)
Hi everyone. I have noticed a rather serious incompatibility between VFP9 and older Foxpro versions. In the following code, when the field valid is fired, the related table record is not seeked and not found. In older Foxpro, the related table record is already seeked in the valid clause. This happens only for the first entry in the 'TmpProd' table but subsequent entries are seeked and fine. Is there a solution for this aside from seeking within the field validation code SELECT 2 USE prod order ProdId &&Index is on ProdId SELECT 1 USE TmpProd EXCLUSIVE SET RELATION TO ProdId INTO prod zap APPEND BLANK BROWSE FIELDS ProdId:v=showinf(),design=Prod.design RETURN FUNCTION showinf ...Show All
Visual Studio Express Editions Treeview NodeMouseClick Event Not Working Properly
Hello, I have the following code in a Treeview NodeMouseClick event: Try If e.Node.Level = 1 Then ListView1.Items.Clear() Dim nd As TreeNode For Each nd In e.Node.Nodes ListView1.Items.Add(nd.Text, 0) Next Else ListView1.Items.Clear() End If Catch ex As Exception MessageBox.Show("Select a category.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try If I select a level 1 node, my listview1 is loaded with data from the level 1 node's nodes. If any other level (0, 2, etc), then the listview is to be cleared. However, if I click a level 1 node and then immediately click a level 2 node, the listview DOES NOT clear. I have to click another ( ...Show All
.NET Development BC30456: 'InitializeCulture' is not a member of FIXES
Windows 2003 Server SP1, ASP.Net 2.0 BC30456: 'InitializeCulture' is not a member of Have a bug in your code but throws this error instead of the actual error Or getting this error randomly Or a similar error complaining that an asp.net method is not a member of a class like 'Page' when it is! and mashing refresh a few times sometimes makes it go away... After 2 Days of extensive search on the internet and finding plenty of people with this error and very little replies and resolutions, I took upon myself to get to the bottom of this (unacknowledged ASP.net framework bug) and list some steps to help all of you work around it. 1. If you use Visual studio to publish your site, during the publishing stage ...Show All
SQL Server truncate partition
hi list i have a table named stgBudgetFact, that is partitioned on DivisionID. each DivisionID goes into its own partition, which is on its own file group. the etl guru on the project wants to be able to truncate the partition, not do a delete from the table based on DivisionID. Is it possible to truncate the partition somehow (remove rows where DivisionID = 3 for instance without ALTER DATABASE, where the medicine is worse than the disease) and then reestablish the partition so we can restart a failed load by division i really hope something like this is possible thanks drew ...Show All
Visual Studio Controlling Source Control Fetch Order
I have a Visual Studio Solution which has a number of projects. Many of these have a shared file that is included in the Project file. (This file contains common properties in a <PropertyGroup> section.) I have added this common file as a solution item This all works well and is under SCC (Vault if it makes any difference). The issue comes when I try to "Open from Source Control...". This fetches the solution file and then opens the projects in turn (fetching files as it goes). This fails as the included file has not been fetched. It fetches this file near the end. So closing the solution and reopening fixes the problem. I have tried reordering the projects in the solution, and also artificially adding depenedencies, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Use SetData
Is it possible to draw sprite using another sprite as an alpha map As far as I've read the only way I can do this is by first using the DirectX Texture Tool to create a DDS file. Is it wise to be talking about sprites in XNA when it's really a Texture2D How do I access more blending options for the source and destination For different levels of transparancy, I've been using the Color parameter in the Draw function. You could create your own color like this: Color HalfTransparant = (255,255,255,128); The Color constructor is overloaded so you can define a color using 4 bytes (essentially an int from 0-255). They represent (red,green,blue,alpha). Setting the alpha to 128 in this case would make any object that is drawn with this &quo ...Show All
