Answer Questions
susan8 Stopping DataGridView control to be redrawn when adding rows programmatically
Hello All, Language C#: I'm using DataGridView control for viewing data. When ever I add rows programmatically it slows down the process little bit, which might be because it's showing rows during the add process, which also not presentable to user. How could I make DataGridView redraw disable (property which is not there any more any suggestion for alternate property if exist or any work around). Thanx Example: foreach (SaleItem saleItem in availableSaleItems.Values) { this.saleItemDataGridView.Rows.Add(new object[] {saleItem.Name, saleItem.Description, saleItem.Cost, saleItem.Price, ...Show All
Michael Sabbag ClickOnce: How to add a prerequisite from the command line?
Hi, I have Crystal as a prerequisite, so if I publish using VS, several additional entries appears in the .manifest file: <dependency> <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true"> <assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" version="10.2.3600.0" publicKeyToken="692FBEA5521E1304" language="neutral" processorArchitecture="msil" /> </dependentAssembly> </dependency> If I create a manifest manually, using Mage, what should I do to add the prerequisite to the manifest file Thanks, Leonid. Thank you for the confirmation. I ended up b ...Show All
JV Chevy StartupNextInstance and ClickOnce
I'm trying to use the StartupNextInstance event to get the values passed to the My.Application.Deployment.ActivationUri.AbsoluteUri of a clickonce application when it is started again. If this were a standard application I could obtain the startup parameters from e.Commandline , but this is empty when the application is launched via clickonce . Is it possible to get the startup URI of the second instance from the StartupNextInstance event I couldn't find any reference to the bug so filed one. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=271991 Okay, so it should actually be returning the second instances URI and it's a bug that it returns the first. That's a relief. Well, for now I got a ...Show All
Trish key-value for ContextMenu
Hi, I have problems with combobox because they take the focus and that send the event 'Leave' in my opened forms (within my MDI) and if I put a combobox into a toolbar, the behavior is wierd when I try to send BringToFront() a form (It still takes the focus). So, I figured that a ContextMenu would solve my problem because it doesn't take the focus but I never managed to make a bindingsource to work with it. I created a typed dataset that I bound to a BindingSource (DataSource = to the typed dataset and DataMember = the table in the DataSet). Then I go to DataBindings, I set the text property to be linked with the Value Column from the Binding source. When I assign a constructed DataSet to ...Show All
sofakng multithreading exception
I am getting a cross-threading exception in my program when an event fires from a non-form sub-class to the main GUI. In the main GUI event-handler I update some GUI controls (pictureboxes ect) and it is then when I get the exception. I tried using the lock(sub-class) command but I am getting the same exception. Any suggestions would be appriciated. Can you post the exact exception message that did the trick, thanks mark. Hi, sounds like the problem you are having is that you are attempting to modify a control from a thread that did not create the control. What you need to do is use the Invoke method to put control back to the thread that created your control, ...Show All
Amit Bansal Prerequesties dialog
Hi, I need for my installation to create the Prerequesties dialog. I am working with visual studio 2003 and my application wrote in C# and VB.Net. In the dialog it must check: 1. if .NET framework 1.1 is installed (if not setup installs it) 2. if the MDAC is installed and what the version (if old version or not exist must be installed on the system) 3. if the MSDE/SQL is installed (if not setup installs it) 4. if the some scripts isn't runned yet (if not setup installs it) Some steps may be in disable if it is allright for this step. It must be something like the dialog when I have installed VS2003. Is somebody have any sugesstion Thank's Alexei See if this helps - it's an add-on bootstrapper for prerequisites: http://w ...Show All
aaks Client / Server application suggestion
I am trying to build a client / server application , I will use NHibernate to do the database connection. Should I just build client connect to database directly or I should build a server to collect all info , then server use Nhibernate deal with database In my client / server programs I write, I make the server handle everything. Its the most efficient way. ...Show All
wish1267 Import/Export the local user database
Hi all, I have created some local users in my windows 2000 with SP3, Now I am planning to create the same users in another machine with win 2003. Is there any way to import the user database with passwords. Because I had more than 250 users in my local user database. Please help me .. Jaggu Hi, Sorry to tell you but this forum is dedicated to the programming problem of windows form instead of the general troubleshooting. ...Show All
Shrek.NET How to display staus for a very long process..
Hi, am an asp.net programmer very new to Windows forms development.. I am developing an application that process large number of records from database. I have to excecute lot of very lengthy SQL queries. Some of the queries will take more than an hour to complete. When the application start excecute something very lenghty it is not responding to anything else, even if i minimize it I cant maximize before completing the process. I need to give some feedback to the user that the application is not dead. How can i do it Please help Anzer You should run your lengthy process in a seperate thread. The mainthread is then able to update the UI, while the performs, for example, the query on the database. An easy way to do this is by ...Show All
Walter30140 GDI+
when ever i use something like: System::Drawing::Pen ^pen= gcnew System::Drawing::Pen(System::Drawing::Color::Black, 100); grfx = System::Drawing::Graphics::FromHwnd( this ->Handle); grfx->DrawLine(pen, 1, 1, 1 ,20); Threading::Thread::Sleep(1000); grfx->Clear(System::Drawing::Color::White); it draws ok. but when ever i move the app offscreen the line that i just drawn, dissapears. how do i fix this thanks in advanced, Dan. The GDI+ framework doesn't automatically repaint the clipping region when a WM_PAINT message comes into the message loop -- you need to handle this yourself. If it's just a couple of lines, you can simply repaint everytime you get a paint request; if it's a more complex str ...Show All
Chanis binding 2 xml files to one DataGridView?
Greetings, [C#] I have a DataGridView that I need to load key values from two XML (resx) files both with the same layout & keys... the DataGridView has 4 columns (Name, Value, Comment & DataX). The Name, Value & Comments are taken from one xml file & the DataX is taken from the 'Value' key in the other xml file. I can't seem to get them to load, I get "Column 'Name' is constrained to be unique. Value 'FirstName' is already present." Do I need to do an inner foreach loop private void BindResXtoDataGridView() { XmlDocument doc = GetXmlDocument(); // loads xmldata.xml XmlDocument docX = GetXmlDocu ...Show All
PedroCGD detecting USB drive from windows apps
Hi, How to detect & show the contents of USB(thumb) drive in VS2003 (VB.NET) It should be like a standard one. ie, when u plug-in the thumb drive automatically it gets detected and shows the standard window. I know that i can get the drives by "System.IO.Directory.GetLogicalDrives()". Similarly drive type by "GetDriveType" But my doubt is , how the apps detects the device. I dont think timer is a good soln. whatelse anything like a trigger.. Kindly guide me. Thank you! Windows sends WM_DEVICECHANGE messages to all top level windows notifying that the hardware config changed. The following sample show how to handle these messages within a .NET application: http:/ ...Show All
TheViewMaster WebBrowser && HeavyOutput
Hi, i'm currently using WebBrowser control for heavily text output, but problem is, when there many lines, like about 10k or more, it's getting to eat more and more of your ram, so question is, how to do, then there could be maximum lines (999) in webbrowser, so if i try to output one more line, it deletes first line, then adds new line, and so on Vitalijus, have you found a way to achieve what you want I am not sure the WebBrowser control is most suitable for that. Have you had a look at the RichTextBox It has more support for working with lines as it has Lines collection for instance. Yes, i will just delete everytime there is more than 200 lines, the second line if (this.Document.Body. ...Show All
Nyasha Splash Screen with PNG
Hi all, i need to do a splash form using a PNG image, how can i do this !! what i want todo is a splash screen similar to the photoshop ! anyone have a sample ! thks JSB yes !!! i think it’s a refresh problem ! anyone know how to solve it ! thks thks, it realy work fine !! but is not doing what i need !!!, my problem is with the transparancies and shadows that is in png file. there ara others in the the code project quite good, but they all have the same problem !!! when i open the splash it looks fine, but it captures the screen behind and when i minimize the back programs, the image contains the information that it was when ...Show All
Cryo75 removing ApplicationExit event handlers
In the help : Application.ApplicationExit Event Because this is a static event, you must detach any event handlers attached to this event in the ApplicationExit event handler itself. If you do not detach these handlers, they will remain attached to the event and continue to consume memory. so i have Application.ApplicationExit += new EventHandler( Application_ApplicationExit ); and in Application_ApplicationExit Application.ApplicationExit -= Application_ApplicationExit ; is that right I'm using it to release some unmannaged resources. And I was wondering about -= because i don't have the variable so using -= new EventHandler(Application_ApplicationExit") is kind of weird. And in the doc it is ...Show All
