624 Posted Topics
Re: You could get the encrypt the username and password and save it to Application.Settings, then on load decrypt it and compare it with whatever you want. | |
Re: I would think that if an ISP saw you sending out 100+ emails at once it would think you are a spam bot. If you are a legitimate company, you could probably contact the ISP and ask them to allow it. You could try splitting up the load (send out … | |
Re: Instead of using the designer for these binding sources, you can create a list of them programatically, then foreach the list to reset the bindings. Alternatively, you could do something like: [code] foreach (BindingSource bs in this.components.Components.OfType<BindingSource>()) bs.ResetBindings(true); [/code] If you are worried about performance, I wouldn't use this too … | |
Re: Please use code tags around your code. There are several errors with this code: 1) call() does not return a value, it should return an object 2) I am not sure why you are using the 'dynamic' keyword for your expando object, could you not simply use 'var' or its … | |
Re: With IE9 blowing firefox out of the water, I don't expect this to be useful until Firefox ups its game. | |
Re: Check to ensure that \\192.168.15.96\C:\FTPTrace is accessible through windows explorer. I can guarantee that it isn't. You can't have a ':' in a network path after a drive number - try sharing your C drive - then try naming the share "C:" instead of the default "C". It doesn't work! | |
Re: So... What's the question? This looks like an entire homework assignment, not a single question. | |
Re: Does the process you are running have a window (or a message pump?). If it does, use .CloseMainWindow() instead of .Kill() . .Kill should terminate the process but I think it requires admin priveleges, whereas I don't think CloseMainWindow() requires it. There's a distinct difference between the two - Kill() … | |
Re: Simply adjusting the .Visible property should allow you to hide the controls without disposing of them. | |
Re: Well seeing as you are interpretting all the data as generic objects, it doesn't suprise me that .ToString() of each item has a generic value. Instead of using objects, try to figuire out exactly what datatype this is. Try using intellisence on the GetIdentityRoles to see what it's actually returning … | |
Re: Did you want to write a server running on that remote machine, use windows file sharing, or use FTP? There's a few ways to go about doing this. | |
Re: I got curious about this and looked into it a bit. As mano said, there is a class under System.Security.DirectorySecurity that handles control to a folder, and allows you to restrict access to certain users with it. The problem with this is, the user (assuming with local admin priveleges) can … | |
I got a USB video card to give my development computer another monitor without getting a new video card. I started getting a headache after thinking about how they work... The product (as advertised) uses USB 2.0 and can output 2048x1152 resolution with 32 bit color at 60Hz. A bit … | |
Re: Let me know if this Linq needs any clarification: [code] //To generate the bool array bool[] myBits = (from bit in Convert.ToString(myByte, 2).PadLeft(8, '0') select bit == '1') .ToArray<bool>(); //To display myBits.ToList().ForEach(y => Console.Write(y ? "1" : "0")); [/code] | |
Re: Hmmm some type of loops might help you, as well as exploring other containers (besides arrays) [code] //Declare the number of stores in each region int[] Stores_In_Region = new int[] {5, 3, 2}; //This will organize the input data into seperate regions Dictionary<int, List<double>> InputDataByRegion = new Dictionary<int,List<double>>(); //This temp … | |
Re: Think about this for a second. In form1 you have a member of type form2 In form2 to you a member of type form1 When these classes are created they will follow this general order: form1 created has member form2 set to create new object on init, therefore construct form2 … | |
Re: [QUOTE=ChrisHunter;1755307]how do you mean print it ? output it to a console window ? If you'r asking something like this you clearly haven't searched it in Google. string string3 = string1 + string2; Console.WriteLine("" + string3); OR Console.WriteLine("" + string1 + string2);[/QUOTE] You shouldn't need to concatenate "" with the … | |
Re: To write to a text file use a System.IO.StreamWriter. Lots of (usually older) programs use an INI file that consists of sections and keys. It's also common to write to the registry. [URL="http://msdn.microsoft.com/en-us/library/2kzb96fk.aspx"]This[/URL] looks like a good resource for both. I prefer to use [URL="http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLTutMellli21.aspx"]XML[/URL] for its readability and scalability … | |
Re: An easy(ish) way would be to curve fit x number of points and then extrapolate using this function. This is, however, by no means a professional investment banking approach. They use all kinds of prediction methods (cost risk analysis, trending, etc). But software developers get paid very well in this … | |
Re: Calculating how many files are in a directory structure (the max of the progress bar) would take pretty much just as much time as loading in the directory structure (which isn't very long with System.IO.Directory.GetDirectories()). Basically the time it takes to count the directories is almost identical to loading all … | |
Re: [QUOTE=Alexamery;1750593]I too think this is very cool. I was curious about how you'd expose servo support in the Netduino as opposed to the Arduino. It would be nice for servos to be able to express movement in degrees rather than arbitrary 1000, 1500, and 2000's. [url]http://www.61seoservices.com/[/url][/QUOTE] I'm sure this could … | |
Re: These guys are right. It makes more sense to do the processing of the data in c# than in Access. LINQ is very powerful for this (non implemented logic that you might find useful): [code] //Get the data DataTable myData = LoadDataFromAccess(); //Scramble the data and build some objects with … | |
Re: What is kk? Instead of using a passed constant, try using an ID field in rnd(): Say you have a primary key called ID in this table: [code] string strsel = "select * from starttest where stud_id='101301' order by rnd([ID])" [/code] According to [URL="http://www.techrepublic.com/blog/howdoi/how-do-i-retrieve-a-random-set-of-records-in-microsoft-access/149"]this[/URL] passing a constant to rnd() will … | |
Re: According to [URL="http://msdn.microsoft.com/en-us/library/system.io.streamreader.readtoend.aspx"]this[/URL] ReadToEnd() assumes that the streamreader knows when it ends. Sounds like this isn't the case for you. Maybe try reading a line at a time until there is no data left (ie ReadLine() returns an empty string). Although I could just be feeding you lies - I … | |
Re: Are you allowed to use LINQ to objects and lists? If so, these have some nice functions built in for summation. [code] namespace ConsoleApplication1 { class intReport { static List<int> myInts = new List<int>(); static void Main() { DisplayInstructions(); Console.Write("Would you like to enter a value?"); while (char.ToLower(Console.ReadKey(true).KeyChar) == 'y') … | |
Re: C# can do all of that. And more. Way more. Don't use Javascript outside of AJAX. For fancy looking UI you should look into WPF and Silverlight (although I think Silverlight might be dead now). | |
Re: Your question makes almost no sense whatsoever. What does this setup file do? Does it have a path to an .mdf file? Does it have a connection string? How do you excpect us to give you a step by step guide to something that you've given us almost 0 information … | |
Re: You pay a trusted Certificate Authority to issue you a certificate and digitally sign your app. This somewhat lengthy process is described [URL="http://msdn.microsoft.com/en-us/library/ie/ms537361(v=vs.85).aspx"]here[/URL] | |
Re: Was it compiled for a x86 architecture or a 64 bit one? What assemblies are you referencing in it? What does the program do? (Some relevant code maybe) There's quite a bit of possible problems... We need to know a bit more about the application and how it was compiled. | |
Re: This thread is getting a bit painful to follow. You are making your program WAY overcomplicated for what it is doing. If this is for homework, please try to understand the following code before rather than just copy it and hand it in. [code] static Dictionary<string, double> _ZipsAndCharges = new … | |
Re: Post the designer code for the controls you're talking about. | |
Re: Could you not have parameters to these stored procs that specify how much data you actually care about? For example, a boolean flag indicating the whole table on true or just the 4 columns on false. Or for better scalability, a list of the indexes or some sort of identifier … | |
Re: 1. Static classes can only exist as singleton classes. Say you wanted a class for monsters in a game. If that class was entirely static, each monster would share the same members and methods. Therefore all monsers would occupy the same coordinates, life, etc. Static classes and methods are usually … | |
Re: I would say a combination of the loop checking if the file is available, with a thread.sleep() in the loop would do best. Make sure the Thread.Sleep() is only about 200ms to prevent unneeded code blocking. | |
Re: Have a look at this and let us know if it needs clarifying: [code] public void Implementation() { int mySum = GetNumbers(GetNumberCount()).Sum(); } public int GetNumberCount() { int iCount = 0; Console.WriteLine("Enter number of values to sum: "); while (int.TryParse(Console.ReadLine(), out iCount) == false || iCount <= 0) Console.WriteLine("Invalid number, … | |
Re: Do you mean drag an image file into the listview? Or drag an item within the same listview? Or drag from one listview to another control? | |
Re: [QUOTE=Kalle21;1747665]thx for it but om going only to put it in my While class and only have While obj = new While(); obj.Star(); in the main[/QUOTE] He wasn't writing your program for you. He was giving you a very simple and clear implementation of how your program is supposed to … | |
Re: Sounds like CloseMainWindow() is not setting the process to null. The process class has a few events you can subscribe to once you enable the events. Let me know if this makes sense to you: [code] //flag used to request a calculator while the current one is disposing bool RequestNewCalc … | |
Re: You can pass values to a Crystal Report via parameters. But one of the best features (I find, anyway) of CR is the ability to work with databases. This saves a lot of the overhead involved in sending large amounts of data via parameters. Also, Details sections fill with all … | |
Re: Have you ever written a client/server app before? It might be easiest to use a simple database structure, hosted on the server and connected to by the thin clients. Otherwise, as thines mentioned, you might need to design the socket communications from (almost) scratch. | |
Re: Is this code copy + pasted? I have never seen a =+ operator before (as on line 39). How are the results different every time? | |
Re: [QUOTE=Lowchernhwee;1737246]Some1help me.... so how to save the pictures i drew to jpg if possible load and edit a jpg file. [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace @try { public partial class Form1 : Form { private Graphics picture; private … | |
Re: Basically just a [URL="http://stackoverflow.com/questions/1451483/c-how-to-combine-trackbar-with-progressbar"]progress bar combined with a trackbar[/URL] would do. The amount of customization is up to you. Overriding the OnPaint event would allow you to draw them any way you choose. I would try to get one working with default win form controls then tweak it from there. | |
Re: LINQ makes dealing with problems like this simple. [code] public Form1() { InitializeComponent(); string[] mydata = new string[] {"2", "3", "4"}; WriteStringsToFile("text.txt",mydata); } public void WriteStringsToFile(string FileName, ICollection<string> myStringCollection, bool append = true) { using (StreamWriter sr = new StreamWriter(FileName,append)) { myStringCollection.ToList<string>().ForEach(x => sr.WriteLine(x)); sr.Close(); } } [/code] Let me … | |
Re: How much do you know about C#? It makes more sense to post specific problems than to post the entire scope of a school project. It's pretty unlikely someone is going to want to do your work for you, but it's very likely that people will help you step by … | |
Re: I would avoid making members and methods public unless they need to be (ie, required for functionality in development). C# has a few different access specifiers: public - the method/property/member is visible to [B]all[/B] other classes under any context protected - the method/property/member is visible to derived classes only private … | |
Re: What format are the files in? You will likely have to convert them to a bitmap (easiest to work with development wise) then convert them back to their original type (probably jpeg or something compressed for web use). Without knowing the filetype you don't know the file headers (important) or … | |
Re: Basically a property is a [B]method[/B] with the syntax of a [B]member[/B]. From a developers perspective: [code] public int MyVar { get; set; } [/code] Has the exact same functionality as [code] public int MyVar; [/code] It's actually slightly more efficient to use the second example, since the compiler doesn't … | |
Re: Subversion is great for this. Although there is a bit of setup time. I am not aware of any way to natively save versions to different paths automatically though. I use [URL="http://ankhsvn.open.collab.net/"]AhnkSVN[/URL](integrates with visual studio) and [URL="http://tortoisesvn.net/"]TortoiseSVN[/URL](integrates with windows) at work, and connect to a [URL="http://subversion.apache.org/"]Apache server running Subversion[/URL] (this … |
The End.