Derek Chan's Q&A profile
Windows Forms tables
I keep getting error messages about auto generated name and tables not existing When I make more than two tables and make forms in C# and drag the dataset onto the form I get a message like dbo.HeatingOrCooling does not exist ...Show All
Visual Studio Express Editions C# Executable distribution?
The article "How to: Set Debug and Release Configurations", implies that its possible to create a "release" executable for C# programs under all but VS 2005 Express edition. This implies that an application cannot be distributed to and executed by users without Visual Studio to run it with. Is this true - I can't create an applciation and give it to other users Is there another way to do this Another free IDE that might be useful Give your users the .exe that is built in the Debug or Release sub-folder of the project folder. ...Show All
Windows Forms Open close save
Hi i realy need help i want to create a alternative to word but my save featcher dose not save the things in my text box how do i set it to save the text box please help me Giggig guy I think he should just work on saving the file in the simplest manner at the moment Eragon. Giggig, In order for the code I posted to work you must pass the string to the function and then the function uses the identifier 'path' to work with it. In order for you to use it directly within your code you could do two things, 1) Create a variable of type string and assign the value of the filepath to it or... 2) simply change the word 'path' to the literal string of the filepath...here is an example of each... private void SaveAsToolStripMenuItem_Clic ...Show All
SQL Server managing live and develop database
Hello, I haven written a Windows program in Visual Studio 2005. This program stores data in and retrieves data from a SQL Express database. The customer is starting to use the program and filling the database with data. However the program is still under construction (new functionality will be added) and so is the database (new tables, views etc. will be added). Of course I could send the customer the new database, but than all data already entered will be lost..... I'm thinking about using the SQL Management Studio Express and VS2005 to connect remotely to the database (a VPN connection is availabe) but worry about performance issues.... Or should I use some kind of replication / synchronizatio ...Show All
Windows Forms toggling images in a toolStrip button
I have noticed how the undo and redo buttons in most apps have an inactive state image (gray) and an active state image (usually blue). The images swap interactively as you reach the start or end of the current levels of undo. The next and back buttons on this browser are an example. I have looked for information on how to do this with a toolStrip button and have found only the reference to toggle buttons which concerns causing a single image to looked depressed until the control is clicked again. Can someone point me to information on how to associate 2 images to a toolStrip button so I can toggle them between 2 states of the button I have arrived at what I think may be a workaround, but I'm no ...Show All
Windows Forms Control.Leave() is not called when a user selects a ToolStripItem.
I have a form that contains TextBox controls that the user enters data into. In the TextBox.Validating() and TextBox.Leave() methods, I validate the data that the user entered. This works fine when selecting other TextBoxes on the form. The problem I am having is a user enters data into a TextBox and clicks on a Save button in the ToolStrip or a Save menu item in the MenuStrip. The TextBox.Leave() and the TextBox.Validating() methods do not get called when the focus is given to the ToolStripItem. According to the MSDN documentation on the Control.Leave() method, these calls should happen when the focus goes to the ToolStripItem. Can someone please explain why this does not happen, and if there is a workaround Thanks, Doug ...Show All
Smart Device Development how to make the program run at backgroud?
how to make the program run at backgroud my develop platform is c# .net cf 2.0 thank you Simply create and start console application and it would run in background. ...Show All
SQL Server Permission issues
Dear all, I have 500 tables in a database. How can i grant select ,update and insert permission to a user on all 500 tables of the database at once. Thanks Mohd Sufian The fixed database role db_datareader will work for SELECT. You can use a cursor. ...might want to use sp_executesql DECLARE @User sysname DECLARE @Table nvarchar ( 500 ) DECLARE @cmd nvarchar ( 2000 ) SET @User = 'MyUser' SET @cmd = '' DECLARE GrantUser CURSOR LOCAL FAST_FORWARD FOR SELECT s . Name + + '.' + o . name FROM sys.objects o INNER JOIN sys.schemas s ON o . schema_id = s . schema_id WHERE type = 'U' IF EXISTS ( SELECT * FROM sys.sysusers WHERE ...Show All
Visual C++ WHISHER - WiFi EveryWhere ??
whts that No hardware to purchase-it works with any WiFi device! It’s a software application that you install on your computer and helps you get free WiFi access all around the world. Additionally it offers a range of tools and services that will take your wireless experience to a new level. The Whisher network is powered by users sharing their WiFi. All WiFi networks registered through Whisher are protected and the owners (sharers) have full control on who and when can access them. More at www.whisher.com ...Show All
Audio and Video Development Mixing Audio input in .NET
Hi, I want to get some advice regarding "Recording audio from multiple audio sources and saving into one file using either VB.NET, C#.NET or VB6" Pleasae guide me to the right forum. Regards, Mujeeb Since Media Foundation is unmanaged-only and doesn't yet provide capture functionality (like recording audio), that's probably not your best bet, so I'll try to redirect you. Since you want to write managed code, I might actually recommend that you take a look at the Windows Media Encoder SDK, which does offer managed APIs. Here's the newsgroup for that: http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/default.mspx dg=microsoft.public.windows ...Show All
Visual Studio Team System BUG: Import script cannot split simple ADD CONSTRAINT list
ALTER TABLE [dbo].[tableA] ADD CONSTRAINT [FK_tableA_tableB] FOREIGN KEY ([tableB_id]) REFERENCES [dbo].[tableB] ([tableB_Id]), CONSTRAINT [FK_tableA_tableC] FOREIGN KEY ([tableC_id]) REFERENCES [dbo].[tableC] ([tableC_id]) This format is generated by many tools including Red Gate Sql Compare so it's fairly common to have scripts lying around like this. It would save a lot of manual intervention for DB Pro to figure out how to split it up properly into two files automatically. If you import script we currently do not split this; if you import schema (from a database) we actually do split this in to two foreign keys. -GertD ...Show All
.NET Development How do I send mail using C#? This is the way to Send Email From C#
Does anyone have a code snippet that shows how to send mail from c# Is this for sending mail from a web page or from a Windows Forms application Thanks! Josh Ledgard wrote: Here is the code snippet I found... System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add(" luckyperson@online.microsoft.com "); message.Subject = "This is the Subject line"; message.From = new System.Net.Mail.MailAddress(" From@online.microsoft.com "); message.Body = "This is the message body"; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("yoursmtphost"); smtp.Send(message); ...Show All
Visual Studio Express Editions How do I wait for a key to be pressed ?
Hello, I would like to know how do I wait for a key to be pressed in VB2K5, I've been looking on the MSDN a couple of times but couldn't find anything like it, there is a Declare Sleep from Kernel32.dll....., However it's not really what I'm looking for ! I'm looking for something like this, If Inkey$="" then End But this is very old VB Thank you all. If you just want to wait before exiting until a particular key is pressed you could try Do Loop While Console.ReadKey.Key <> ConsoleKey.Q or something similar ...Show All
.NET Development System.Diagnostics.Process compatibility between Framework 2.0 and 1.1
Hello everyone! Check this code: ... System.Diagnostics.Process Proc = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo oInfo; ... ///Many lines of code later Proc.StartInfo = oInfo; logger.Info("File name path: "+Proc.StartInfo.FileName.ToString()); logger.Info("Arguments: "+Proc.StartInfo.Arguments.ToString()); logger.Info("Before the start"); Proc.Start(); logger.Info("After the start"); logger.Info("Before waiting for the process"); while (!Proc.HasExited){Proc.WaitForExit();} logger.Info("Now the process has exited."); output = Proc.ExitCode; ... The previous fragment of code will start another executable file when the Proc.Start() sentence is ex ...Show All
Software Development for Windows Vista Installation Directory Write Access Issue
Hi, I am a developer for a commercial program and we are working on a Vista-aware release of our product. It is a large install (6 CDs) abd is currently all put in Program Files under XP. The Microsoft suggestion of putting program executables and static data in Program Files and all other stuff in the appropriate users/... directory is not practical for our application. I have never liked that model. It makes things complex both for users and programmers. It is a road that we simply will not follow. The problem, of course, is that users don't have write access to the Program Files folder unless they explicitly and manually set it. We could require the users to do that but this is not a happy solution and we probably will not do that. W ...Show All
