- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
50 Posted Topics
Re: Several ways to do it, here is an article on [URL="http://vckicks.110mb.com/image-from-file.php"]loading image files[/URL]. Just make sure to dispose of new objects properly depending on how you load the images | |
The .Net Framework uses by default radians in its trigonometry calculations. Find out how to convert degrees to radians to use with C# | |
Use regular expressions, regex, to create an efficient textbox that only takes in digits as input. | |
Re: It might not be the cleanest solution, but error when decrypting is almost always the wrong password. It's not too bad to assume that an error meant the incorrect password was entered (error = alert user wrong password). I think this is normal based on how the encryption algorithm works. | |
Re: .NET even has a built-in function to do the conversation. Some basic research would tell you the answer | |
Re: Sure it's possible! The trick is to scan the directory using System.IO.Directory.GetFiles() and System.IO.Directory.GetDirectories() [make sure to do it [URL="http://vckicks.110mb.com/scan_files.html"]recursively[/URL]] Then you can upload each file one at a time. If you need help with that here's a link to my site on [URL="http://vckicks.110mb.com/csharp_ftp_upload.html"]uploading files via FTP[/URL]. By the way, … | |
Re: This is a pretty big issue when it comes to .Net applications. In case you haven't, I would read up on [URL="http://vckicks.110mb.com/obfuscator.php"].Net Obfuscation[/URL], which is the simplest way to protect your applications. RemoteSoft's Protector is more advanced, but definitely more powerful. I have used it in the past and it's … | |
Re: You need to make use of the FormClosing event. Here is a quick example: [CODE]private bool minimize = true; private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (minimize) { e.Cancel = true; this.WindowState = FormWindowState.Minimized; } }[/CODE] The reason for the minimize bool variable is to have control of whether … | |
Re: Maybe try [CODE]this.Controls.IndexOfKey("txt_to" + i.ToString());[/CODE] if the index is not -1 then you can use this.Controls[i] and it will be the textbox | |
A simple way to check if the current C# program is the only instance of itself running. | |
The xor operator allows you to switch the values of two integer variables without the need for a third, temporary variable. | |
A slightly modified version of Bucket Sort that uses LinkedLists and initializes buckets only when required. Results in massive speed improvements. | |
Convert a color to a uint representation and back with simple byte shifting. | |
Bucket sort is a very simple, fast sorting algorithm specialized in integers. | |
Draw animated GIFs in C# in a frame-by-frame basis. Gives you a finer level of control. | |
Re: Unfortunately there is no way to make a Form semi-transparent and keep controls within it opaque (as far as I know). The hackery way to do it is to have two forms, one semi-transparent, and the other one on top to hold the opaque controls. However I don't recommend this … | |
Re: Just a quick glance I would play around with this line: output.Write(fr.friendName, fr.friendStreet, fr.friendCity, fr.friendState, fr.friendZip); You have to convert the arraylist element into a string or something before writing it to the file. Just make sure it's in a format that you can read back later. | |
Re: Just some quick thoughts, if you are using .NET Framework 2.0 or up then you have the notion of partial classes, which means the code for the Form can be in several different files. The code you posted seems to be designed to be the only code in the Form, … | |
Re: Some interesting answers. I've always used this method: [URL="http://vckicks.110mb.com/single-instance.php"]Single-Instance Application[/URL] It's obviously not fool-proof because changing the title of a running application is not that hard. Something else you can do is if you can get the location of the running process you are comparing, create a new FileInfo class … | |
Hello, I'm having some very confusing problems with the StringFormat class. I'm hoping someone will know what's going on. I want to draw text right-to-left. It's multiple lines so I figured using the StringFormat class was an easy way to handle that, I declare it as: [CODE]StringFormat f = new … | |
Re: depends what you mean by "the icon". If it's just an image try a PictureBox | |
Re: [url]http://richnewman.wordpress.com/hslcolor-class/[/url] perhaps that will get you started | |
Re: I don't mean to give a useless answer but a simple Google search of all the above questions gives immediate and rich answers... | |
Re: I tried writing tetris a while back (not for C#) but trust me on this: make blocks classes and then use small arrays to hold 4 blocks in different positions (to make pieces). That will make it MUCH easier when it comes time to break pieces apart as rows disappear. | |
Re: I know what you mean, it would be nice to have a structured way for applications to communicate between each other. The best you will find is by hooking on DLL's used by other programs. There are plenty of legitimate uses for such applications without them being viruses or keyloggers … | |
![]() | |
Re: i would recommond to convert to C# first. Luckily 1.1 to 2.0 C# conversion is relatively simple since most new things in C# 2.0 only make things easier (so worst case C# 1.1 code will be harder than it has to be). Tricky part is VB.Net to C#. But like … | |
Re: I cannot really relate with a personal example. But I can't imagine having to memorize everything. A better idea would be to memorize Properties and Methods that are commonly used (how do you know which are common? As you keep programming you will get a feel for what is commonly … | |
Re: There is a series on CodeProject all about this topic, they are quite impressive: [url]http://www.codeproject.com/KB/security/steganodotnet.aspx[/url] For the rest of them, do a Ctrl+F search of "Steganography" in: [url]http://www.codeproject.com/KB/security/index.aspx?#Cryptography%20&%20Security%20-%20Security[/url] | |
Re: I'm not really sure what you mean but here is a good place to start: [url]http://www.codeproject.com/KB/combobox/[/url] They have a lot of articles on custom comboboxes. I don't think you'll find exactly what you want, but it gives the idea on how to approach the task. Good luck | |
Re: If you want the border when you print then it's probably easier to add it during the PrintPage event of the document. | |
Re: try something like this: for (int i = 0; i < listBox1.Items.Count; i++) make sure it's i < and not i <= since you are starting with index 0. Good luck | |
Re: you might find this page helpful: [URL="http://bytes.com/forum/thread524979.html"]http://bytes.com/forum/thread524979.html[/URL] | |
Re: if you are talking about the default blank row at the bottom of all the rows then you have to turn off the property AllowUserToAddRows. Since it is not a real row you cannot delete it. | |
Re: This is something similar to what you are doing, working with [URL="http://vckicks.110mb.com/dynamic-control.php"]dynamic controls[/URL]. | |
I've been going crazy with a problem lately and I was hoping someone could give me a little insight. Basically I have a database project in C# that I work on with two computers. One uses Vista and the other XP. So far I have transfered the project files between … | |
Re: Anyone with the same problem, the [URL="http://vckicks.110mb.com/scan_files.html"]recursive scanning[/URL] article shows how to do it exactly. | |
Re: Be careful with instances of classes. You might be passing variables to the wrong instance. | |
Re: A cleaner way to do it is with API calls, there is an example in this page on how to [URL="http://vckicks.110mb.com/csharp-programming.php"]Capture the Screen[/URL]. | |
Re: it depends on the batch file i think, but just try "C:\setstation.cmd", you just need the full path. | |
Re: There is no easy way to filter data with a generic collection unfortunately. But sorting shouldn't be too hard since generic collections have a Sort function you can call. To implement a custom sorting algorithm check out this link on [URL="http://vckicks.110mb.com/sort_points.html"]sorting points[/URL]. It should help as a general guideline. hope … | |
Re: In this case I would load all the string data into a variable so you can use the StringReader class (in System.IO). The StringReader object lets you read a text file line by line. So you could scan through the lines in search of your delimeters and only read the … | |
Re: set the Name property of the textboxes to a common name and increment with numbers, for example, "txtQuestion1", "txtQuestion2", etc. Then later you can iterate through the Controls collection (through the Form or whatever is holding the textboxes) and if the name starts with "txtQuestion" for example, take it's Text … | |
Re: It depends on your programs structure--as in how the dialog is created and shown--but try closing the dialog Form (the one called with form.ShowDialog()) by setting the DialogResult equal to OK or Cancel. Then make sure to read any property values before calling Dispose. | |
Re: easiest way: [CODE]int myInt = 5; string formattedInt = myInt.toString("0000"); int readFormatted = int.Parse(formattedInt); //in case you want it back to an integer[/CODE] | |
Re: there is an API call that i can't recall from memory, but it gets the ID of the current Active Window | |
Re: for dynamic arrays use List<double>, works like an ArrayList | |
Re: Try checking the filename extension before adding it and only add the ones that end with ".mp3". Here's the full code: [CODE=csharp]private void listview1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy; } private void listview1_DragDrop(object sender, DragEventArgs e) { string[] directoryName = (string[])e.Data.GetData(DataFormats.FileDrop); //Get all the files inside … |
The End.