Search Results

Search found 2806 results on 113 pages for 'winforms'.

Page 82/113 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • Multiple PictureBoxs' C#

    - by Austin Smith
    I'm having a hard time figuring this out. I know pictureBox only lets you display one image a time. I'm trying to create a pictureBox for each image in my collection. For instance if I have ten images in my List, then the method should create ten pictureBox for those respective images so each one is displayes in a pictureBox. I'm not sure which would be better a for loop or a foreach loop instead. every time the loop increments both the varaiables XCoordinate and YCoordinate which are the location of the PictireBox shoulld increase so that the PictureBox won't overlap one another in the Form. The reason for the method is that the number of images in the collection can change everytime the application will run. That's why I'm not creating them manually. So after its done all the pictures in the list should appear in a picture.Box. The box should be all the same size the only difference is the location on the form and the images inside them. Please any help and I will be grateful

    Read the article

  • moving image to bounce or rotate in a circle

    - by BlueMonster
    I found this small application that i've been playing around with for the past little while. I was wondering, if i wanted to simply rotate the image in a circle? or make the entire image just bounce up and down, how would i modify this program to do so? Everything i've tried will just stretch the image - even if i do get it to move to the left or to the right. Any ideas on what i can do? Code is below public partial class Form1 : Form { private int width = 15; private int height = 15; Image pic = Image.FromFile("402.png"); private Button abort = new Button(); Thread t; public Form1() { abort.Text = "Abort"; abort.Location = new Point(190, 230); abort.Click += new EventHandler(Abort_Click); Controls.Add(abort); SetStyle(ControlStyles.DoubleBuffer| ControlStyles.AllPaintingInWmPaint| ControlStyles.UserPaint, true); t = new Thread(new ThreadStart(Run)); t.Start(); } protected void Abort_Click(object sender, EventArgs e) { t.Abort(); } protected override void OnPaint( PaintEventArgs e ) { Graphics g = e.Graphics; g.DrawImage(pic, 10, 10, width, height); base.OnPaint(e); } public void Run() { while (true) { for(int i = 0; i < 200; i++) { width += 5; Invalidate(); Thread.Sleep(30); } } } }

    Read the article

  • Get items selected from another form

    - by Samarth Agarwal
    Hi I have a Windows Form application. I have a Textbox. I want to implement a functionality like when the user clicks on the textbox, a list should be made available to the user and then the item selected from the list should be filled in the textbox. The list should not be available if some other control is focussed other than the textbox. What would be the better way to do this? Should I implement the list in the same form as the textbox or should I use another form for the list? I want to implement a functionality like in the Tally Accounting Software.

    Read the article

  • C# - How to prevent fullscreen form covering the taskbar?

    - by Dodi300
    Hello. Does anyone know how I can prevent my C# winform covering/going on top of the taskbar? My form's border style has been set to "FixedToolWindow" which seems to cause this. I thought about reducing the height of the form, when the user makes the form maximized, but that wouldn't work as people may have different size taskbars. Any ideas? Thanks.

    Read the article

  • Why is the PrintDialog not displaying (in 64 bit)?

    - by Bill
    This code, when built in .Net for Any CPU platform and running on a 64-bit machine, simply returns a DialogResult of Cancel without showing the expected dialog box. Dim dlg As New System.Windows.Forms.PrintDialog If dlg.ShowDialog() = Windows.Forms.DialogResult.OK Then '... print the document ' End If However, it works fine when the application is built for the x86 platform, and run on a 64-bit machine. How can you display the dialog with a 64-bit compile?

    Read the article

  • Further Details on Vallidating Event not Working....

    - by Sameep
    I have created a custom control that inherit the TextBox, in that control i have override validating event and in validating event i have put validation that checks for the empty field. Now when i use that control on my winform and when i click on save button it immediate fires save event.. the validation event of custom control fires and it displays the error message but still it does not stop the save event to fire.... the save button CauseValidation Property is set to true.. i have also put (this.ValidateChildren()) i have also put CancelEventArgs ce.Cancel = true; in Custom Textbox control but neither working to stop the save event to fires.. i only want to fire Save event if Textbox is not empty. validating event fires, shows message for empty field and immediate fires save event.. now if you got an idea then if you have solution then please provide solution..

    Read the article

  • Unwanted Retriggering of Textbox Events

    - by user348917
    This is one of those "seems obvious" as how to do, but came across interesting side effect in implementing. I'm trying to keep two text boxes syncronized when information is updated. In this example, I will be using txtStartDate and txtEndDate. If the txtStartDate is changed, then the txtEndDate should should be updated. Likewise, if the txtEndDate changes, I want the txtSartDate to be updated. The side effect I'm comming across is that when I set them up under the TextChanged event for both, the events seem to retrigger against each other indefinately (endless loop?). Am I using the wrong event? Is this a task for a delegate?

    Read the article

  • question on method of Scrolling multiple usercontrols

    - by fishhead
    I have a user condrol that may have several instances created and I am looking for the best option to handle the displaying and scrolling on my winform. in the past I have simply displayed them in a panel and scrolled the panel, but I thought this time around I would like to try something different. any sugestions would be welcome. Thanks

    Read the article

  • Change Default Winform Icon Across Entire App

    - by Kyle Gagnet
    Can I change the default icon used on a Winform? Most of my forms have their icon property set to a custom icon. For the few forms that slip through the cracks, I don't want the generic "hey look, he made this in visual studio" icon. One solution is to tediously check every one of my forms to make sure they either have a custom icon set or have ShowIcon set to False. Another solution is to have every one of my forms inherit from a base class that sets a custom icon in the constructor. Aside from those solutions, what other options do I have? EDIT: I was hoping there would be a way to replace the source of the stock icon with my own. Is it in a resource file somewhere? Or is it embedded in a .NET dll that I can't (or really, really shouldn't) modify? BOUNTY EDIT: Is there a way to accomplish this without editing or writing a single line of code? I don't care how impractical, complicated, waste-of-time the solution is... I just want to know if it's possible. I need to satisfy my curiosity.

    Read the article

  • Sort a DataGridView by DisplayMember

    - by Dave
    Hi, I have a DataGridView that is bound to a DataTable. In this table there are some foreign keys. I am then using the CellFormatting event to get the corresponding text from another database table for each foreign key. I want to sort the DataGridView when the user clicks the header. Automatic sorting works but is not correct as it is Sorting on the ValueMember (ForeignKey ID) and not on the DisplayMember (the text). I tried using the SortCompare event but then I read that it does not work on DataGridViews that use the DataSource property. How can this be done? Thanks

    Read the article

  • [C#] NodeMouseClick event doesn't work correctly ???

    - by Wayne
    i use a treeview to display files and folders like Windows Explorer. it has a NodeMouseClick event but sometimes when i click +, this event doesn't fire. private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { MessageBox.Show("node mouse click"); } can anyone explain for me why ? and how to know whenever i click + ? thanks in advance!

    Read the article

  • What control to use

    - by Tarscher
    Hi all, I have a list of devices that I need to filter on according to options selected by the user. One such option is cooling: when the user selects cooling only the devices with cooling are shown. If cooling is not selected then all devices (with or without cooling) are shown. I wonder what kind of control I best use for this. My feeling is thata checkbox is not a good control since it represents: No cooling (unchecked) / only cooling (checked) while I want cooling and no cooling (unchecked)/ only cooling (checked). What control is best used here? Thanks.

    Read the article

  • In a Windows forms application, how can I use a listbox in a DataGridView coloumn instead of a combo

    - by Alex
    I'm working on a windows forms application that uses a DataGridView. Some of the cells contain a DataGridViewComboBox. In some cases, I have several values to display in the combobox. For that scenario, it would be better to use a ListBox instead of a ComboBox. Is it possible to use a multi-column listbox within a DataGridView instead of a ComboBox? If so, can you point me in the right direction? Thanks much. Al D.

    Read the article

  • Find out where something has been installed? Or if it has?

    - by Dodi300
    Hello. Does anyone know how I can get the location of a program that has been installed. My C# WinForm is meant to launch the installer for a program, mainly games, and then be able to detect where that program was installed. Or even if it was installed successfully. Would I have to look in the registery for the location of installed programs? Or is there another way? Thanks for the help!

    Read the article

  • Why doesn't my dataset.AcceptChanges update some new rows i've added?

    - by user280139
    I have a dataset in a datagrid with some data in it. Recently I've been asked to add some data to that dataset along with some controls to save the data from. I've added a few textboxes, 1 combobox and 3 textboxes that function as viewing of some datetimepickers that I have to use for dates. I've chosen to use textboxes in combination with datetimepicker because I also need to get and set the value NULL to the database. The problem is that when i call dataset.AcceptChanges() on that dataset that is binded using databinding to those controls it doesn't update the data that's contained in those three textboxes and the combobox. All the new stuff i've added works just fine. txtDataAcordare.DataBindings.Clear(); txtDataAcordare.DataBindings.Add("Text",dtPersonal,"d_DataAcordare"); txtDataInceput.DataBindings.Clear(); txtDataInceput.DataBindings.Add("Text", dtPersonal, "d_DataInceput"); txtDataSfarsit.DataBindings.Clear(); txtDataSfarsit.DataBindings.Add("Text", dtPersonal, "d_DataSfarsit"); this is the code i use to add the databinding. I am then using the datetime picker event CloseUp() to add the date into the textbox: txtDataAcordare.Text = dtpDataAcordare.Text; txtDataAcordare.Visible = true; txtDataAcordare.BringToFront(); After all my fields are completed i call: dtPersonal.AcceptChanges(); and these three textboxes don't get saved! Help, please! dtpDataAcordare.SendToBack();

    Read the article

  • forcing to Not to process an event

    - by BDotA
    C# WinApps: the main form has a key binding to CTRL-V ...so anywhere in the main app when I press CTRL-V something runs..good ... but also there are some MDI apps that are opening inside this main app ... in one of those there is a test box...ah! now CTRL-V also has a meanining for text box which is "Paste" ... so I added PreViewKeyDown to textbox and handled it, so now it is pasting BUT it is ALSO doing the main CTRL-V key binding that I had defined for the whole app ... but I do no want this to happen.... what can I do? ( I cannot change the key binding od the main app. I must keep it.)

    Read the article

  • question about windows controls changed event

    - by Mike
    I have several controls on my form and on changed event the logic entity properties are changed. Is it possible not to implement changed event for every control,but do it in one place and update my logic entity when user is making changes on the form?

    Read the article

  • How to remove row which has one or more empty or null cell ?

    - by Harikrishna
    I have datagridview on my winform. I am displaying records in the datagridview. Now after displaying the records on the datagridview, I want to remove the row from datagridview which has one or more empy cells that is no value in the cell for that row. So for that I am checking each cell for every row if there is any cell empty or null then I remove that rows using RemoveAt() function. My code is : for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { for (int j = 0; j < dataGridView1.Columns.Count; j++) { if (string.IsNullOrEmpty(dataGridView1.Rows[i].Cells[j].Value.ToString())) { dataGridView1.Rows.RemoveAt(i); break; } } }

    Read the article

  • Is using a DataSet's column Expression works in background same as manual calculation?

    - by Harikrishna
    I have one datatable which is not bindided and records are coming from the file by parsing it in the datatable dynamically every time. Now there is three columns in the datatable Marks1,Marks2 and FinalMarks. And their types is decimal. Now for making addition of columns Marks1 and Marks2 's records and store it into FinalMarks column,For that what I do is : datatableResult.Columns["FinalMarks"].Expression="Marks1+Marks2"; It's works properly. It can be done in other way also is foreach (DataRow r in datatableResult.Rows) { r["FinalMarks"]=Convert.ToDecimal(r["Marks1"])+Convert.ToDecimal(r["Marks2"]); } Is first approach same as second approach in background means is both approach same or what? EDIT: I want to know that first approach works in background as second approach.

    Read the article

  • How do I stop the designer from filling in my properties with null values?

    - by Tim Gradwell
    When I add a control to a form, visual studio assigns various of the properties of that form a value of null in the auto-generated designer code. I don't want the designer to make the redundant assignment (the value is already null). Can anyone tell me how to prevent it? example MyControl has property public SomeClass MyProperty { get { return m_MyValue; } set { m_MyValue = value; } } designer then autogenerates the following: myControl1.MyProperty = null;

    Read the article

  • Adding a border (Fixed3D) to an existing borderless application

    - by Aphelion
    Hi there, I have an .NET application that always starts itself with its border style to 'None', as it is supposed to be an full-screen application with a fixed resolution. However, i would like to add the window border (Fixed3D) to this window when the application starts so that I am able to move it around my desktop. My first idea was to have a tray app running, monitoring event messages, and somehow change the window style when this specific application starts. However, I am not sure if this will work and how to do this. Anyone that can point me in the right direction?

    Read the article

  • Image GDI+ Error c#

    - by Argons
    First sorry for the english. I'm having an strange problem when I'm trying to save a bitmap ("Generic GDI+ error") from a picturebox in my win app, I know that this problem occurs when trying to save to a directory that has no permission, but in this case I'm trying to save it to a memoryStream. using (MemoryStream fotoStream = new MemoryStream()) { Bitmap imagen = picture1.Image as Bitmap; imagen.Save(fotoStream, imagen.RawFormat); //Error here byte[] array = fotoStream.ToArray(); fotoStream.Close(); } Any light on this?

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >