Answer Questions
Andre.Ziegler Form doesn't have focus when its DialogForm closes.
Hi all, I have a Form (Form1) that opens another Form (Dialog) when a button is pressed, but when this Dialog Form is closed, the Form (Form1) that opened this doesn't have focus and I have to tap the screen (Using PocketPC) twice inorder for any Control on the Form to get the focus and react to my actions. I have the following code in a method... if (frm != null) { if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) return true; else return false; } ... that opens the forms, but this code is contained in a class and is called from the event on Form1. Is this the cause (the form open call being in another class ) As I don't get this problem anywhere else in my application. Even if I put in a statement that sets a control on ...Show All
giuln Runtime Loading/rendering of control takes time ?
Hi friends ! I do have some strange problem. I am loading some my own control at run time and i do add then in Panel (FlowLayoutPanel). But when i do run my project i am able to notice rendering of those controls. I am not able to understand whether it takes time to load control (using new MyClass ) or to render them (when I am dointg " panel.Controls.Add(MyControlArray(IndexOfArray)) ") MyControls Contains Label,SplitContainer and Object of may be textBox, ComboBox etc. Some code is listed here ! Sub setProjectScreenControls() Dim index As Integer = 0 On Error Resume Next index = 0 'editScreen is my Flow layout panel If editScreen Is Nothing Or editScreen.IsDisposed Then editScreen = New FlowLayoutPanel ...Show All
Poetjevel Loading smartpart in MDI workspace is flickering(user can see the mdi child window's size changing from smaller to bigger)
Hi Our project is an MDI application. Since we are using CAB we are using MDI workspace. We are loading the smartpart(windows user control) in the MDI workspace. The problem we are facing is when the smartpart is loading it is not getting maximised automatically. While loading smartpart in MDI workspace it is loading as a small window and afterward we have to write code to maximize it. By doing this it is having a flickering effect(user can see the smartpart's size changing from smaller to bigger). In Form we have a property called "MaximizeState" which will take care of maximizing while loading. But here we use MDI workspace for loading child (windows user control) window here we don't have this property "MaximizeState" ...Show All
vandewst Multicolumn ListBox...?
Hi... I want to develope one application which will have a multi-column listbox. I want 3 columns in this listbox out of which in one column i want to display the filenames which user will drag on this listbox using DragAndDrop opertion. Other two columns should display its filesize & filetype(.doc, .txt, .cs etc.) Is it posible to have a multicolumn listbox in which 1 column will allow drag and drop & other two wont . Can anybody me help in this... Thanks, VInay There is a sample of Multicolumn ListBox , I hope helps. Hi.. One more thing i require in this is ... can i add column headers to single or multiple columns in a listbox... Thanks in advance, ...Show All
WilliamVista Context Menus for webbrowser sub elements
Hi All I'm working on a custom control for my Web Editor. The control currently just contains a webbrowser control. What I want to do is have different context menus for various web elements. For example, a Form Button would have an individual context menu when right clicked, and some Text would have a separate context menu. I'm assuming somewhere I'm going to have to use System.Windows.Forms.WebBrowser or something similar, but how do I define the individual elements within a webpage Hope this makes sense! Wait...nevermind. Misread something entirely there. Heh, I guess I need more coffee. Thanks for your help though. It's starting to make sense now. You will probably need to first figure out how to use the HTML/JS D ...Show All
Liam404 Debugging Windows installer - requires version changes for each build?
I am trying to debug a C# custom action DLL within a Windows Installer project and I can launch the debugger just fine. But the issue is that I need to run the installation program itself multiple times while debugging my C# code. Problem #1 is that if I want to run the same build of the installer (and take different paths through the C# code), the second execution automatically kicks into repair / uninstall mode. Is there any way around this Problem #2 is similar: if I run the installer once and finish installing, then rebuild the installer project and try to run it again, the installer aborts with the message "another version of this product is already installed." You have to uninstall via Add/Remove Programs ...Show All
stephane - Montpellier multiline problem
i have likes this equation; "label1.text = textbox.text" when my users click my button my form get the index of textbox to label but it arrange auto size for label and enlarge the width of label ;;; but i want this, when text is reached to 10 letter so text must continue to new line; summary i need multiline property in label; is it posssible and if it is yes how can anyone help to me; your sincerely; Well try leaving AutoSize on until the text goes beyond 10 chars in length then switching it off. You could always write your own control. hi radith did you tried the solution i provide to you above if yes what happend you do not tell me that you use web forms my answer about winf ...Show All
kcabral1 Display multiple fields in a DataGridView cell
Hi All! How do I display multiple fields (1 line per field) in a DataGridView cell... i need to display it like below: Cell1 | Cell2 ------------------------------------------- ID | Desc Name | Other Field Address | etc. ------------------------------------------- ID | Desc Name | Other Field Address | etc. -------------------------------------------- Any help will be very much appreciated. CryptoKnight wrote: Thanks! follow up question... i need to format each lin ...Show All
Pockey Suddenly I'm getting this error: The form referred to itself during construction from a default instance
Hi, I'm getting the error below when I try to run my project. It's never happened before, and I don't understand what's caused it. Can anyone help please Thanks, Louise System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: The form referred to itself during construction from a default instance, which led to infinite recursion. Within the Form's constructor refer to the form using 'Me.'" Source="FrontierIS" StackTrace: at FrontierIS.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 at FrontierIS.My.MyProject.MyForms.get_frmData() at FrontierIS. ...Show All
omniGames Deleting Last Row of DGV causes nullreferenceexception
I had a problem that I am curious if anyone has heard of. I've searched the knowledgebases and forums but can find no information on it. I'll post it here so that if anyone else encounters it they will have a resource to turn to. I have a databound dataGridView control bound to a database. I can perform all the normal functions on the data and reflect those changes back into underlying database just fine, EXCEPT if I attempt to delete the last row displayed above the blank "add-a-new-row-here" row. If I attempt to do so, I get the UserDeletingRow event just fine, then a nullreferenceexception before the UserDeletedRow event is fired. It appears from the call stack that the exception is occurring in the meth ...Show All
Doug DeBug datagrid not showing source
Pretty new at visual basic and actually advance programming in general. I am trying to make a button open up a connection to a MS Access database and fill a datagrid with information from a table called "stock". I have this code linked to a button click: DBSave is a text box and ListView1 is a datagrid. Dim DBPath As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBSave.Text Dim DBConnect As New OleDb.OleDbConnection() DBConnect.ConnectionString = DBPath DBConnect.Open() Dim DBAdap As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter( "SELECT * from Stock" , DBConnect) Dim DBset As DataSet = New DataSet( "Stock" ) DBAdap.Fill(DBset) ...Show All
warkaid How to edit data with DataGridView.
Hello, I have a DataGridView from which i enter data to an Access database file. The DBV has 5 columns (2 comboxes, 2 datetimepicker, 1 textbox). I have a save button on my form which with the on_click event saves the data that exists in the DGV. Note that the 2 combobox columns get data from a table in the database file. What i want to do is to edit these data after they have been added in the database with a DGV that has the same 5 columns. Is this possible, and how can i do it Thank you in advaced. Anyone with a suggestion for the above Thank you. For comboboxes: goto edit columns in the DGV and change the Columntype to combobox. The da ...Show All
NextXtreme Hot key for a button in the form...
Hi, I am working in vs2005. I would like to know how to set a hotkey for any control/button in the form which is active, with out using the winapi functions. Why i am mentioning the winapi here, because my application needs to be run in the 64 bit windows vista os. Thanks. set the form's KeyPreview to True; subscribe to the KeyDown event and the following code: private void form_key_down( object sender, KeyEventArgs e) { if (e.Alt == true && e.KeyCode == Keys.H) { this .label1.Text = "Alt-H pressed"; } } You can change any key combinations. Hope this helps. ...Show All
MisterMoon When is a form and its child controls completely redrawn?
Hi all, Is there a way to find out when a form and all controls it is containing has been completely redrawn I have a form containing controls which take a while to paint, and I want to know when they are completely done. I currently use a fine tuned timer for this task, but it feels highly unoptimal. Thanks and best regards Par Override the OnPaint method: protected override void OnPaint( PaintEventArgs e) { base .OnPaint(e); // Do your work here } Yes, but I have found out that the OnPaint occurs several times before the form and its containing controls is completely redrawn. The OnPaint method is called several times with different arguments (the update rect ...Show All
Santosh Ransubhe ERP Application - Which approach is better
Hello Everybody, I am in the process of designing a very big ERP application - I am thinking of making it a 4-tier approach. The main issue that I am facing is while designing the UI component. My initial thought was to design the forms dynamically using the the XML - in which case for each menu item there would an XML file that would enlist the controls , the positions their databindings - but this may get very cumbersome to maintain. My second thought is to use inherited forms - in which I would have 2 parent forms - a GridForm and a DetailsForm and since most of the ERP screens would fit this design = they would be inherited forms - so that would mean I may end up created an inherited form for every menu item - which could b ...Show All
