2,157 Posted Topics
Re: Depends. If you use versioning on the DLL then yes it will notice and you will have to recompile. Otherwise, no, as long as nothing it needs changed, it should run fine. | |
Re: ??? A bitmap is an image, it's derived from the Image class. Anywhere you use an Image, you can use a Bitmap. | |
Re: Since this is an assignment, giving you the code wouldn't help you learn. But I will tell you how I'd go about some of the things. String.Split() to get the individual words. Regex to see if it contains numbers or symbols. I'd check the case of the word and convert … | |
Re: Which version of the .NET libraries do your XP machines have on them? I have no problems with .NET 4 on Win7. Have you tried recompiling on the Win7 machine? | |
Re: [QUOTE=emcoloney;1642987]Console.WriteLine("Hello, {0}, my name is {1}, "Bill", "Bob"); would print:[/QUOTE] Actually it would print: Error 1 Newline in constant Error 2 ) expected Error 3 ; expected Error 4 ; expected Error 5 ; expected Error 6 ; expected | |
Re: If you look at your Program.cs file, you'll find code that looks like this: [code]static class Program { [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } }[/code] Your problem stems from that last line where it runs the form. When the first form is closed, then the Aplication.Run() … | |
Re: There isn't, but I made one for you! [code]using System; using System.Text.RegularExpressions; namespace ExtensionMethods { static class Extensions { public static int NthOf(this String s, char c, int n) { int result = -1; MatchCollection mc = Regex.Matches(s, c.ToString()); if (mc.Count >= n) { result = mc[n - 1].Index; } … | |
Re: You can't take over the standard input of an already running process. You can send keystrokes to a window using something like the method [URL="http://www.codeproject.com/KB/cs/SendKeys.aspx"]here[/URL] | |
Re: [code]String x = "this"; for (int i = 1; i <= x.Length; i++) { label1.Text = x.Substring(0, i); }[/code] Of course this will go so fast you can't see it. So I created a form, put a label and timer and a button on it and added these methods: [code]private … | |
Re: Your problem is the use of the / operator and your Convert.ToInt32. When the resulting value is a fractional number greater or equal to .5, it rounds up. Put Math.Floor around your divides to stop this, i.e.[code]intDollars = Convert.ToInt32(Math.Floor(decChange / intDOLLARS_VALUE))[/code]. Saves you all the Mod code, too. | |
Re: I could not find any built in way to deal with this. If you know how many lines your textbox can hold before it has to enable the scrollbars you can use TextBox.Lines.Length and see if there are more lines than you can display. | |
Re: Clean your project (Build Menu, Clean Solution). Recompile. | |
Re: You don't need a parameter as there is nothing that changes in the query. You run a stored procedure exactly like you execute a SQL statement. What classes you use depend on what database you are using. | |
Re: The standard connection string for MySql looks like this: Server=myServerAddress; Database=myDataBase; Uid=myUsername; Pwd=myPassword; | |
Re: UI objects can only be accessed on the thread that creates them (usually the startup thread). You can check if you are on the UI thread or not by calling InvokeRequired on the control you wish to update. If it is, then you'll need to Invoke a delegate on the … | |
Re: You can treat a string as an array of characters, so you could do something like this: [code]for (int i = 0; i < LinesFile.Length; i++) { for (int j = 0; j < LinesFile[i].Length; j++) { Console.WriteLine("The character at [{0},{1}] is {2}", i, j, LinesFile[i][j]); } }[/code] Otherwise you'll … | |
Re: If you are going to use Sockets, it has a property called Endpoint, which is most likely and IPEndPoint. IPEndPoint has a property Address which is the IP address of the client. | |
Re: [code]string[] fileExtensions = Directory.GetFiles(@"C:\temp").Select(p => Path.GetExtension(p)).Distinct().OrderBy(p => p).ToArray();[/code] Gets all the extension in sorted order. | |
Re: You'll have to make two passes over the JSON file, the first to get all the columns and types, second to populate them. In the first pass I'd create a dictionary with the key being the column name, and the value being the full type. What I mean by full … | |
Re: Microsoft doesn't support using DirectShow in C#, but there is a project at [url]http://sourceforge.net/projects/directshownet/[/url] that aims to do so. | |
Re: There are many different definitions of the term 'parameters'. Be more specific in your question. Second, you use them when you need to. You need to be a lot more specific as your question is too vague. | |
Re: Did you bother to read either of the replies to this [B][URL="http://www.daniweb.com/software-development/csharp/threads/381486"]exact same question you posted[/URL][/B]? | |
Re: Follow the instructions [URL="http://msdn.microsoft.com/en-us/library/s57wfzt1.aspx"]here[/URL] | |
Re: That's because you subtract the value in line 41 which should be right after line 52. Same holds true for line 70 and 82. ![]() | |
Re: A static variable is one that doesn't require an instance of the class to access. A static method is one that doesn't require an instance of the class to access. [code]public class MyClass { static public int myStaticInt = 3; public int myNonstaticInt = 5; static public void MyStaticMethod() { … | |
Re: In line 21 you ask the question "is any of these values less than 10?" If it is then you prepend 0 *to all of them*. You'd be better off getting rid of the check entirely and using String.Format: [code]... sed++; if (sed == 60) { sed = 0; min++; … | |
Re: try changing line 10 to [icode]layerName.Append((char)newbyte);[/icode] | |
| |
Re: You can run the command line utility schtasks from within your C# program. Use 'schtasks /create /?' for help about creating a task. NOTE: schtasks may not be available on Windows XP. | |
Re: To answer the last question, you need to do it on every byte of the file. | |
Re: [url]http://bytescout.com/files/help/SWFScout/2950.html[/url] | |
Re: C# and VB.NET are managed languages (and there is a version of managed C++). This means they all compile to an Intermediate Language. At runtime this IL is compiled using a Just-In-Time compiler (just like Java is) and run. In C# you don't use 'includes', the compiler makes use of … | |
Re: Not sure what you are asking. It is using the mouse click (down/up/move) now. Do you only want it to work when you click a button first? | |
Re: All those are properties of a Font object. Depending on what you want to change tells you how to get the Font object to change. What is it you want to bold, italic and/or underline? | |
Re: How does the reader connect to your computer? | |
Re: [QUOTE=GeekByChoiCe;1638669]Should be: txtstaff_id.Text = dr("staff_id").ToString()[/QUOTE] You'll get a "no dr exists in this context" error if you do this. 'dr' is an object, and you are treating it as a method. Square brackets is the proper way to do it. | |
Re: You can always do what I did: Look at the list of top posters and check their titles. Go down the list until you see the title change (you can probably figure out where it changes, too). | |
Re: Appending your question to the end of a 7 month old closed thread is probably not the best idea. Since you have a new question, open a new thread. That said, what the error is telling you is that the type of one of these[code]data.SelectCommand.Parameters.AddWithValue("@Term ",Term); data.SelectCommand.Parameters.AddWithValue("@Currform",Currform); data.SelectCommand.Parameters.AddWithValue("@Year",Convert.ToInt16(Year));[/code] Is not … | |
Re: You'll need to save the rectangles in some form of collection and draw them all in the Paint event, otherwise they vanish, as you have seen. | |
Re: Do the same thing as for a rectangle, but store the points where the mouse down and moouse move (up) go to and draw them in the Paint method. | |
Re: In line 33 you are using collBlock as a method, not an object, and it can't find any method named collBlock. What you should have is this:[code]DataBlock aBlock = (DataBlock)collBlock[name]; // square brackets[/code] | |
Re: What kind of problems do you have when you don't run it as Admin? Does it use/write to local files? | |
Re: Could you possibly tell us what errors you are getting, or should we just guess? | |
Re: From the [URL="http://127.0.0.1:47873/help/1-3828/ms.help?method=page&id=P%3ASYSTEM.WINDOWS.FORMS.SCROLLBAR.MAXIMUM&product=VS&productVersion=100&topicVersion=100&locale=EN-US&topicLocale=EN-US"]documentation[/URL] on HScrollBar: [i]The maximum value can only be reached programmatically. The value of a scroll bar cannot reach its maximum value through user interaction at run time. The maximum value that can be reached through user interaction is equal to 1 plus the Maximum property value minus … | |
Re: This byte sequence (in hex) resulted in an MD5 hash of [icode]68 96 55 13 90 19 02 12 35 06 45 31 90 73 51 46[/icode] [code=text]A4 03 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 … | |
Re: There isn't one. What can be done (and has by some other software) is to find the location of the notify icon and put a transparent window over it. The window would handle the drag/drop events. No, I don't know how to find the location of the notify icon :) … | |
Re: [code]Label1.Text = String.Format("There are {0:#,##0} burns in the database for {1:#,##0} total acres.", burnscount, acrestotal);[/code] [URL="http://msdn.microsoft.com/en-us/library/system.string.format.aspx"]String.Format[/URL] | |
Re: [quote]Q1. What is your name and job profile (like Database Administrator, Programmer etc.)?[/quote] Senior Software Engineer [quote]Q2. How often do you write each day a week?[/quote] Every day. [quote]Q3. How important is what you write to the successful performance of your job?[/quote] Critical [quote]Q4. Is writing important to your promotion/career? … | |
Re: Here are two different ways to do it, pick the one you like best: [code]using System; namespace ConsoleApplication1 { class Program { static void Main(string[] userInput) { Console.WriteLine("***********************************************"); Console.WriteLine("* *"); Console.WriteLine("* Programming Assignment #4 *"); Console.WriteLine("* *"); Console.WriteLine("* Developer: Alma King *"); Console.WriteLine("* *"); Console.WriteLine("* Date Submitted: September 17 *"); … |
The End.