Answer Questions
sagittarian FixedToolWindow Locked
It's my understand that the locked property should prevent the user from moving a child window. With this property the user is still able to adjust the location of the FixedToolWindow. Is there any property or event I should be setting to prevent this Some developers have suggested setting the window border style to none and then adding a label as the window title, but thought I would see if a better solution exists. Thanks in advance. The locked property is a design-time, NOT a run-time property. It defines whether or not a control can be moved by the developer in design mode. Since a form also inherits from control, it gets this property even though it does not really make sense. One way yo ...Show All
Mr.Analogy Error icons on my data sources
I have been working with a .NET 2005 Windows Forms project for well over a year. Today, after I made some changes, my data sources window lists every data source with an error icon in front of it (icon with an exclamation point) and no contents (like of bindable fields). These are all object data sources that are bound to Windows Forms. I really don't want to delete them all, recreate them all, and rebind them all. And, interestingly, the forms that are bound to these data sources still work just fine... Anyone know how to get my Data Sources window back to listing the valid contents of my Data Sources so I can use them again Thanks! I had tried that several times, and it did not work... ...Show All
EileenWin Flickering when drawing with graphics object
I usually write game code using directx. i wanted to see how well the graphics object holds up. (not that it's anywhere as powerfull as directx) I'm getting 'flickering' when running the app though. I've read some other threads saying to double buffer. A bit of extra info, i'm rendering out to a picturebox. Here's the code to double buffer the PB. Public Class GW Inherits PictureBox Public Sub New() Me.DoubleBuffered = True End Sub End Class Problem is, whether not i'm doublebuffered, it still flickers. basically, the draw code runs in a loop timed by a performance timer. Draws backgrounds first, then objects from a back to front method. (so things occlude properly) Before the beggining of each loop, it clears the pic ...Show All
Fabio61 datareader bind to datagridview
hi, how to bind datareader to a datagridview without using datatable. thanks, Popskie Thanks so much for that post. That is the best example I could find. Much cleaner then the others I found and works great! there is no DataBind() in a DatagridView. Wht i want here to to loop the datareader put the data in the DataGridView. But i dont knew how thanks Did you find the answer I've got the same problem as VB Express doesn't support a connection SQL Server 2000 via a DataSource - they excluded this adapter from the express version. Why do you need to enter the data into dataview using loop Why don't you just bind it to it. ie ...Show All
Robin P Programmatic re-ordering of DataGridView columns / HeaderText issuer
Hi Guys, I am trying to programmatically re-order columns of a DataGridView via a "Configure View" form, giving the user buttons to move the columns left or right. I do this as follows: ------------------- DataGridViewColumnCollection m_columns; // cached columns // Now, assume the user has selected a column (the column-index is in the variable selectedIndex), & wants to move it left, he'll click on a button. The click event-handler for the button does the following: DataGridViewColumn col = m_columns[selectedIndex] m_columns.remove(col.name); m_columns.insert(selectedIndex-1, col); --------------- This re-orders the columns, but does not move the headerText over. I have tried explicitly sett ...Show All
Aditya.P how to get the name of the image in Picture box
Hi i have a small problem.I saving an image that is displaying in the picture box. i already has a default image in the picture box before capturing the image from a webcam name default.jpg my problem is i want to know the name of the image so that i will ensure whether i'm saving the newly captured image or the default image. hope i conveyed my problem correctly.looking forward for a solution -regards GRK GRK wrote: ... and also there i no tag member to that. It's impossible. I tested a VB.net project and added a button there. Private Sub Button1_Click( ByVal sender As System. Object , ByVal e As System.EventArgs) Handles Button1.Click & ...Show All
Flavia Lemes Datagridview and wrong ID
Hi all, I've developed a quite complex application using VB 2005. I'm using an Access database. I noticed a strange problem with a datagridview. After deleting a record, closing my application, reopening it and adding a new record using the datagridview, the system gives to "ID column" a wrong value (for example, a value already used by another record). After saving the new record, and "refilling" the datagridview, the correct ID for the new record is displayed. How could I solve this problem Thanks in advance for your help. No, the record seem to be correctly deleted. In fact, after closing my application, if I open with Access my .mdb database, I don't see the record anymore. So, no ...Show All
mettoff DataGridView with dependent ComboBox columns
Question: How do I correctly setup the binding for a DGV that has two ComboBox columns, where one determines possible values of the second What I'm doing: I have a DataGridView which contains two ComboBox columns bound to an IList<Items>. The columns are setup like below (other columns ommited): // Setup Size Column DataGridViewComboBoxColumn colTwo = new DataGridViewComboBoxColumn(); colTwo.DataSource = _sizeSource; colTwo.DataPropertyName = "Size"; colTwo.DisplayMember = "Description"; colTwo.ValueMember = "This"; colTwo.Name = "Size"; _dgvPipePricing.Columns.Add(colTwo); // Setup Schedule Column DataGridViewComboBoxColumn colThree = new ...Show All
CBuilder Tapping the Enter Key
How can I move the focus to a button when I press the enter key in the Text Box Thnx! Make sure your forms KeyPreview property is set to true, then create a KeyPressed event for your textbox. if (e.KeyChar == (char)Keys.Enter) { MyButton.Focus(); } VB is not good with type casts, so try using the conversion class. if e.KeyChar = Convert.ToChar(Keys.Enter) Then btnSave.Focus() End If Dave, what will be the vb version of the code I use the following code - If e.KeyChar = Char (Keys.Enter) Then btnSave.Focus() End If and it says - "Char is a type, and can not be used as an expression. Thnx! In your KeyPress handler, when the button has been pressed just call: MyButton.Focus() ...Show All
loonysan Panel Opacity
Is there any way to make the background on a panel have 50% opacity so I can use it as a custom border Yah, but my image has more than 1 color. Yah, im not real sure how to do that. If someone could give an example http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=593219&SiteID=1 This might help. I am short on time this week but my idea I was looking towards was if you could potentially override the draw of the form, hopefully allowing you to render it yourself. Just might be a real pain. James Any other ideas Im trying to make my p ...Show All
SHISHIR WAHI Returning data from Control to Owner form? (C++)
Hi, I am coding in C++, using VC++ Express Edition. I have a form(Form1) which is a MDIParent form. I am creating a second form, and launching it as a dialog with the following code: private : System::Void Form1_Shown(System::Object^ sender, System::EventArgs^ e) { NewQuest ^ dlgNewQuest = gcnew NewQuest(); dlgNewQuest->ShowDialog( this ); } NewQuest is the Name of the Form for this Dialog. It has a few controls on it. I want to return the value of a textbox control located on NewQuest to its Owner form, Form1, and then set the text of Node0 of treeView1, which is contained within panel1 on Form1, to the value of this textbox control located on the NewQuest form. I have se ...Show All
SDavis7813 Copy files using custom actions in Setup Project
I have a project to deploy but there is a file (non code), that will need to be copied to a directory on the install machine, that is not the application directory (app dir). To make maters worse, this directory will be different on every machine. So I can not use the File system editor. My thinking was to use a custom action on the Install_AfterInstall event. This action would look in the application directory where that app had just been installed and copy this file to a specific dir on the users machine. The problem is this dir could be anywhere on the users machine. The good news is the dir will always be named the same. How do I get the app dir name so I can copy this file at the end of the setup process Will the file exist on t ...Show All
Michael Herman - Parallelspace PropertyGrid
The question is, how to make several groups in PropertyGrid, and i do: MyPropertyGrid.SelectedObject = mySomeObject; It only gives "Misc" Group, but how to organize it in to serveral groups I don't quite follow your question... are you looking for a way to build your own editor or visualizer for the propertygrid so that when a custom object is being displayed you have that much more control over it If so... take a look at this MSDN article which includes info on building your own object converter and type editors. You'll need to specify the CategoryAttribute attribute for those properties you want to be in certain groups ala: public class MyTestClass ...Show All
DavidThi808 error on row deletion: using getchanges
can someone please post me some coding how to update a table when using ds.getchanges to only obtain modified rows,. then i get a problem with deleted rows, i guess im not doing it the right way. what is the proper way to delete a row from a dataset - i most probably want it the vs2003 way, . the generated code anyone in short what i am doing is: Dim newDT As New DataTable newDT = (dt.GetChanges) If Not IsNothing(newDT) Then bills.Rows.Clear() For i As Integer = 0 To newDT.Rows.Count - 1 Dim r1 As CostingDataSet.BillRow r1 = getEachRow(myid, newDT.Rows(i)) If Not IsNothing(r1) Then Me .bills.AddBillRow(r1) ------------------------------------------------------------------- ...Show All
alka_mehta How to set the transparent color for an Animated GIF?
Hello, The animated gif in my application represents the process and asks the user to wait while the thread is completing its task, however the problem is when I try to set the transparent color of the animated gif with a code similar to this: waitImage.MakeTransparent(System.Drawing. Color .White); The transparent color works as expected, but the problem is, the Animated GIF become static and loses its motion. I am hosting the Aimated GIF in a Picture box and the application is written in Windows.Forms and .Net 2.0 Do you know why this happen Thanks in advance. I don't know why this happens but I found a work-around by using the ImageAnimator class and setting the transparency o ...Show All
