
georg
Avatar/Signature-
Posts
28 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by georg
-
You might find an answer to your question in this thread. georg
-
Enigma151, As VolteFace indicated, I got it (cough) wrong when I told you to use "Go To Definition" to find the Procedure. You won't be able to "go to the definition" and find the Procedure, because, as your error message and VolteFace so succinctly explained, it does not exist and you need to create it. georg
-
Hi Hamburger1984, I put your Me.Invalidate piece of code underneath my Me.Controls.Add(MyDataGrid) in Public Sub within the form that holds the datagrid. I also tried Me.MyDataGrid.Invalidate, but unfortunately there was no change in the result. It looks promising though, so I will try it with some of the overload arguments. Thanks, georg
-
Enigma151, If you right click in the middle of "Ctrls_TextChanged" text in your piece of code that says: AddHandler MyCombo.TextChanged, AddressOf Ctrls_TextChanged Then you should get a context menu. On that context menu select "Go To Definition" (should be the 3rd one up from the bottom of the menu). You will then be taken to the location of the Event Handler (if it exists at all). georg
-
Hello All, When I load my datagrids (I can load a number of different DataGrids programatically) on to my form using: Me.Controls.Add(MyDataGrid) I find that I also need to do something to rebuild/refresh/repaint the form as well. I did have a work-around that involved resizing by 1 pixel to force it to rebuild/refresh/repaint, and this worked fine. A few days later I find that if the form is maximised, then this workaround doesn't work. I've tried MyForm.Refresh and MyDataGrid.Show, both before, and after the Me.ResumeLayout() statement, and it has no effect: I just get a big MidnightBlue area where my datagrid is meant to be until I resize it manually. Does anyone have an idea as to what I am doing wrong? georg
-
Hi All, I'm trying to do a fake multi column combo box, but the irregular width of characters is making things a bit messy. Is there any way to measure the width of the font and then put some padding in my concatenated strings to even the columns up? georg
-
Moishe 1. Declaration: Dim colTime As New DataGridTextBoxColumn() 2.Mapping and Formatting colTime.Mapping = "Time" colTime.Format = "HH:MM" 3. Add to the DataGrid MyDataGrid.TableStyles(0).GridColumnStyles.Add() I think these are the core elements of what you need to do, but I haven't tested the "HH:MM" bit. georg
-
Creating Controls At Runtime using a Variable Name
georg replied to JCreationsInc's topic in Windows Forms
JCreationsInc Here is something to get you started: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call ComboCreator() End Sub Private Sub ComboCreator() Dim x As Integer Dim sProgramName As String = "PoopList" For x = 1 To 10 Dim cmbProgramName As New ComboBox() cmbProgramName.Top = x * 20 cmbProgramName.Name = sProgramName & x Me.Controls.Add(cmbProgramName) Next End Sub Create a new form, add a button to it and then put the above code in. georg -
Hello All, I'm having a bit of trouble with tabbing and the dropped down combo box (within a datagrid). e.g. ColumnComboBox.DroppedDown = True and Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, _ ByVal keyData As System.Windows.Forms.Keys) As Boolean 'Explanation: This will turn the enter key into a tab key If msg.WParam.ToInt32() = CInt(Keys.Enter) Then SendKeys.Send("{Tab}") Return True End If Return MyBase.ProcessCmdKey(msg, keyData) End Function 'ProcessCmdKey The problem is, that when I select an item in the dropped down portion of the ComboBox, and then hit Enter (which is processed as a Tab), the Text Box "underneath" the ComboBox doesn't collect the new entry. So, I guess my question is really: How do I "get at" the selected item in the ComboBox which inherits the Text Box in the datagrid? Thanks, georg
-
Hi piscis, Here is something to give you an idea: For Question 1 Dim ds As DataSet = Me.DataSource 'where "Me" is the datagrid Dim rowCount As Integer = ds.Tables(0).Rows.Count() Dim col As Integer = 4 Dim row As Integer Dim dsum as double For row = 0 To rowCount - 1 If IsNumeric(Me.Item(row, col)) Then dsum = dsum + CLng(IIf(IsDBNull(Me.Item(row, col)), "0", Me.Item(row, col))) End If Next row This code above just tells you how to sum everything in column 4. A really good source for this is posted on this forum, but here is the direct link: http://www.syncfusion.com/FAQ/WinForms/default.asp Regards, georg
-
ADO.NET Forcing updates in the Datasource
georg replied to georg's topic in Database / XML / Reporting
My old friend the serializeable class has come to the rescue. Problem solved. Thanks for looking. georg -
Thanks divil. Modicum of relief to know that I'm not alone. georg
-
Hello All, I'm making event driven calls to the db (Access 2000) from my windows form to collect a Transaction id (that I have created) These Transaction ids must be unique. I get a Transaction id from the database using a Datareader, and then write the next Unique Id in the sequence back to the same table with an Update query (using ExecuteNonQuery) When I try to get the Transaction Id that I just wrote to the table, sometimes it appears as if the Update hasn't had time to come into effect (when I repeat the event quickly). Is there anything like "Database Refresh" like I had in DAO? Thanks, georg
-
Thanks for responding AndreRyan. I don't get to see the pin. My registry knowledge is limited, and I know that you don't go poking about in the registry if you don't know much about it. I guess the properties aren't that important. ;) georg
-
Does anyone else have this problem? After I have been in the IDE for about 10mins, I can no longer access the property grid of whatever I am looking at. I have the property grid on AutoHide, and when I click on it, it refuses to display. It also won't display if I right click on whatever I am working on and select Properties from the context menu. It will only come back (and only for a short time) if I close down the IDE and re-open it. Doesn't happen with any of the other Auto Hide windows. Microsoft Development Environment 2002 Version 7.0.9466 Microsoft .Net Framework 1.0 Version 1.0.3705 georg
-
Finding and Replacing Text within a file
georg replied to georg's topic in Directory / File IO / Registry
Clunk. (sound of embedded text file being dropped from my project). Thank you both for having a look at this so quickly, and a big thanks for the Libraries VolteFace. Regards, georg -
Hi All, Does any one know a way to find and replace text within a file? This question stems from a my problem of having to store the database file path within an embedded text file. Is there a better way? I have already attempted to make a serializable class (Property Bag Changes in Visual Basic .NET), but since I only have a standard version of VB, I can't create a Class Library project (can I ?). Thanks, georg
-
It's definitely an art. As far as being Art (which is how some people have interpreted the question): It's a strange kind of art that no-one should see. Then again, if Tracy Emin can call it art, then so can we.
-
Thanks for understanding me JABE. You are right. I could pass 0.1 * 100 to the function, but then I lose the flexibility of being able to set the GST (Australian Sales Tax) in a Global Variable. The real scenario involves passing row and column co-ordinates for a cell, against which the GST amount would be calculated. This problem is something that I have been thinking about for a while, and I was hoping that VB.Net might have the solution. MS Access used to have something in the same league, where you could pass a string representing a Sub to the function: Application.Run("MySubProcedure"). Thanks for the discussion.
-
Okaaay, I thought that this would be hard to explain. Another scenario: Imagine you have the function: Function GSTCalculation (Byval s as String) as Double Dim GSTRate as Double = 0.1 Return MagicConverter(Left(s,7)) * CInt(Right(s,3)) End Function You Call this function with the following bit of code: Call GSTCalculation("GSTRate * 100") The returned value from the GSTCalculation function would be 10.0. The MagicConverter function has picked up the left 7 characters from "GSTRate * 100" and converted them to the variable that is declared: Dim GSTRate as Double, the same way that the CInt function has converted the right 3 characters to an Integer. I'll get back into my box now. georg
-
Does anyone know of a way to convert a string to a variable? Example: Say I am row 5, column 1 of a datagrid. When my user changes the text of (5,1) to "GST" using a combo box, I want to multiply the amount in (5,2) by 10 percent and put the product in (5,3). I don't want to hardcode this, I'd rather to have it as one of the "properties" of (5,1). So, the string that I would like to use as the property would be "3 = 2 * dGST" In this scenario the "dGST" portion of the string would have to be converted/interpreted to a double (via a magical string converter) that holds the current GST rate (which would already be declared: Dim dGST as double). I'd use some sort of parsing algorithm to pick up the alpha characters in any string. (I'm not holding my breath though) Thanks, georg
-
Thanks for the quick reply VolteFace!
-
This is how you retrieve the selected item from the a listbox: (the contents of the list box is a collection of objects) Dim s As String s = Me.lbx.SelectedItems(0).ToString Regards, georg
-
Hello All. I'm looking for some definitive answers on MDIs: Is it possible to have the Main Manu Item on one of the child forms in a MDI Application? Is it possible to have a modal form as part of an MDI application? Thanks, georg
-
Credit to PlausiblyDamp! (And maybe the 1 hour of (ocean) surfing to clear my head.) My addhandler statement (when I instansiated the Class DataGridComboBoxColumn) wasn't telling Class "b" to handle the event . Thanks. georg.