Answer Questions
billb59 Changing the databasource of a DataGridViewComboBoxCell at runtime
Hi, I have a DGV where one of the columns is a combo box style. I bind this combo box to some datasource. What I would ideally like to do it to limit the combo selection to make the items available mutually exclusive to what is in other rows. The net result I guess is I get uniqeness in this column over all rows. Is this possible If so, which event should I use to re-assign the datasource property for the combo Thanks for your help Graham I've got done it!! I've finally managed to solve the problem. I found this ( http://groups.google.be/group/microsoft.public.dotnet.framework.adonet/browse_thread/thread/65ebfe5ace89c70c/78c1caae3fc252fe lnk=st&q=%2Bparent-child+%2Bmermuys&rnum= ...Show All
Yelnik Duplicating MS Access Continuous Subform Functionality in .Net
Hello All, I'm currently writing an Inventory Control and Invoicing program for a friend. I statrted writing the app in MS Access and found that I couldn't get the level of control I needed. Rather than write it on old VB, I thought I'd try writing it in .Net. My main form in Access consisted of one main form and two subforms. The main form was Customer Information, the first subfor ...Show All
TjMulder Creating a custom class using Form Components
Newbie here needs help. I have a Form with a tabControl. Tabs are added onto the control when a user clicks on a tree node. Users can also close each tab, if not needed. I want to dynamically create the content of each tab during run-time by pre-designing the tab page's content as a custom class. So for instance, in a custom class, I could have a 'Panel' as a parent object, within which all my controls will be placed. The plan then is to add an instance of this custom class when the form is initialized, and add this to the tab when user clicks the relevant tree node. Before I proceed, is this the most effective way to go about this If not, can someone please recommend suggested reading If this is the right way, how does o ...Show All
Derek Comingore Long Serial Numbers.
Dear All, I have problem here with my long serial numbers. My length of serial numbers are in the range of 20 to 30 digits. So what I did i know that the database cant support that long of int so I kept in database as varchar. The problem now is that when I do a select from the database I need to group this serial number base on their number in terms of difference of 1. Ex. I have a list of serial say as below 12345678909999999991 12345678909999999992 12345678909999999993 444444489099999999913 444444489099999999914 So when I run the for loop I will store the first value that is 12345678909999999991 then compare with the next one that is 12345678909999999992 so the difference is 1 then compare the second value of ...Show All
mr4100 strange program error...
Hey, in this code: public int Print( int charFrom, int charTo, System.Drawing.Printing. PrintPageEventArgs e) { do { CHARRANGE cRange; cRange.cpMin = StartPosInRichTextBox1; cRange.cpMax = StopPosInRichTextBox1; RECT rectToPrint; rectToPrint.Top = Convert .ToInt32(e.MarginBounds.Top * AnInch); rectToPrint.Bottom = Convert .ToInt32(e.MarginBounds.Bottom * AnInch); rectToPrint.Left = Convert .ToInt32(e.MarginBounds.Left * AnInch); rectToPrint.Right = Convert .ToInt32(e.MarginBounds.Right * AnInch); IntPtr hdc = e.Graphics.GetHdc(); FORMATRANGE fmtRange; fmtRange.chrg = cRange; fmtRange.hdc = hdc; fmtRange.hdcTarget = hdc; fmtRange.rc = rectToPrint; fmtRange.rcPage = ...Show All
Marcus Rodrigues double buffering on pictureBox
Hello! I'm trying to use double buffering to display some graphics faster on a pictureBox. I tried to use the setStyle property of the PictureBox the following way pictureBoxMap->SetStyle(ControlStyles::UserPaint, true); pictureBoxMap->SetStyle(ControlStyles::AllPaintingInWmPaint, true); pictureBoxMap->SetStyle(ControlStyles::DoubleBuffer, true); pictureBoxMap->UpdateStyles(); But no success... Then i tried using the GDI+ method by drawing the graphics in a bitmap image first and then displaying the image on screen as follows private: System::Void pictureBoxMap_Paint(System::Object *sender,System::Windows::Forms::PaintEventArgs *e) { Graphics *grOnPaint = e->Graphics; Bitmap *bmpBuf = new Bitmap(ClientRectangle.Width,Cli ...Show All
rtaiss deploy only exe file in a windows C# appl.
Is there any way to only deploy exe file that includes all dll custom components used in the project You can refactor your code to create a single assembly rather than seprate dlls and exes. Or you can use ILMerge.exe with SDK to merge multiple assemblies into a single one! See here for help: http://www.codeproject.com/dotnet/mergingassemblies.asp http://blogs.msdn.com/brad_mccabe/archive/2005/08/19/453703.aspx http://www.tanguay.info/web/codeExample.php5 id=671 I hope this will help! Best Regards, ...Show All
MikeBzz windows forms
how come when i use this.hide on a certain event then when i load this.Activate() on the form_load event , it will not load back the form that i hide.... what want to do is when user go to the other form hide the current form and when user close the form show back the form that has been hide.. how can i solve this this means the current class or form, so to show another form, you must use its name instead of this , there are many methods available, such as Focus() , Show() , etc... BTW, Windows Forms forum is more approach for your question. When Form A creates the Employees form, before displaying it, attach a handler to its FormClosed event, and in that handler, call this.Show(). Hi, it ...Show All
JonH66 DataGridView -=- Keeping references on rows
I'm not an expert in C#, and neither with the DataGirdView. But I would like to keep a reference on an DataGridViewRow, as there is no way of referencing it with a label, as it is possible with columns. Since rows may be sorted, it is useless to keep their indexes, as they will eventually change. Sure, there is a Tag properties, that I could use, to recover the row I'm looking for. But if I could simply keep a reference on an added row, it you be quite simpler. As an exemple, I have an object say: class Symbol, and this object maintain some infos that is to be displayed on a row in the DataGridView. When something changes, within this object, I want the row to reflect the changes. So, I thought keeping a reference an that row, would be ...Show All
Guostong add image to listview subitem
Hi, I am trying to add an image to a subitem of my listview , how can I do this if not possible, are there any other alternatives thanks in advance! Could you please post some sample code You've got some links to look at apparently (haven't checked them myself), but here is a very simple example. Before this code will have effect, you'll need to set the OwnerDraw property of the ListView to True: p.MsoNormal, li.MsoNormal, div.MsoNormal {margin-top:0in;margin-right:0in;margin-bottom:10.0pt;margin-left:0in;line-height:115%;font-size:11.0pt;font-family:'Calibri","sans-serif';} .MsoChpDefault {;} .MsoPapDefault {margin-bottom:10.0pt;line-height ...Show All
FassaBortolo How To Add Labels & Textboxes To WinForms As We Did In VB 6.0
Hi PPL, plz let me know how to add Labels & TextBoxes To WinForm In DesigTime As We Did in VB 6.0. for Ex. DataEnvirement1----- Connection1----- |----1. Select Or Enter DataBaseName | |___ C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO.MDB |--- Command1------- | ^ |___ Select Sql Statements | |------ Select * from Authors; |--------- if we Drag & Drop the Commad1 on the form this will Create the Labels & Text boxes with name & caption properties set to the controls. Hope Some One Will Help Me On This. So ThnX In Advance... Regards Sonal :) Hi DMan1, ThX Dear, but i m very new in .net plz give me the steps to create a Projetc Data So ...Show All
Dual Cortex Richtext box Background Image
Hi as a part of my development Project i need to show a watermark image on the richtextbox.(ie) the image should be transparent.in other words the user should be able to view the text with the background image. There is no background image property exposed. richTextBox1.CreateGraphics().DrawImage(objBitmap,-10,0, new Rectangle(0,0,richTextBox1.Width,richTextBox1.Height) ,GraphicsUnit.Pixel ); And Moreover the image should be drawn Diagonally from bottom left to top right. the above code draws the watermark image but the text is getting Hided(its draws a layer over the text) Pls post me the complete code on how to achieve it This is very important part of deliverable. Hi jva ...Show All
Mike Stall - MSFT How to close a messagebox
hi all I am developing windows application, where i have login, other options pages, In the main page i checking for the user idle time(in a timer), if the user idle for certain period i should display logout page and close the modal dialogs which is being displayed by the other pages. For modal forms i am storing the current openned form in mainpage's object during time out i will close the opened forms using this object's Close method, But how can i close the messagebox which is displayed in other pages during logout. Is there any way that the mainpage can close or control the messagebox which has been displayed by other pages note: Here pages are various user controls which willl be loaded on the Mainform's panel ...Show All
prad_kav Load data after show the form
Hello all I am working in a big windows forms project and we are getting troubles with the load times of some objects. In some situations, the view going to background to appear again when the data is already loaded. My question is: Is there any way to give priority to the paint method of the view and then begin the load process Is it a design problem of our system Thanks in advance to all. Cheers You can force an immediate paint by calling the Refresh method. Hi. I have a windows application with a similar problem. The application contains many tabs with many controls that are bind to a DataSource. what I've done to minimaize the long loading is to load controls and data only when ...Show All
Manish.Garg RowLeave event happens before CellValueChanged
Hi, In my implementation of an unbound DataGridView I need to set a changed flag at the row level if data in that row has changed, I do that in the CellValueChanged event. Then, in the RowLeave event, if the flag has been set, I update the unbound data source with the value of the row's cells. It should work if the CellValueChanged would happen before RowLeave, but it's not the case. RowLeave happens before CellValueChanged, why Is there a workaround Thank you, Marco Sorry, but CellValidating also happens after RowLeave. Should it be by design or is it a bug I would use the cellvalidating event instead. If the value in the cell is not the same as the ...Show All
