
Spiel79
Avatar/Signature-
Posts
28 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Spiel79
-
Thanks JABE, that works. :D
-
Hello everyone. I have a datagrid with a few columns. What is the code to if I wanted to change the cursor to a hand everytime the mouse passes over any cell in the first column? Thanks.
-
Hello everyone. I am trying to have two listboxes with two buttons (Add/Remove). Each time the highlight is on a particular item in listbox 1 and the user clicks Add, that item is cut from box 1 and pasted in box 2. The reverse happens when the Remove button is clicked (ie, cut from 2, paste in 1). Any suggestions? Thanks.
-
Hello everyone. I created a datagrid in which I programmatically added the tables and columns. There is a slight problem. I am trying to get only the header text to be displayed in bold lettering. I can't seem to. Whenever I change the properties for HeaderFont only to bold in design time, it doesnt work. I have to change both the Font and HeaderFont properties to bold. When I do that both the column headings and the entries are in bold which is not what I want. How do I make only the column headers bold? Thanks.
-
Thanks for that Spiro. Works now. :D
-
Hello all. I have a timer in a form. I want this timer to check at the given interval, to see if the form has been minimised and if so, to restore it. Can someone please let me know what the code should be to achieve this? Thanks.
-
Hello everyone. I have a form which has about ten radio buttons. When the user doesnt make any selection, how do I catch this in code? I am presently doing the following since its only ten radio buttons, but what happens if I have a 100?! How do I loop all the radiobuttons checked status? Thanks. If Me.RadioButton1.Checked = False And Me.RadioButon2.Checked = False And '.... continues for ALL the buttons Then MsgBox("Please make a selection") End If
-
You need to add another single quote before your quote: Dim strName As String = "Michael J''son" Hope that helps.
-
Hello everyone, I have a form which has a CR Viewer. I declared a statement as follows: Dim crReportDocument As Summary 'And elsewhere in the code crReportDocument = New Summary() I then go on to add Summary.rpt to my project and it works fine. However, the minute I make changes to the .rpt file, I am unable to run the program. I get an error saying that type 'Summary' is not found. Anyone knows how to get around this? Thanks.
-
You might want to dispose of any commands before closing the connection: Dim MyCommand As New OledbCommand("your command string here") Dim MyReader As OledbReader(MyCommand, MyConnection) MyReader.ExecuteReader() 'Continue with the rest of the code... MyCommand.Dispose() MyConnection.Close() Hope that helps
-
Hello everyone. Presently, only when you use a Warning, Stop or no style, you get a sound for a message box. Is there a way to include a sound when using the Question Mark style? Thanks.
-
Thanks for that sjn78, works now.
-
Hello everyone. I have a datetime picker whose display value is set to Today(). Is there anyway I can disable past dates so that the user can select a value only starting from today and after? Thanks.
-
Will try it out, the one who was. I just need to change the "2004" to Today.Date. Otherwise, I will only be working with 2004 and years which are NOT 2004. And I don't intend to modify the code once every year :p. Oh, and yes, there are always 3, and only 3, characters before the year. Thanks.
-
Thanks the one who was. I guess the idea is to look at the LAST row entry in the database read off the 4th to 7th characters and compare them with Today.Year. If its the same, I can use the old method. Otherwise, I would re-initialise the last seven digits to Today.Year & 001, and subsequently increment this by one for each added row. Will try working on it but if anyone else has any other pointers, please post them. Regards.
-
How can I show only certain cols from DataView?
Spiel79 replied to goodmorningsky's topic in Windows Forms
You might want to have a look at this website: http://www.dotnet247.com/247reference/msgs/12/62176.aspx You can ignore the part with regards to the datetime and datagrid, but it has a few lines which show you how to add specific columns that you want displayed. Hope that helps. -
Hello everyone. I have a field which is auto generated in VB.Net. It is a string value made up of the following: The first three are alphabets (lets just say ABC) The next four are digits corresponding to this year (ie 2004) The last three digits are obtained by seeing the number of rows in the database, and adding one to that number. Hence my tenth row will be ABC2004010. An immediate problem which arises is when the year changes. Suppose I have ten rows at the end of 2004. When 2005 comes, the value is going to be ABC2005011! How do I go about looking at the number of rows WITH 2004 and then adding one to it? The relevant code is pasted below: MyConnection.Open() Dim rowcount As Integer Dim autorefno As String rowcount = ds.Tables("testtable").Rows.Count 'ds refers to my dataset rowcount += 1 autorefno = Format(rowcount, "D3") TextBox3.Text = "ABC" & Today.Year & autorefno Thanks in advance
-
Hi all. I would like to create a form that would pop up every, say, 15 minutes. How would I go about doing this? Thanks.
-
Realised what the problem was. Was declaring the add tablestyles command within the function so it was executing everytime the function was called, hence the error. Managed to overcome it by declaring it in the form load event.
-
Hi frida, Suppose that in form 2, the variable which you want is stored in TextBox5. And lets say you want to assign the value to a variable in form 1 known as teststr. You can use the following code in form 1 to allow it to be manipulated: 'Type this code in form 1: Dim teststr As String teststr = neuva.TextBox5.Text Hope that helps you.
-
Hi Temer. If you are at the early stages of exploring ADO.Net, you may want to look at (1) Fast Track ADO.Net - Kevin Hoffman (2) Sams Teach yourself ADO.NET in 21 days - Dan Fox For the above books, (2) is especialy useful if you are using SQL servers. Once you have gotten your feet wet, the following books are very good for an intermediate to advanced level: (3) Applied ADO.Net: building data driven solutions - Mahesh Chand (4) Essential ADO.Net - Bob Beauchemin Hope it helps.
-
Hello everyone. I have a form which is supposed to refresh everytime a button on another form is clicked. Part of the code for the refresh form looks like this: Dim testtblstyle As New DataGridTableStyle() testtblstyle.MappingName = "testfield" Dim testcolstyles As GridColumnStylesCollection testcolstyles = testtblstyle.GridColumnStyles testcolstyles.Add(testcolumn1) testcolstyles.Add(testcolumn2) testcolstyles.Add(testcolumn3) DataGrid1.TableStyles.Add(testtblstyle) However, when executed and when the button is clicked i get this error message: Please let me know how to overcome this problem. Thanks.
-
Hello all. I have a form with a datagrid control which links to a database. One of the fields in the db is a DateTime field with the following format: "yyyy-MM-dd HH:mm" Everytime I insert a new record, the database is updated correctly. However, the datagrid is not able to display the accurate information. With regards to the date time field, it displays only the date, although the value stored in the database is datetime. Why is this so? Thanks.
-
Suppose the name of your dataset is ds. Try this: cmb01.DataSource = ds.Tables(0) cmb01.DisplayMember = "PropertyName1" cmb01.ValueMember = ds.Tables(0).Columns(0).ToString Hope that helps.
-
Thanks to everyone who replied. I did manage to work it out using the textbox with layout changed method. Thanks for that Schobert. :)