698 Posted Topics
Re: As DanielGreen said, i think there is some confusion about the meaning of a matrix. You are adding together two arrays. Also, you have not enclosed your for loops in bracers. Unless you have a single line of code it is best to use bracers to ensure the correct code … | |
Re: the picturebox doesnt scroll by default. You can manually add scrollbar controls and redraw the image using the scroll events. Alternatively, theres a [URL="http://www.planet-source-code.com/URLSEO/vb/scripts/ShowCode!asp/txtCodeId!4446/lngWid!10/anyname.htm"]simple guide[/URL] here thats an easy way to add scolling. You just pu the picturebox inside a panel control. Set the panel control to AutoScroll and the … | |
Re: 'My' is a feature added in .net 2.0. Visual Studio 2003 works with .net 1.1 i believe. I would seriously recommend updating to a newer version of Visual Studio. There are many great features in the more recent releases of both VS and the .net framework. You can download the … | |
Re: good thinking! If you are only displaying a reduced size preview of the transformations, why use up system resources applying changes to the full size image. Cant wait to see how your finished project runs :) | |
Re: The Form's KeyDown event will only fire if the form has focus, if a textbox or button has focus then the KeyDown event will be raised on the control, not the form. If you are checking the tabindex, i'm assuming you only want to process the KeyDown if the user … | |
Re: Are you sure you mean design time? Design time is when you are editing the control in the designer and you wouldnt see changes to its paint event in the designer. Do you mean you want to show changes to the control whilst the application is running? If so, thats … | |
Re: Here you go: [CODE] Public Class Form1 'store originally typed string Dim originalString As String 'boolean to check if textchange is result of scroll Dim scrolled As Boolean = False 'current trackbar values Dim currentLeft As Integer Dim currentRight As Integer Private Sub txtReduceString_TextChanged(ByVal sender As System.Object, ByVal e As … | |
Re: This is a very complex application, you're best bet is to start googling for information related to: a)Capturing video from Webcam b)Capturing audio from Microphone c)Realtime Video/Audio compression d)Internet connection between two remote pc's | |
Re: You could also look at the [URL="http://msdn.microsoft.com/en-us/library/system.string.padright.aspx"]string.PadRight[/URL] method. It returns a new string of the given length, with spaces inserted to fill where required. | |
Re: [QUOTE=coollife;1084324] code please[/QUOTE] Here at Daniweb, the policy is to help those who show effort. Please post the code you have that isnt working and we will help you to fix it. | |
Hey guys, I'm trying to design a custom control to extend a datagridview. The customer control is basically made up of two datagridviews, one will host the extra features, the second will offer all the usual methods/events of a regular datagridview. What i want to know is, can i automatically … | |
Re: Im really not sure what you are trying to do. Are you saying you want the name of the variable that stores an instance of your class to be determined at runtime? Thats really not possible..or desirable : / In your example you set className to "olaf", are you suggesting … | |
Re: I had a similar issue when i started using SQL Server...took a while to figure out but in my case it was a combination of two things: 1) SQL Server's settings default to not allowing remote connections. Instructions for turning this on can be found here: [URL="http://support.microsoft.com/kb/914277"]http://support.microsoft.com/kb/914277[/URL] 2) whether you … | |
Re: Which code doesnt work and in what way is it not working? The link avirag gave you was to a section of code written in C#.net | |
Re: One solution is to programatically press Ctrl+C to copy the selected text to the clipboard then retrieve it from the clipboard: [CODE] private void button1_Click(object sender, EventArgs e) { //Clear the clipboard. Clipboard.Clear(); //Ensure webrowser has focus webBrowser1.Focus(); //press Ctrl+C and wait for process to finish SendKeys.SendWait("^(c)"); // Get the … | |
Re: Which column name did you change? Have you ensured that the column names are definitely matching? Check in the output window in VS, are any exceptions listed when the form dissappears? | |
Re: I think what he means is he wants to add an 'uninstaller' to the project, rss is correct, you can use a batch file. Check out [URL="http://www.studentguru.gr/blogs/solidus/archive/2009/10/25/visual-studio-setup-project-how-to-add-uninstall-option.aspx"]this tutorial[/URL] to see how. | |
Re: [QUOTE=nemoo;1079052]thx for GOD I supposed only to create a simulation to the Lexical Analysis Phase not a complete compiler :lol: [/QUOTE] haha, i had wandered what you were doing. I read it and thought "A Lexical Analysis Scanner...for the .net framework...that'll be HUGE!" lol. I had no idea where to … | |
Re: short answer: you can't. long answer: superscript and subscript are font properties, a string only stores characters, it doesnt store any formatting data. You would need to apply the subscript or superscript when you display the text, in a label/terxtbox/printed format/etc. This is when you would apply the sub/super scripting. … | |
Re: [QUOTE=Medalgod;1079907]Just a fix on jonsca's code: [code] for (int i = 0; i < firstArray.GetUpperBound(0); i++) for (int j = 0; j < firstArray.GetUpperBound(1); j++) firstArray[i, j] = ??; [/code] The less than or equal to comparitor should just be less than, else you'll be reading/writing outside of the arrays … | |
![]() | Re: [QUOTE]The Imagine Cup encourages young people to apply their imagination, their passion and their creativity to technology innovations that can make a difference in the world – today.[/QUOTE] I think the very basis of the contest is to come up with the idea yourself :) |
Re: The region class belongs to the System.Drawing class. You dont need to include a reference to System.Drawing.Region, you just need using System.Drawing and the region class will be recognised as a member of that reference. | |
Re: You can use a serialiser to write whole objects (including state) to a file. If you write to binary it is not human readable as far as i know. Some things like property names are written, but the rest is usally random symbols. If you are concerned about security you … | |
Re: Check in your Form1_Load method. You havent removed the InitializeComponent() method call have you? Also, check the Output window, i have had first chance exceptions thrown in the past that prevented the code from executing fully but didnt stop the app from loading. | |
Re: The Refresh() method of a control forces it to invalidate its client arrear and redraw itself. If the control is not currently visible (ie, it is underneath another control) then refresh will do nothing. When the control is hidden it is invalidated, and wil redraw itself when it is next … | |
Re: As above, your design will be based on the specification. If its a personal project then you need to examine the market you are aiming to design for, if its an educational assignment then the brief should outline your design requirements. Esentially, if you plan on building this as a … | |
Re: Try something like this: [CODE] 'add textbox to page 'ensure control is named as you will retrieve it by name Dim tb As New TextBox tb.Name = "tb1" Dim tabPage As New TabPage tabPage.Controls.Add(tb) 'retrieve control from tabpage Dim getTB As TextBox getTB = CType(tabPage.Controls.Find("tb1", False)(0), TextBox) [/CODE] | |
Re: check out Math.Pow() [URL="http://msdn.microsoft.com/en-us/library/system.math.pow.aspx"]http://msdn.microsoft.com/en-us/library/system.math.pow.aspx[/URL] | |
In the simplest of terms, a Class is like a cookie cutter. It describes what members and methods an object should have. You use the cookie cutter (class) to make (instantiate) one or more cookies that are all the same shape. The cookies are called objects. The same way that … | |
Re: Have you already written a database to store the class/section combinations? | |
Re: As the others said, providing a solution at this stage would be doing you a diservice. This exercise is clearly intended to introduce you to the most fundamental concepts in coding. Are you studying at school/college...did your lecturer not explain the terms used in a lecture? I would expect this … | |
Re: @sknake, i noticed one..if you key in 1+2=-= MS calc will return zero (total - total = 3 - 3 = 0) whilst my Xerox returns -1 (last number - total = 2 - 3 = -1). I'm also curious as to whether this is truely [B]incorrect[/B] key sequenes :p … | |
Re: are the files definitely on the d: drive on the clients? | |
Re: generally you should define the data structure in the database. You dont want disparate tables inthe database and a lot of coding to conncet a student with the class,etc. If you have already defined the class/section/subject relationship in your database then adding the students should be fairly simple. Have a … | |
Re: firstly, please use code tags when posting code, it will format it with correct indents to make nesting much easier to read :) As for your error, a method that does not have a return type of void [B]must[/B] return a value, even if it is null (provided your return … | |
Re: What you need to do is use mod division and integer division in a loop to calculate the number of each denimination in the total. Here's a rough pseudocode to get you started: for each denomination (largest to smallest) number of denomination = remainder \ denomination (this is integer division) … | |
Re: You say you will be storing the values in an external file, does this mean you want to be able to close the application but still track changes over time when the application is restarted..eg, hunger is at 0% when app closes, 5 hours later app starts, hunger is now … | |
Re: if i've understood you correctly, you want to apply the blob method to the image after you have applied the threshold. Try this: [CODE] private void button2_Click(object sender, EventArgs e) { Bitmap temp = (Bitmap)org.Clone(); ot.Convert2GrayScaleFast(temp); int otsuThreshold= ot.getOtsuThreshold((Bitmap)temp); ot.threshold(temp,otsuThreshold); textBox1.Text = otsuThreshold.ToString(); temp = Blob(temp); pictureBox1.Image = temp; } … | |
Re: The following code will add the value to the end of a string and also convert it for you: [CODE]lstFuture.Items.Add(String.Format("Year 1: {0:c}", futureValue))[/CODE] the '{0:c}' is a place holder, the 0 says to use the first parameter after the string and the :c tells it to format the value as … | |
Re: you need to reverse the transformation that the zoom applies. So start by removing the translation , then reverse the scale: NB. just for clarity, as i know English isnt everyones first language, in this case i mean translation as 'a uniform movement without rotation' in line with the Graphics.TranslateTransform() … | |
Re: [CODE]GridView1.SelectedDataKey.Item(1)[/CODE] you are always using item '1', you need to change it to use the index (i) to reference the gridview items. Also, is there a reason you are using the SelectedDataKey? If you just want to retrieve each row then use GridView1.Item(columnNo, i) or if its all on one … | |
Re: Try [iCODE]Dim query As String = String.Format("DELETE FROM customer WHERE account_number='{0}'", account_number) [/iCODE] | |
Re: as privatevoid says, the datasource is the easiest way: [CODE] DataTable dt = new DataTable(); //populate datatable with data DataGridView1.DataSource = dt; [/CODE] Easy as that :p Retrieving data from the datagridview you can either pull the datasource out and work with that [iCODE]DataTable dat = (DataTable)dataGridView1.DataSource;[/iCODE] or access the … | |
Re: If you are trying to remove the line then dont add it to the EraseMod: [CODE] if (line.Contains(txtAdd.Text.Trim())) { continue; } EraseMod.Append(line); [/CODE] Alternatively, you can replace the line with the modified one: [CODE] if (line.Contains(txtAdd.Text.Trim())) { EraseMod.Append("modified text here"); continue; } EraseMod.Append(line); [/CODE] | |
Re: We're all learning, and we're all here to help each other. Welcome to Daniweb, as long as you show a willingness to learn and make an effort for yourself we will always be happy to help you :) | |
Re: i would write a method for each shape and paint the pixels around the point the user clicks. I wrote an example that draws Shape 1 from the link you gave into a picturebox when the user clicks: [CODE] private void pictureBox5_MouseClick(object sender, MouseEventArgs e) { if (pictureBox5.Image == null) … | |
Re: and check that your textbox.Multiline property is set to true | |
Re: that depends on how you are drawing your images. If you have them in a pictuerbox then you need to move the picturebox. If you are painting them to a control then you need to adjust the x,y values of the point where you draw the image. As for drawing … | |
Re: For a dropdown box in C# you will need to use a ComboBox control. In the combobox SelectedIndex changed event handler you will need to retrieve the selected value, then rebind the datagridview with the relevant details. Check out [URL="http://www.codeproject.com/KB/database/sql_in_csharp.aspx"]this tutorial[/URL] or google for C# SQL to find plenty of … | |
Re: without knowing what values you are pulling from your serial port its hard to say. But your interv al is being set based on the value in subData1[13]. If the value in that array item gets smaller the interval will get smaller and the progress bar will accelerate. Why are … |
The End.