Answer Questions
ptenter e.Graphics = picCapture.CreateGraphics();
Hi, please take a look below private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { e.Graphics = oldPicture.CreateGraphics(); } However, above scripts throw Exception "Property or indexer 'System.Windows.Forms.PaintEventArgs.Graphics' cannot be assigned to -- it is read only" How can I replace the graphics of pictureBox1 to picture1.CreateGraphics(); I think it can be done by turning into bitmap Graphics offScreenDC = picCapture.CreateGraphics(); Bitmap offScreenBmp = new Bitmap(this.width, this.height, offScreenDC); pictureBox1.Image = offScreenBmp; ...Show All
Siddarth_Chordia_b1f86e Freeze Panes For A Dynamically Created Datagrid
Does anyone know how to freeze the header row and one or more columns for a dynamically created datagrid. This is created in vb.net / asp.net I am also available through windows / msn messenger - paul.donaghy@hotmail.com - if anybody can help me and we can talk about my problem. All help appreciated. Thanks for info and reply. I would really need feature like this with a datagrid. I have managed to create a freeze header but only when the table property 'ShowHeader' is true, but this property has to be set to false so instead I would need to freeze the first row. This type of feature can be achieved but not sure how to do it. Anyone know how Hi, Even ...Show All
WATYF Form validation -validate everything at once
Hi I have form with tabs and texboxs. I'm trying to validate everything at once when the save method is called in the form and got focus to relevant field if validation faild. Does any one know how I can best implement this. Thanks in advance Windows forms validation really does not support that. Billy Hollis wrote his own custom validator for windows forms that are similar to the web validation controls. You can download them from here . Hi Thank you very much it is very helpful. ...Show All
Joel Martinez TreeViews and Focus
Let me preface this by saying that I'm only implementing this, and this is not my design. I have a TreeView inside a GroupBox (not sure if that's relevant). I've hooked an event handler into the MouseDown event of the TreeView that creates a TextBox, at a location, and brings that TextBox into view and sets the focus to it. That works okay so far. But as soon as the TextBox receives focus, that's the end of the event handler's code. Immediately, focus returns to the TreeView, and the TextBox no longer has focus. The problem is that I want the TextBox to disappear when it loses focus, but this problem prevents the user from doing anything meaningful with the TextBox, since it seems to lose focus and thus disappear as soon as the Mouse ...Show All
ElephantMan Unicode
Hi, I have developed an Application completely using Unicode Fonts. (Tamil) I Successfully created almost everything including menus, Texts etc and was able to fill the values in SQL Express 2005 using Unicodes. Populated the datasaet, combo box etc with this unicode fonts. Now my problem is when I migrate this to another PC, It doesnt works. I have tried to install the unicode fonts to the other PC and still all texts are shown as box. What step am I missing. Is there any way to package the "Unicode fonts" together with the deployment. Thanks in Advance One Improvement. I had solved the problem partially, When I installed the files for complex scripts and right to left languages (Availabled in the ...Show All
Roberto Erazo Loading XML cause DataException
Hello. I have a simple Dataset (defined in design mode) containing one table with two columns: ID and NAME where ID defined to be "int", unique, readonly and NAME to be string, readonly. A name of the dataset is Dataset1 and the name of the table is EVENT. I am trying to populate a dataset with data from the following XML: <EVENTS> <EVENT ID="1" NAME="Event 1"/> <EVENT ID="2" NAME="Event 2"/> </EVENTS> I get following exception: System.Data.DataException: Column name 'ID' is defined for different mapping types. at System.Data.XSDSchema.HandleAttributeColumn(XmlSchemaAttribute attrib, DataTable table, Boolean isBase) at System.Data.XSDSchema.HandleAttributes(Xm ...Show All
lbendlin Minimize child form with parent form problem!!
Hi, I have FormA and FormB, FormA is the main form and I have a button in FormA when click will bring up FormB. The problem is whenever I Minimize FormA, FormB doesn't minimize with it. Please help me on how to do that, makes FormB minimize with FormA. Thanks Jason Hi MisaSimic, Thanks for the reply and your help. It works out great, again thanks for your help Misa Just a question hope you can help me too: What if I have FormA and FormB and a subform that popup when a button in FormB is clicked. How do I minimize the subform too. Thanks Jason In FormB ButtonClick SubForm frm = new SubForm() frm.Owner = this.Owner; // Maybe and only this will work frm.show Best ...Show All
Molon Labe How do I set my own browser to a different home page?
Is the above in the registry, or can you just change the URL Property on the WebBrowser control If you are using the WebBrowser control you have to handle the initial web page show in your application. Sorry if I wasn't clear... Like Internet Explorer's Internet Options home page changer, I need the user to be able to set the webbrowser to their own home page. You'll have to manage the storage of the home page URL that the user selects, and the UI they use to do it with. After you've constructed or WebBrowser object (or after the call to InitializeComponent, if you're used the Designer to drag-drop a WebBrowser control on your form) you can call the Navigate method. For example, if your WebBrowser object mem ...Show All
cmwith Generic User Controls?
After working on a windows forms project I realized many of my screens do very similar tasks on completely different types of data. I then decided to create a generics based user control to make reuse of all of this common work based on the Type of object the specific instance of the control is using. After I build my control I realized I no longer get any design-time support for my class. It doesn't even show up as a user control available in the tool bar. This makes sense, since an instance of a generic type needs the type defined in order for it to be rendered on the screen, however is there any way I can add this generic type to my windows form and specify its type and then be able to use the design-time support of modifying this co ...Show All
ykgreene Q: Working with Bitmaps
Hello everybody. Straight to the point. Let's say I have a bitmap 400x300 pixels. What I want to do with this bitmap is somehow to "slice" it in small regions and access each small regioin as a bitmap... Lets say I want to have 20 regions along the width... => by the ration bmp.width/bmp.height = region.width/region.height I can calculate the width and height of each small region i tried using the following loop for(int yAxis = 0 ; yAxis < bmp.Height ; yAxis += region.Height) { for(int xAxis = 0 ; xAxis < bmp.Width ; xAxis += region.Width) { //access each region as a bitmap } } So, can you guys help me achieve this.... Any help would be greatly appreciated....Thank you respecta chire You can ...Show All
carol chen Loading Datagridview's Performance
Dim fillCmd As String = "SELECT * FROM PATIENTS" Dim cmdAdapter1 As New OleDbDataAdapter Dim fill As New OleDbCommand(fillCmd, MyConnection) cmdAdapter1.SelectCommand = fill MyConnection.Open() PatientsDataSet.Clear() cmdAdapter1.Fill(PatientsDataSet, "PATIENTS") MyConnection.Close() I am using this code to load the data in a gridview.Using the wizard, I set the gridview's datasource to PatientsDataset. It was working fine but performance-wise, its not that elegant because it takes up about 6-8 seconds to load about a merely 20K records.I am using VS2005 Prof edition.Did it had to be that long How can I possibly address this issue thanks.... ...Show All
Cslom Wise for windows Installer - impersonation
Does somebody knows if we can impersonate (run the setup as another user when they start the setup) We use "Wise for Windows installer 6.0". Is there any alternative for letting a user without administrator rights, installing the application. I know that the most programs ask for who you want to install "all user or only for me". Is it possible that we select "only for me" automatically that a user can install the application Apparantly I only need to put the property "AllUsers" to 2 instead of 1 http://forums.altiris.com/messageview.aspx catid=20&threadid=3203&highlight_key=y&keyword1=user With Orca ...Show All
SSAS How to get a scroll bar to scroll down a large programme.
How do I make a VBscrollbar scroll down my programme. I have it docked in the form but I need it to actually function. Thanks. It depends on what you trying to scroll(controls, text) and if you want smooth scrolling or not. Is your problem solved Could you please be more clear in your question Thank you, Bhanu. Have you tried using AutoScroll No My problem is not fixed. I have a large porgramme legnth wise as it goes outside of a normal window. I like the layout like it is so is there any way to make it smaller but to have a scrollbar on the side. A panel and form has autoscroll property that you can set so you don't have to add scrollbars manual ...Show All
suzy_mathew Export table data in Access Database
Hi, I need to export a table data in Access Database into a text file using C# interface by a press of a button. I need advise on which method is required to use for this Tks. Hi, i am not using an SQLserver, so there is the namespace error again. So, meaning I have to install an SQL Server Sorry, it should be sw.WriteLine(datareader[" User_ID "].ToString()+" "+datareader[" Password "].ToString()); } No the first quotation mark before the "datareader" I don't think so. What error messages did you get I tested on my Login Table but received the following error: private ...Show All
Carsten-S Month calender control
Hi I am using monthcalender control in my windows C# application. In that i would like to disable all dates except sundays. most urgent one. Please help. Thanks Arun Thanks but it is not working for my problem. My problem is I need to disable all the date's except sundays and sundays should be on bold style. Users has to select only sundays. You can't disable dates in the MonthCalendar control, thus the Validating event handler. Change "==" to "!=" to allow only Sundays to be picked. One hack is to prevent the user clicking days, check this thread for the code. You'll have to find out what the X/Y coordinates need to be so only ...Show All
