Answer Questions
ashokkumar How to print my DataGridView
Hey all :) How do I print my DataGridView Thanks a lot for your help :) ! You could use a delegate as the one below for your PrintDocument.PrintPage... void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Bitmap bitmap = new Bitmap(dataGridView1.Width, dataGridView1 .Height); this.DrawToBitmap(bitmap, new Rectangle(0, 0, dataGridView1 .Width, dataGridView1 .Height)); g.DrawImageUnscaled(bitmap, 0, 0); } In case you don't want scrollbars, but the 'extended' display you could first resize the DataGridView to it's preferred size... Hi Tim, I have spent a little more time tyring to implement ...Show All
Rob_MUFC_1982 DropDowns and MesssageBoxes not displaying correctly
I have a windows form that contains dropdowns and has code to pop up message boxes. When I go to select the combobox using the dropdown, Sometimes no dropdown list appears, and other times it just has a blank line for each item. I can click on a blank line and the item then appears in the drop down. When a messagebox pops up, it only displays a small message box, with the title properly there, but no message text, and the buttons all missing text on them (what should be the 'ok' button has no 'ok' on it. We created a project on another computer, and it worked perfectly, but then moved it to the problem computer and the previously working program had the same dropdown/messagebox issues. Any ideas on what the cause of this could ...Show All
John.Doe Installation Question
I have created an application in VB 2005 and need to install on several computers. I am a contractor for the state government so I do not have any admin rights on these PC's. So, my question is: What part of my application requires admin rights and what doesn't I had the site admin install it on one machine and it loaded with no errors but when the user logged on it was not available for him. I could really use some help !!!!!!!! I totally understand why I only got one answer on this question. If I had finished reading my VB 2005 book on "Deploying Applications" I wouldn't have had to ask the stupid question but I've always been told that there is no stupid question but evidently there is with ...Show All
Mahesh kumara Form2.0 PixelFormat
Hi there folks, I am porting my OpenGL control ( written in Managed C++) to C++/CLI, and for my surprise the PIXELFORMATDESCRIPTOR struct (which is valid in net1.1) that I pass to wglCreateContext() simply returns a ERROR_INVALID_PIXEL_FORMAT. Anyone had problems with that Are there new rules for pixel formats in net2.0 Thanks in advance wglCreateContext doesn't take one pfd as a parameter, but a PIXELFORMATDESCRIPTOR strutucture is used to configure the pixel format for the device context that is passed as parameter to wglCreateContext() pfd.bReserved = 0; pfd.cAccumAlphaBits =0; pfd.cAccumBits=0; pfd.cAccumBlueBits=0; pfd.cAccumGreenBits=0; pfd.cAccumRedBits=0; pfd.cAlphaBits=8; ...Show All
AndrewBadera Need samples of datagridview visual basic 2005
I need samples of Datagridview with updating cell and with combobox in cell and giving the datasource to the datagrid in code without use dataset Thanks and for c# thanks, matti yes i know i can dowload samples from http://www.windowsforms.net/Samples/download.aspx PageId=1&ItemId=220&tabindex=4 but in this sample use dataset for datasource i search samples with code for the datasource There are a bunch of datagridview examples on the vb-tips website . here are some c# and VB samples: http://www.windowsforms.net/Samples/download.aspx PageId=1&ItemId=220&tabindex=4 ...Show All
BillyB NotifyIcon and Windows Vista
Hi all! I'm encountering a problem with the NotifyIcon control of .NET 2.0 and Windows Vista. I have noticed that the ShowBalloonTip method doesn't show any balloon on Windows Vista (while the same code I have tested works correctly on Windows XP). Does anyone know how to solve this inconvenient Thanks in advance. Marco Minerva, marco.minerva@gmail.com It is incredible... I have tried also with Platform Invoke, but nothing, and finally the problem is disappeared after a system reboot... ...Show All
Sathyashankar DataTable
How I can get the value that is in a listbox and put in a datatable Thank you! Hi Leandro, You should use SelectedValue property for ListBox. Good coding! Javier Luna http://guydotnetxmlwebservices.blogspot.com/ ...Show All
LuckyL right click on TreeNode / C#
Hi! I have a TreeView in one of my frames. What I want to do is the following: when I select a node and make a right click, a pop-up menu should appear so that I am able to delete that node. How can I do that and what would be the steps Thanks! Create a ContextMenuStrip with the Delete command on it, and write the handler to delete the selected node, something like void deleteMenuItem_Click(object sender, EventArgs e) { if(treeView1.SelectedNode != null) { // Root node's Parent property is null, so do check if(treeView1.SelectedNode.Parent != null) { treeView1.SelectedNode.Parent.Nodes.Remove(treeView1.SelectedNode); } else { treeView1.Nodes.Remove(treeView1.SelectedNode): } } } ...Show All
Bob Emerson Clickonce updates
Hello, I wonder if anyone would be kind enough to help me I have published my application with Clickonce and specified an update location. How do I save or publish the update files necessary for updating the application after I have mad changes to it Is the .NET 2 SDK required for this Many thanks CPS Hello again, I have ben to nearly all of the Clickonce pages trying to see if there is any clue as to any setings I should make before trying to publish updates but I cannot find any. I wonder if there is somthing wrong with the installation of VB.NET express on my computer. Should I reinstall the application All the best CPS Publish it again wit ...Show All
Simon Dahlbacka Spalsh Screen
Hey, In in properties of a project how do you select what form you want to be a splash screen I used the help in the compiler but I could not get an answer that worked... Thanks :) you cant scroll down...(Visual C# 2005 express), the only options I see in that tab are: Assembly name, Default namespace, Output type, a button that says Assembly Information, Startup object, and then the resources groupbox, and that only has the set icon and Resource file setting. thats all thtas in there... Startup Object is a combo box with only 2 options: (not set) Surfscape.program Thanks :) Hang in there Dave! Give um a day to figure it out... Well for starters your code is really wrong ...Show All
kuponutcom DataGridView & FixColumn
Hello, I want to Fix my first column of my datagridview. And when I click on horizontal scroll bar (of my datagrid), I want to make scroll only on last 10 columns. Example : I have : Col1 - Col2 - Col 3 - Col 4 .... When I scroll on horizontal scroll bar (of my datagrid) I want : Col 1 - Col 3 - Col 4 - Col 5 ... How to Fix my first column (As Split and freeze panes in Excel style sheet) Thanks for your help Damien, It is exatement what I wanted. Thank you for your fast assistance. dataGridView1.Columns[0].Frozen=true; ...Show All
Deanrm Controls Collection
In VB6 when a control was part of the Controls collection of the form, even if the control was on another container (eg. a Tab control, picturebox etc.). In WindowsForms a control is part of the Controls collection of its direct container.So in order to iterate through all controls on a form you have to make a recursive method. However, a UserControl also has a Controls collection and exposes all controls contained in it. Is it possible to discern the controls that was added directly on a form, even on a seperate container, from the controls that are part of custom UserControls Right, just like a regular control. And the AllControls function will return them. What is the problem Look back at my example code and note h ...Show All
Tomas L How to implement Complex DataBinding on Custom Controls?
Im building a custom control called DataEntry Control and want to be able to setup a DataSource on property window, same way as DataGridView... Here are some parts of my code: <DefaultBindingProperty(""), ComplexBindingProperties("DataSource", "DataMember")> _ Public Class DataEntryControl Private _DataSource As Object <Category("Data")> _ Public Property DataSource() As Object Get Return _DataSource End Get Set(ByVal value As Object) ...Show All
Mateusz Rajca How to calculate the coordinates of text-entry fields in pre-printed forms?
I would like to write an application in C# to collect data from users and then print them on pre-printed forms (examples of pre-printed forms: visa application forms, employment application forms, social insurance application forms, etc...). The forms have hundreds of text-entry fields. What is the best way to print the data on the forms I guess I have to calculate the coordinates of each text-entry field to do printing. If so, what approach would you recommend By the way, is C# a good programing language to write this type of application Is there any other programing language that you you would recommend I am pretty new to C#, so I don't mind switching to another language if it's better suited to my need to write the application. T ...Show All
Bill Gates II Getting error "You do not have privileges to run this application"
I have a Windows Forms application I wrote last year in VS .NET 2003, which I've upgraded to VS .NET 2005 today. It includes Crystal Reports 11 Release 2, and I've made a setup for it. I've just tested it by installing it on a new PC, and I'm getting an error that says simply, "You do not have privileges to run this application". I've searched for this error using both Live.com and Google, and really haven't found anything useful (both search engines yield just one website that lists this error message - interestingly enough it is not the same website). I am hard pressed to figure out why the network administrator account, which is what I used to install the app and test running it with, does not have privileges in order to run i ...Show All
