Search Results

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

Page 10/113 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • WinForms Application Hangs

    - by Ram
    Hi, I have an application (ABC) that I developed and it as a windows application (.exe). It is by itself quite a big application referring a lot of dll's. However, now there is a requirement that demands that this application(ABC) be a part of an even larger application (XYZ). Hence, I had to change the project type of "ABC" from being a windows application to a class library, and by changing a few lines of code. My problem is that, ever since I started using ABC as part of XYZ, the application started hanging if I dint perform any operation on it for 10 to 15 mins... I do not have any problems while running it as a separate application. Any reasons why this might occur? Any suggestions would be really appreciated... Thanks, Ram

    Read the article

  • WinForms Form won't close on pressing X or Close() in C#

    - by MadBoy
    I'm having a bit weird problem with WinForm which seems to refuse to close for some weird reason. I've got very simple gui which sometimes doesn't react for me pressing X or when i use events on buttons it even reaches Close() and does nothing.. private void buttonZapisz_Click(object sender, EventArgs e) { string plik = textBoxDokumentDoZaladowania.Text; if (File.Exists(plik)) { string extension = Path.GetExtension(plik); string nazwaPliku = Path.GetFileName(plik); SqlMethods.databaseFilePut(plik, comboBoxTypDokumentu.Text, textBoxKomentarz.Text, sKlienciID, sPortfelID, extension, nazwaPliku); Close(); } } There are no events assigned to FormClosed or FormClosing. So how can I find out what's wrong. Sometimes X will work after the GUI is loaded but after i press Button to save some stuff to database it reaches Close() in that button event and it still is visible and does nothing. Can't use X, nor ALT+F4. I can go around GUI and choose other values for ComboBox without problem. I call GUI like this: private void contextMenuDokumentyDodaj_Click(object sender, EventArgs e) { var lv = (ListView) contextMenuDokumenty.SourceControl; string varPortfelID = Locale.ustalDaneListViewKolumny(listViewNumeryUmow, 0); string varKlienciID = Locale.ustalDaneListViewKolumny(listViewKlienci, 0); if (lv == listViewDokumentyPerKlient) { if (varKlienciID != "") { var dokumenty = new DocumentsGui(varKlienciID); dokumenty.Show(); dokumenty.FormClosed += varDocumentsGuiKlienci_FormClosed; } } else if (lv == listViewDokumentyPerPortfel) { if (varPortfelID != "" && varKlienciID != "") { var dokumenty = new DocumentsGui(varKlienciID, varPortfelID); dokumenty.Show(); dokumenty.FormClosed += varDocumentsGuiPortfele_FormClosed; } } } While I can't close GUI i can work on the main gui without problem too. I can open up same GUI and after opening new GUI i can quickly close it. GUI is very simple with few ComboBoxes,TextBoxes and one EditButton from Devexpress. Edit: varDocumentsGuiPortfele_FormClosed code allows me to refresh GUI (reload ListView's depending on where the user is on now). private void varDocumentsGuiPortfele_FormClosed(object sender, FormClosedEventArgs e) { TabControl varTabControl = tabControlKlientPortfele; if (varTabControl.TabPages.IndexOf(tabPageDokumentyPerKlient) == varTabControl.SelectedIndex) { loadTabControlKlientPortfeleBezZmianyUmowy(); } }

    Read the article

  • C# - Winforms webBrowser

    - by user335932
    How can i pass the URL property in web browser into an if statement.... private void button2_Click(object sender, EventArgs e) { var GameStats = comboBox1.Text; if (GameStats == "BattleField: Bad Company 2") { //Make URL equal to http://statsverse.com/ } }

    Read the article

  • WinForms: Control ListView checkbox painting

    - by Telanor
    It seems that the checkbox used in a ListView when CheckBoxes = true isn't a proper checkbox. It doesn't draw the MouseOver or MouseDown state and it doesn't support the Indeterminate/Intermediate state. How can I replace the checkbox with a standard checkbox control or take control of the drawing of just the checkbox so I can use the CheckBoxRenderer class?

    Read the article

  • WinForms: finding the size of a minimized form without going to FormWindowState.Normal

    - by Doc Brown
    Is there an easy way to determine the size of a Form it does have in WindowState=Normal, without actually changing the Form state? Here is what I do now (C# code): public class MyForm: Form { public void MyMethod() { // ... FormWindowState oldState = this.WindowState; this.WindowState = FormWindowState.Normal; Point windowLocation = this.Location; Size windowSize = this.Size; this.WindowState = oldState; // ... } } This is what I would like the code to look like: public class MyForm: Form { public void MyMethod() { // no state change here Point windowLocation = this.NormalStateLocation; Size windowSize = this.NormalStateSize; } } In fact there are no NormalStateLocation or NormalStateSize properties in Windows Forms.

    Read the article

  • .NET Thread Pool - Unresponsive WinForms UI

    - by Goober
    Scenario I have a Windows Forms Application. Inside the main form there is a loop that iterates around 3000 times, Creating a new instance of a class on a new thread to perform some calculations. Bearing in mind that this setup uses a Thread Pool, the UI does stay responsive when there are only around 100 iterations of this loop (100 Assets to process). But as soon as this number begins to increase heavily, the UI locks up into eggtimer mode and the thus the log that is writing out to the listbox on the form becomes unreadable. Question Am I right in thinking that the best way around this is to use a Background Worker? And is the UI locking up because even though I'm using lots of different threads (for speed), the UI itself is not on its own separate thread? Suggested Implementations greatly appreciated.

    Read the article

  • Draw a rectangle using Winforms

    - by C. Karunarathne
    Can I draw a rectangle with mouseClick?My code is not working so far.Can you help me? private void panel1_MouseClick(object sender, MouseEventArgs e) { Graphics g = this.CreateGraphics(); Pen pen = new Pen(Color.Black, 2); g.DrawRectangle(pen, 100,100, 100, 200); }

    Read the article

  • Horizontal scroll winforms listview

    - by tempy
    Anyone know if its possible to enable horizontal scrolling ONLY in a windows forms listview (viewmode set to large icons). What I want to do is make a listview whose height is sufficient to only show one row of icons, and I don't want to have multiple rows. Just one very long row that a user would have to scroll horizontally to get to out-of-range icons. If I make the listview scrollable then it automatically makes multiple rows and puts in a vertical scrollbar, which I don't want. Thanks in advance!

    Read the article

  • Winforms Hotkey, Help?

    - by Di4g0n4leye
    namespace WebBrowser { public partial class MainForm : Form { public MainForm() { InitializeComponent(); } int GetPixel(int x, int y) { Bitmap bmp = new Bitmap(1, 1, PixelFormat.Format32bppPArgb); Graphics grp = Graphics.FromImage(bmp); grp.CopyFromScreen(new Point(x,y), Point.Empty, new Size(1,1)); grp.Save(); return bmp.GetPixel(0, 0).ToArgb(); } void Button1Click(object sender, EventArgs e) { int x = Cursor.Position.X; int y = Cursor.Position.Y; int pixel = GetPixel(x,y); textBox1.Text = pixel.ToString(); } void MainFormLoad(object sender, EventArgs e) { webBrowser1.Navigate("http://google.com"); } } } } i want to add a hotkey that call Button1 on Press, How can that be done?

    Read the article

  • How to detect when window is closed when using Show() in WinForms C#

    - by MadBoy
    I've been using ShowDialog() in following way for all my new Windows. SomeGui test = new SomeGui(); test.ShowDialog(); refreshSomeListView(); However recently I've started to use Show() instead of ShowDialog() and it's working much better. The only drawback of this is that refreshSomeListView(); cannot be used like in example above since if i leave it there it's executed instantly when new Window shows up. What's the best way to know that the user has closed test window and that now refreshSomeListView(); should be executed? What's suggested approach for this? Should it involve setting events in test GUI on Close/Closing or there's other / better method?

    Read the article

  • Provide "Paste Link" Functionality in C# Winforms App

    - by Tim
    I would like to add Copy-Paste Link functionality to an application. The application replaces a complex Excel workbook. I would like to be able to copy tables, text, and charts from the application and use Paste Link in MS Word. For the uninitiated: With Excel, when you use Paste Link for the tables, text, charts, etc. the items update in Word when you change them in Excel. Does anyone know for sure if this is/is not possible (is it some proprietary feature of MS Word-Excel)? If not, can anyone point me to some resources that will help (either an app that does this or a tutorial/write-up). Thanks!

    Read the article

  • Test Application Guide for Winforms

    - by Jonathan
    I'm a c# developer in a medium/small company. I use to do quick test of the apps that my workmates made and they use to test my applications. We test each form based in our experience. (yes, I know this is not a very formal method) Now a new guy without experience are going to join our team. We think now is the momento to make a little list of things that all we should test in each form. Divided by categories. For example usability: Test that the taborder of each control are properly setted, or Valitacion: Test that the max lenght of each textbox match with the max lenght of a field in the DB...etc We don't one to Reinvent the Wheels, so I want to know if such kind of document already exists. Thanks

    Read the article

  • Question about WinForms TrackBar control in .Net

    - by Jules
    Does anyone know the millisecond interval, used by the framework trackbar, between calling the ValueChanged event when moving the grip with a mouse? I've implemented my own trackbar and I'd like the behaviour to be consistent with what the user expects. I've had a look in reflector but it's one of those controls where most of the implementation is not viewable. ETA: Actually, thinking about it, it's not as simple as that. For small changes, the TrackBar is raising the event for every change. However, if you make a large fast change with the grip, it will not raise the event for every step. Just wondering exactly how the framework does this? Thanks

    Read the article

  • C# Winforms: How to display a loading form?

    - by Martijn
    I have a grid and when a row is double clicked a form is loaded. However a lot of data must be loaded, so I'd like to display a simple form with the text 'loading, please wait..'. And when all loading is finished, the form must disappear. This is what I have right now, but it doesn't work: Code that invokes the form with lots of data: FormWithLotData form = new FormWithLotData(); form.ShowDialog(this); Constructor of FormWithLotData: // Show load form FormIsLoading frm = new FormIsLoading(); _CloseLoadForm closeForm = new _CloseLoadForm(frm.Close); System.Threading.Thread thread = new System.Threading.Thread(frm.Show); thread.Start(); InitializeComponent(); this.Visible = false; LoadAllData(); this.Visible = true; // Close load form Invoke(closeForm); Hope you can help me out.

    Read the article

  • Generating a second context menu dynamically in Winforms

    - by rsteckly
    Hi, I have a context menu with a few selections. If the user picks a particular choice, I want a list of choices in a second menu to come up. These choices would be coming from a data store and be unique to that user. I see how in designer you can add a set of choices statically that show upon the user making a selection. However, what do you do when you need that to come from data and not design it in the designer?

    Read the article

  • C# WinForms StatusStrip - How do I reclaim the space from the "Grip"

    - by Clyde
    I've got a StatusStrip with a single ToolStripStatusLabel, Spring=true and a background color for notifications. The problem is that there's an ugly gray square on the right side of the status strip. After fiddling for a while, I realized this is the sizing grip (I had is set to SizingGrip=false, GripStyle=Hidden). Yet even with it hidden, it still hogs the space. I can't get any content on the status strip to extend all the way to the right. How would you work around this? Note I can't just set the backcolor of the StatusStrip because the Status Label changes colors and has some fading effects.

    Read the article

  • Winforms application hangs when switching to another app

    - by joseluisrod
    Hi, I believe I have a potential threading issue. I have a user control that contains the following code: private void btnVerify_Click(object sender, EventArgs e) { if (!backgroundWorkerVerify.IsBusy) { backgroundWorkerVerify.RunWorkerAsync(); } } private void backgroundWorkerVerify_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { VerifyAppointments(); } private void backgroundWorkerVerify_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) { MessageBox.Show("Information was Verified.", "Verify", MessageBoxButtons.OK, MessageBoxIcon.Information); CloseEvent(); } vanilla code. but the issue I have is that when the application is running and the users tabs to another application when they return to mine the application is hung, they get a blank screen and they have to kill it. This started when I put the threading code. Could I have some rogue threads out there? what is the best way to zero in a threading problem? The issue can't be recreated on my machine...I know I must be missing something on how to dispose of a backgroundworker properly. Any thoughts are appreciated, Thanks, Jose

    Read the article

  • WPF UC in Winforms occasionally has an odd border to the left / visually corrupted

    - by Ryan ONeill
    I have a WPF user control I created that is used to show the state of tasks in my UI. I get the odd report back that the control sometimes has a nasty looking border to the left and I cannot reproduce it. The control looks like this (when working) (grey tick=not run, green=OK,red cross=fail,hourglass=running); It looks like this when the problem occurs; It may have something to do with the layering of those icons, when the state changes the others are made invisible and the relevant icon is made visible. The four icons are all stacked on top of each other. It could also be the background in theory, which I'll look at next. Problem is reported on both flat panel and CRT displays. Any guidance greatly appreciated. Update: 1) SnapsToDevicePixels does not affect the issue. 2) Grid is not used, only a canvas.

    Read the article

  • WinForms equivalent of performSelectorOnMainThread in Objective-C

    - by jamone
    I haven't done much multithreading before and now find the need to do some background work and keep the UI responsive. I have the following code. data.ImportProgressChanged += new DataAccess.ImportDelegate(data_ImportProgressChanged); Thread importThread = new Thread( new ThreadStart(data.ImportPeopleFromFAD)); importThread.IsBackground = true; importThread.Start(); void data_ImportProgressChanged(int progress) { toolStripProgressBar.Value = progress; } //In my data object I have public void ImportPeopleFromFAD() { ImportProgressChanged(someInt); } But the UI doesn't get updated since the ImportProgressChanged() call is made on the background thread. In objective C I know you can use performSelectorOnMainThread and pass it a method to call using the main thread. What is the equivalent way of calling ImportProgressChanged() from the main thread?

    Read the article

  • c# winForms toolTip forever

    - by jello
    Do you guys know how to set a toolTip that doesn't go away as long as you're hovering on the control? I tried setting the "AutoPopDelay" to 999999, but the tooltip disappears after 15 seconds. Or, do you know of another way to achieve the same effect?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >