
Disasterpiece
Avatar/Signature-
Posts
50 -
Joined
-
Last visited
About Disasterpiece
- Birthday 04/06/1982
Personal Information
-
Occupation
Student
-
Visual Studio .NET Version
Visual Studio .NET Pro
-
.NET Preferred Language
VB.NET
Disasterpiece's Achievements
Newbie (1/14)
0
Reputation
-
Need help with Saving Info into Database!
Disasterpiece replied to Disasterpiece's topic in Database / XML / Reporting
Heh you guys are still responding :) Well I got an A on my project, an A in the class, and I won't have to worry about VB again for a while (if ever hopefully) :p Thanks for all your help -
Password Protecting an App (Multiple User Accts)?
Disasterpiece replied to Disasterpiece's topic in General
Make sure you have an Insert command and you close that command. Here is what I ended up doing for mine: newRow.EndEdit() dtUsers.Rows.Add(newRow) 'Inserts new row into the data table daUsers.InsertCommand = commandBuilder.GetInsertCommand daUsers.Update(dtUsers) 'Saves the new row to the database daUsers.InsertCommand.Connection.Close() daUsers.Dispose() See if your code looks similar to that and tell me what happens :) -
Multiple Forms - How to close the Entire program?
Disasterpiece replied to Disasterpiece's topic in Windows Forms
If I say frmMain.Show(), then Me.Close() to close the login, the entire program exits. -
Multiple Forms - How to close the Entire program?
Disasterpiece replied to Disasterpiece's topic in Windows Forms
That never worked for me...anything else I can do? -
Hi all, I need to scroll to the very bottom of my datagrid when I enter my program and stay at the bottom. I tried the NavigateTo method but it requires a Row number (okay), and a Relation string (what is this??) So then I tried the following code that I got from the Windows form FAQ: Public Class MyDataGrid Inherits DataGrid Sub ScrollToRow(ByVal row As Integer) If Not Me.DataSource Is Nothing Then Me.GridVScrolled(Me, New ScrollEventArgs(ScrollEventType.LargeIncrement, row)) End If End Sub End Class No luck with this code. I added a new class to my project with that as the code. I think my problem with this is that I wasn't sure how to connect the instance of the class with the actual datagrid on my form. Any help is appreciated Thanks
-
I've got everything under control now, I did it through the Properties window for the Datagrid instead, thanks.
-
This is not working for me: Dim dgStyle As New DataGridTableStyle() With dgStyle .AlternatingBackColor = Color.LightGray .BackColor = Color.WhiteSmoke .ForeColor = Color.MidnightBlue .GridLineColor = Color.Honeydew .GridLineStyle = System.Windows.Forms.DataGridLineStyle.Solid .HeaderBackColor = Color.MidnightBlue .HeaderFont = New Font("Arial", 8.0!, FontStyle.Bold) .HeaderForeColor = Color.White .LinkColor = Color.Teal .MappingName = "Appointments" .SelectionBackColor = Color.Yellow .SelectionForeColor = Color.DarkMagenta End With Dim grd5 As New DataGridTextBoxColumn() With grd5 .HeaderText = "Description" .MappingName = "Description" .Width = 75 End With Dim grd6 As New DataGridTextBoxColumn() With grd6 .HeaderText = "Dur" .MappingName = "Duration" .Alignment = HorizontalAlignment.Center .Width = 30 .Format = "c" ' <<< This will set the column to currency End With dgStyle.GridColumnStyles.AddRange(New DataGridColumnStyle() {grd5, grd6}) DataGrid1.TableStyles.Add(dgStyle) I put that in my Form Load event before I link the datagrid with the datasource, doesn't work. Could someone explain what all of these properties are? Thanks
-
Cool thanks a bunch. Everyone here has been a big help so far, I'll try your suggestions after I eat dinner. As for why I use that column in the Select - I have a table filled with transactions based on usernames. I also have a table of usernames and other information. When a user logs into the program, the select statement gets the rows for only that username, however I don't want to actually display the username in the datagrid. Thanks again!
-
I've been posting quite a bit here today...anyway here's my issue: With the datagrid control, I have 2 questions: 1. Is there a way to hide a column from displaying in the datagrid? I use a select statement that's based off of that column but I don't want it to show up in the output for the datagrid. 2. Is there a way to format columns in the datagrid? I'm using an Access Database - I have 2 fields that are set to Type Currency, however in my program's Datagrid they are just showing up as Decimal, and if there it's something like 154.00, it simply shows up as 154. I want it to display as $154.00 in the data grid. Any way to do this?
-
Multiple Forms - How to close the Entire program?
Disasterpiece replied to Disasterpiece's topic in Windows Forms
Thanks, I'll try that -
I have 2 forms - a Login Screen and the main program window. When the user logs in, I hide the Login form and show the Main form. My problem is this: When I click the close button in the top right corner on the main form, the Login form is still running (only it's hidden) . How do I get my entire program to close when I hit the X button on the main form? Thanks :)
-
Can you use (>) and (<) in SQL statements when refering to a Date format column? Say I want to get all of the rows from only a certain date forward, would this work: "SELECT * FROM Transactions WHERE DATE > '" & dteDate & "'" If not, would I have to use a BETWEEN statement instead? Thanks
-
Nevermind I figured it out
-
So if I did a class with just a property for the Username, and then instantiated an object as that class type, and then set the username property of the object to CStr(frmLoginInstance.txtUsername.Text) it would work? Seems like that isn't really doing anything different but then again I'm lost and clueless when it comes to programming so maybe you meant something else?
-
I have a login form with username and PW textboxes and I want to pass the username into a variable on another form. However when I try to test to make sure it's working it outputs nothing in my test label. I have my Username Textbox set to public so I don't know why this isn't working... Here is my code, what's wrong!!? Public frmLoginInstance As New frmLogin() Public strUsername As String = CStr(frmLoginInstance.txtUserName.Text) Thanks