472 Posted Topics
Re: As pointed out, I believe you are looking for the [icode]OpenFileDialog[/icode] given the VB name you specified. Here is the basic setup and call for dialog: [code=csharp] string fileName; using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Title = "Select File"; ofd.InitialDirectory = "c:"; ofd.FileName = ""; ofd.Filter = "All Files … | |
Re: First of all, I have noticed that you later reposted this problem you are having, which is not proper to do. I provided you with a reply in that repost about what I saw as a problem. Secondly, see my comments regarding your posts below: > actually storing the byte … | |
Re: In building your command ([icode]OleDbCommand cmd = new OleDbCommand("INSERT INTO song VALUES('1','" + buff + "')", mycon);[/icode]), you are implicitly converting "buff" (a byte array) to a string, which is not how you handle binary data and even if the cast was able to convert your entire byte array to … | |
Re: That's interesting, yesterday when I looked at this post the code was broken up into several blocks, but now it's all together?--weird. Anyway, I was wondering if you made any headway on this? Having never worked with the MP API and plugin, I hacked around a little and noticed that … | |
Re: [QUOTE=meaf;1044501]i managed to add the node and move around one to another, now i am suppose to update the node but really don't have clue how to do that with GUI[/QUOTE] How is your "node" defined? We cannot really tell you how to interface it with the GUI without knowing … | |
Re: As you have already learned by now, naming conventions are completely voluntary unless you are constrained to adhering to a standard. IMO, and until you find yourself confined to such constraints, continue learning and adopting naming techniques as you go along. I would like to point out that consistency can … | |
Re: I saw on this calculation on the web, but I don't have a .dss file to test it with... [code=csharp] public static long GetDSSDuration(string fileName) { FileInfo fi = new FileInfo(fileName); long size = fi.Length; long length = (long)(((size * 1.1869) - ((size / 1054) * 210)) / 1054); if … | |
Re: This will loop through all of the form's controls searching for the name of the control.... [code=csharp] private void button2_Click(object sender, EventArgs e) { for (int i = 1; i <= 3; i++) foreach (Control c in this.Controls) if (c.Name == "label" + i) c.Visible = true; } [/code] | |
Re: [QUOTE=cgyrob;1031743]I am removing the orignal event handler before adding a new event handler so there shouldn;t be multiple handlers for each instance. [code=C#] else if (ControlType == "DropDown") { ... field_dropbox.SelectedIndexChanged -= new EventHandler(field_dropbox_SelectedIndexChanged); field_dropbox.SelectedIndexChanged += new EventHandler(field_dropbox_SelectedIndexChanged); ... [/code][/quote] In the above, I don't understand why you are removing … | |
Re: Example of create table and ALTER table using the MySqlClient already mentioned: [code=csharp] public static void AlterTableExample() { string connStr = DbWrapper.TestDbWrapper.BuildConnectionString(DbWrapperType.MySql); string createStatement = "CREATE TABLE Test (Field1 VarChar(50), Field2 Integer)"; string alterStatement = "ALTER TABLE Test ADD Field3 Boolean"; using (MySqlConnection conn = new MySqlConnection(connStr)) { conn.Open(); // … | |
Hello friends! I have some database tables that store Image/Bitmap as part of each record as a Byte[]. I also have method that loads all the tables records into a DataTable and I would like some suggestions on how I can get this Byte[] column in my DataTable to be … | |
Re: Just depends on how you want to handle it. If transferring information to caller as node's text, you can do a search of all nodes to find it: [code=csharp] TreeNode FindTreeNodeText(TreeNodeCollection nodes, string findText) { TreeNode foundNode = null; for (int i = 0; i < nodes.Count && foundNode == … | |
Re: If I have understood correctly, you are wanting to perform a paragraph split when it exceeds the page length? I don't have a direct answer for you and these pdf libraries/utilities generally have a learning curve associated with their lack of documentation, etc. However, you might want to consider alternatives … | |
Re: Not sure what you are looking for. Are you wanting to load a table from your database containing the names and their availability (all of info already in table) and then randomly select two names from the table data having records marked/flagged as available? | |
Re: If the form's [icode]AcceptButton[/icode] property is set to other than "none", then the form will intercept the <RETURN> key and transfer control to the specified event... Check that the Form's property is not set: (eg. [icode]this.AcceptButton = this.button1;[/icode])--be sure to look in the form's designer.cs file... | |
Re: Are you wanting a WHERE clause example? If so, what database are you using? | |
Re: I don't know how this compiler compares, but I've heard about it and you can check it out if you desire: [URL="http://www.mono-project.com/CSharp_Compiler"]Mono C# compiler...[/URL] | |
Re: Setting the form's property [icode]this.MaximizeBox = false;[/icode] prevents the form from being maximized as far as I can tell. Are you saying this is not so in your case? Setting the form's property [icode]this.FormBorderStyle[/icode] to one of the fixed border styles will prevent it from being sizeable (eg. [icode]this.FormBorderStyle = … | |
Re: This is a little confusing to me... What happened to venkates.99, who started the thread? I see vksingh.24 saying the problem is solved--are the two of you working as a team or something? If there is still a problem, let us know what it is because there is no uploaded … | |
Re: Take a look at this link: [URL="http://jachman.wordpress.com/2006/09/11/how-to-access-ini-files-in-c-net/"]Sometimes you’ll find your self in a situation where you need to use outdated techniques in order to support outdated applications … That time you’ll recognize that .NET does not support INI Files anymore. ...[/URL] | |
Re: [QUOTE] ...I went into SQL Server Management Studio Express and granted all privileges to the root user but still no luck.[/QUOTE] I think you might be mixing apples and oranges because you indicate you checked your permissions with "SQL Server Management Studio", but you are programmatically trying to create a … | |
Re: [QUOTE=benkyma;1036753]Ok, I figured out that the error was actually triggered further down the code. It seems none of my parameters are being added into the query. I'm going to post the rest in case anyone can see what is wrong with it... [CODE]OdbcCommand myCommand = myConnection.getCommand("INSERT INTO entries(text, name, screen_name, … | |
Re: You can handle the close event on the form using the following event handler: [code=csharp] private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (DialogResult.No == MessageBox.Show("Exit without saving changes?", "Data Not Saved", MessageBoxButtons.YesNo)) e.Cancel = true; } [/code] The above event will be called whenever the [icode]Close()[/icode] method is executed. … | |
Re: If not required to use Array or ArrayList, I wouldn't use either. Use a typed list instead: [icode]List<>[/icode]. I would put the method outside of your Team class, but it really depends on where you intend to store your Team list or array. The best way to return an array … | |
A few days ago I decided to install MySql v1.2.17 and I downloaded a client class library: MySql.Data.dll v5.0.9.0 (by MySQL AB). I included the client classes inside my wrapper class and had it creating, dropping, inserting, and deleting tables..., or so I thought. I guess I never actually looked … | |
Re: Here is an example that uses a DataGrid, but it should give you a basis for starting or asking a more specific question: [URL="http://www.csharphelp.com/archives/archive236.html"]C# DataGrid with DataSet[/URL] Cheers! | |
Re: Old fashion alarm clock for me. Pull out mechanism on the back to engage, placed across the room so I have to get out of bed to turn it off, and definitely no snooze. Using a snooze could be a subject for a whole new blog! However, if I had … | |
Re: avirag, I don't know how to get the control to display exactly how you want. The view set to detail gives you the single column list (what you have now), but I don't know how to cause it to draw left instead of center. The largeicon view will give you … | |
Re: Have never tried doing that, but here are some interesting links I found while reading up on the subject: [URL="http://www.microsoft.com/Sqlserver/2005/en/us/notification-services.aspx#obtain"]Notification Services...[/URL] [URL="http://www.sqlservercentral.com/scripts/Miscellaneous/31899/"]Send SMS from a Trigger...[/URL] [URL="http://msdn.microsoft.com/en-us/library/aa260689(SQL.80).aspx"]xp_cmdshell...[/URL] | |
Re: [QUOTE=nccsbim071;1032929]how can we solve the problem of 32/64 bit platform and if they if have different cpu as X86 or x64,[/QUOTE] As I understand it, unless you target specifically for the x64 processor, you really don't need to worry about whether your app will be running on x86 or x64 … | |
Re: Please mark as SOLVED unless you are still having trouble. | |
Re: You cannot directly call a trigger from C#. What you might be able to do is: 1) Separate your trigger code into a stored procedure that can be called by the trigger, and also by the application (c#). 2) Do something from the application that would cause the DB to … | |
Re: [QUOTE=help-me-please;1033568]Hi Guys I was wondering if anyone could assist me by telling me / correcting my code as to where I am going wrong. I'm trying to simply excute flvmeta.exe, and pass the parameters: "flvmeta input.flv output.flv" when I do this manually it works fine, however when I build and … | |
Re: Are you sure you mean GroupBox? Other than serving to group other controls (encompass, contain), and especially RadioButtons as ddanbe pointed out, I don't know how you would use a GroupBox the way you describe. Changing the GroupBox.Text is easy though: [icode]groupBox1.Text = "My GroupBox Text...";[/icode] As far as the … | |
Re: Please use code tags: [code=csharp] ...code here.... [/code] I don't think your code will compile. [icode]DataGrid.CurrentCell[/icode] is a property, not a method... Did you just copy and paste that event handler (DataGrid_Click), or did you use the designer to create it? You can access those text values using the object … | |
Re: The jpg I looked at seems like it would be more suited for a DataGridView with a DataTable as its DataSource. Why have you chosen to use a ListView? | |
Re: See MSDN documentation for more details: [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellcontentclick.aspx"]CellContentClick[/URL] EDIT: Removed code that didn't work!!!--sorry, I should have ran it first. | |
Re: Nothing obvious standing out that I can see. What happens if you comment out that log.wtl("...") statement? Also, if there are other locations in the code where these Settings members or CheckBox.Checked states get modified, I would watch out for that too. | |
Re: Not sure if this is what you are looking for and I didn't test this, but it should work OK: [code=csharp] void ReorderItemToTop(string name) { // Locate item beginning with name's text... ListViewItem item = listView1.FindItemWithText(name); // If exact match, move it to the top of the List... if (item … | |
Re: Here are a couple of SQL reference sites you may want to bookmark: [URL="http://www.1keydata.com/sql/sql.html"]1keydata.com[/URL] [URL="http://www.w3schools.com/SQl/default.asp"]w3schools.com[/URL] | |
Re: To clarify, are you wanting to change these keys for the system, or just within/for your running application? | |
Re: Here is an example of capturing the KeyDown and KeyPress events for a textbox to limit numeric input. You could also modify this logic to accept only the characters you want: [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keydown.aspx"]Limiting input in control...[/URL] In addition to the examples sknake gave you, you might want to read up on … | |
Re: Is this what you are looking for: [icode] dateTimePicker.Value.AddDays(2.0);[/icode] | |
Re: Why do you care what method/step the user uses to close your application? I see this type of question a lot, and it's generally due to overlooking the behavior of the [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.closing.aspx"]Form.Closing event...[/URL], which is a cleaner approach in my opinion. If the user needs to save data or something, … | |
Re: Or even a dropdown TreeView connected to a TabControl that drives the tab page selection based on the level of drill-down... | |
Re: Have you tried googling "midi c#"? There is a lot of stuff out there--not sure if there is anything specific you are looking for... | |
Re: It sounds like you need to set the report's connection info for each of the tables. Try passing in the ReportDocument to this after you have set the table parameters, but before attempting to run/view the report: [code=csharp] public static void ReportSourceSetup(ReportDocument crDoc, ConnectionInfo crConnectionInfo) { // Each table in … | |
Re: If you set the [ICODE]comboBox1.SelectedIndex[/ICODE] to a value, it will call the event handler automagically... | |
Re: Please use code tags: [code] ...code here.... [/code] Your logic flow is a little weird to me. Shouldn't you just ask all the questions up front, then use their input in the if statements, verses checking this and asking that, etc.? | |
Re: Check the value of your [icode]comboBox1.SelectedItem.ToString()[/icode]. My guess it isn't what you think: "*.doc". Have you defaulted the selection before using (eg. SelectedIndex = 0)? Also, you can just use the ComboBox.Text Property to access the selected item's text as displayed in the combobox. |
The End.