
Machaira
Avatar/Signature-
Posts
330 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Machaira
-
If you've got all that going on, I would have to say it would be easier to drop the controls and just do all the drawing yourself and not have to worry about all that. Drag and drop in this case doesn't sound like it would be easier. That's just my opinion though. :)
-
Can you use serialization (assuming you have control over the XML structure)?
-
Hmm, I really wouldn't recommend using controls for this, but... public partial class Form1 : Form { int _x, _y; bool _moving; public Form1() { _moving = false; InitializeComponent(); } private void label1_MouseDown(object sender, MouseEventArgs e) { _x = e.X; _y = e.Y; _moving = true; } private void label1_MouseMove(object sender, MouseEventArgs e) { if (_moving) { label1.Left += e.X - _x; label1.Top += e.Y - _y; } } private void label1_MouseUp(object sender, MouseEventArgs e) { if (_moving) { if (Rectangle.Intersect(new Rectangle(label1.Left, label1.Top, label1.Left + label1.Width, label1.Top + label1.Height), new Rectangle(panel1.Left, panel1.Top, panel1.Left + panel1.Width, panel1.Top + panel1.Height)) != null) { panel1.Controls.Add(label1); } _moving = false; } } } Disclaimer - the above is untested. :)
-
For #1 - can you post the code? What do you mean by "Reports"? For #2 - set the SelectedIndex property of the combo to -1
-
play seperate files to each speaker in soundcard
Machaira replied to drainey's topic in Graphics and Multimedia
You can do this using the DirectionSound portion of DirectX, yes. -
Public Class Form1 Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click Me.Text = Now.ToString End Sub End Class
-
Why do you need to do this? You don't normally drag controls around on a form at run-time.
-
What do you mean by "created some graphics on a form"? In what are the graphics stored?
-
See if the attached helps.WindowsApplication2.zip
-
Sounds like you need to talk to your network admins. :)
-
OK, I'm stumped on this. I've got an ASP.NET 2.0 page with a DetailsView on it, tied to a SQLDataSource. Here's the SQL Server 2000 data table I'm using: [dbo].[CDRL Infromation] ( [cdrlID] [int] IDENTITY (1, 1) NOT NULL , [OPFI #] [varchar] (255) [DID #] [varchar] (50) [Field Instruction Title] [varchar] (255) [Gov Lead] [varchar] (255) [Due] [varchar] (100) [Next Due Date] [datetime] [Current Rev Date] [datetime] [Current Rev] [float] [sME] [varchar] (255) [TECH WRITER] [varchar] (255) [Days to Next Update] [int] Here's the SELECT and UPDATES for the data source: SELECT * FROM [CDRL Infromation] WHERE ([cdrlID] = @cdrlID2) UPDATE [CDRL Infromation] SET [OPFI #] = @column1, [DID #] = @column2, [Field Instruction Title] = @Field_Instruction_Title, [Gov Lead] = @Gov_Lead, [Due] = @Due, [Next Due Date] = @Next_Due_Date, [Current Rev Date] = @Current_Rev_Date, [Current Rev] = @Current_Rev, [sME] = @SME, [TECH WRITER] = @TECH_WRITER, [Days to Next Update] = @Days_to_Next_Update WHERE [cdrlID] = @original_cdrlID I attempt to edit a record and when I click the Update link on the detailsview I get: Line 1: Incorrect syntax near 'nvarchar'. Line 1: Incorrect syntax near ','. Line 1: Incorrect syntax near ')'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'nvarchar'. Line 1: Incorrect syntax near ','. Line 1: Incorrect syntax near ')'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [sqlException (0x80131904): Line 1: Incorrect syntax near 'nvarchar'. Line 1: Incorrect syntax near ','. Line 1: Incorrect syntax near ')'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857354 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734966 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135 System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +401 System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +721 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +78 System.Web.UI.WebControls.DetailsView.HandleUpdate(String commandArg, Boolean causesValidation) +1152 System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +461 System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source, EventArgs e) +109 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102 Where the heck is the nvarchar coming from?!? I've tried looking at the data in the ItemUpdating event but it doesn't really present anything useful. Any suggestions would be helpful.
-
IMO, a user shouldn't be adding information to a child table unless the relevant record is created in the parent table first.
-
VS.Net Data Connection to Access DB
Machaira replied to lorena's topic in Database / XML / Reporting
You should be able to just change the drive letter to the server name. -
Wouldn't you just do: inbox.RemoveChild(email)
-
Umm, code?
-
It's not so much starting over. Much of the language is still the same. You just have a huge pre-built library of classes to use. First, a StreamReader is just what is says - a reader. You would use the StreamWriter class to write data back out to a file. Second, the class just reads in file data to memory, you would still do the manipulation using variables. For your example how you would read in the data depends on how you have it set up in the file. If it's all on one line in a delimited format you just read the line into a string variable and using the String class's Split function to chop the line into it's separate pieces of data. If it's on separate lines, use the ReadLine to read each piece into separate variables. Hope that's enough of an explanation. Not "out of the box" AFAIK.
-
Cannot create a child list for field ccdata
Machaira replied to matt09524's topic in Database / XML / Reporting
Why not just do: DataGrid1.DataSource = DbDataCC or am I missing something? -
See the attached. It's kind of a hack, but I only spent a couple minutes on it. :cool: :-\Listview.zip
-
Look into the SmtpMail class and the System.Web.Mail namespace.
-
So what's the problem?
-
Here's something that might be useful - http://dotnetrix.co.uk/tabcontrols.html
-
Issues resizing my main form/application when minimized [C#]
Machaira replied to Shaitan00's topic in Windows Forms
The code you posted does not necessarily do what you're stating in the comment. Isn't the form hidden when you go to the NotifyIcon? The following works fine for me (VB.NET code): Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize If Me.WindowState = FormWindowState.Minimized Then Me.Hide() NotifyIcon1.Visible = True End If End Sub Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click Me.Visible = True Me.WindowState = FormWindowState.Normal NotifyIcon1.Visible = False End Sub -
Why would you have to do the entire document? You should just do the text for the line that changes, right?
-
I'm willing to bet your problem lies here: displayText.Text = x & "-" & intVrs Have you tried stepping through the code line by line in the debugger?
-
Well, that project doesn't compile for me and I don't have the time to figure out the fix. What version of VB was that done in? I'm using the most recent beta of VB.NET 2005 EE.