Md s's Q&A profile
Windows Forms Custom events witch object type propertys
I am making a user control where 3 of the propertys are of the type Voltage, witch is a self defined object. consisting of a float and a enum. When one of the voltages changes I want to trigger a custom event to notify the program about this change. I though I could do that like a normal attribute like this: public partial class Switch : UserControl .... private Voltage a= new Voltage (); .... public Voltage A { get { return a; } set //This is never reached if I change a value like Switch1.A.volts=10. { if (a != value ) { a = value ; OnVoltageChanged( new SwitchEventArgs ( this , state, a, b, c)); } } } .... public event Switc ...Show All
Visual Studio This shouldn't be this tough ... ReportViewerControl Web Forms
I have implemented the following custom authentication code from MSDN: Imports Microsoft.VisualBasic Imports Microsoft.Reporting.WebForms Imports System.Security.Principal Imports System.Net Partial Class psm_moc_reports Inherits System.Web.UI.Page Public Class ReportServerCredentials Implements IReportServerCredentials Private _userName As String Private _password As String Private _domain As String Public Sub New ( ByVal userName As String , ByVal password As String , ByVal domain As String ) _userName = userName _password = password _domain = domain End Sub Public ReadOnly Property Imper ...Show All
.NET Development Conference app
I want to create a conference software. I'm new to C#, I've worked until now with Visual Basic 6, Java and C++. The basic modules are: - video module - audio module For the video part I managed to sort it out... take pictures at every 10-20 ms with the webcam, save them and then send the files to the other end. Now the next thing... how can I send audio streams between 2 computers I'm thinking at the following algorithm: record 10 seconds then save it as a wav file and send it to the other end, but I think this is a rudimentary method and also I want to create the conference in real time . Can you suggest me something I just need a little push meaning some links that I could study. Thanks in advance. Thank ...Show All
SQL Server Question on parameter.Add for an SQL Insert
I'm trying to update my database table from my dataset. In the following statement, the represents the "size as integer" of the SqlDbType of DateTime and I can't fiqure out what to put there. command.Parameters.Add( "@ItemDate" , SqlDbType.DateTime, , "ItemDate" ) In the following statement I understand the "50" since it is the size of the field, but I don't understand what to do with the DateTime. command.Parameters.Add( "@ItemText" , SqlDbType.NVarChar, 50, "ItemText" ) Thank you for your help This chart might help: http://www.carlprothman.net/Technology/DataTypeMapping/tabid/97/Default.aspx Buck Woody ...Show All
Visual Studio Express Editions how to modify a timer?
hi all, i found this simple timer on http://www.developer.com/lang/other/article.php/792901 5: using System; 6: using System.Timers; 7: 8: class myApp 9: { 10: public static void Main() 11: { 12: Timer myTimer = new Timer(); 13: myTimer.Elapsed += new ElapsedEventHandler( DisplayTimeEvent ); 14: myTimer.Interval = 1000; 15: myTimer.Start(); 16: 17: 18: 19: 20: 21: } 22: 23: pub ...Show All
Audio and Video Development Windows Media Player 11 Destroys ID3 Tag of Mp3 files (Caught Red-handed)
I have suspected this problem for a long time. But, have no proof until today. The bug in Windows Media Player 11 is that if you open a group of mp3 files and play it in "Now Playing", stop, don't close and don't touch WMP11 for 2 hours, you will find that all information in ID3 Tag of these mp3 files are destroyed. They becomes blank. At first, I have no proof. But, the problem have been replicated today. I caught it red-handed. WMP11 is a great improvement and a breakthrough right now. But, this kind of flaw is unacceptable. Someone on the development team should investigate this to solve this bug. Thanks. was the id3 tag bug ever fixed, i'm using the latest version as of today and it just happened to me...grrrr. All tag ...Show All
Smart Device Development Problem detecting mobile device processor type via RAPI
Hi! I am writing an installation program (in C#, VS2005) which is installing CAB file using Active Synch manager on the pocket pc device (Windows Mobile 2003 SE, Windows Mobile 5.0 and Windows CE 5.0). App has to install .Net CF 2.0 and SQL Server Compact Edition (Mobile) CABs on the device. I am using RAPI to communicate with device. In order to install appropriate CAB files, I have to detect device processor or Instruction Set ID as outlined in the “Creating an MSI Package that Detects and Updates the .NET Compact Framework” article. But it seems that RAPI is not capable to do it. And it is very difficult on Windows Mobile and CE 5.0 (for security reasons) to run dll on the device. Is it any other ...Show All
Smart Device Development Creating Single Insatance Application in SmartDevice Application
Hai, I have created DeviceApplication present under Visual C#\SmartDevice\Windows Mobile 5.0 Pocket PC.The out of this is an exe.I want to make this exe to have single insatnce i.e if one instance is running,if u click on that exe for multiple times it must not new instances,instead it must pop-up some message.I have developed the exe in .NET 2.0 version.I tried to do fix the problem using mutex,but it did not work.Another approach is to derive a class from the WindowsFormsApplicationBase class in the Microsoft.VisualBasic.ApplicationServices namespace and set IsSingleInstance property.Can anyone explain how to do this for Smart Device Application.I found that GetProcessByName ...Show All
Visual Studio How do I use a dataview to sequence a report with a dataset source
Currently I set the DataSource as follows and everything works great. Dim ReportDataSource1 As ReportDataSource = New ReportDataSource Dim DataTable1BindingSource As System.Windows.Forms.BindingSource = New System.Windows.Forms.BindingSource() DataTable1BindingSource.DataMember = "Header" DataTable1BindingSource.DataSource = dataset ReportDataSource1.Name = "LastOrderDS_Header" ReportDataSource1.Value = DataTable1BindingSource ReportViewer1.LocalReport.DataSources.Clear() ReportViewer1.LocalReport.DataSources.Add(ReportDataSource1) Me .ReportViewer1.RefreshReport() How would I code the above to use the defalutView of the LastOrdersDS_Header table thanks ...Show All
Visual Studio Express Editions FTP Uploading
hi. i just wanna know the code for uploading a file usnig an ftp, a code that will let me enter the server, password, username, and the file to be uploaded. tanks the link you need to put there is the website/ftp url you wish to upload the file to and including it the filename you wish to name it to. Example if I had a file on my computer called "text.txt", and I had an ftp site called "myftp.com", then I want to upload it to that ftp site and name the file to "text.txt", I would enter this: ftp://myftp.com/text.txt this will upload the file to the ftp site in a file called text.txt ...Show All
SQL Server SQL Server Log Viewer
Hi I've noticed that when a DB gets dropped there is no entry added in the Server log. However when you create a DB it and all its options are logged. e.g. Setting Multi User option On for database 'myDB'. How can I get an Event like Drop myDB added to the SQL Server Log when it happens short of tracing events with Profiler, I'd prefer to look in the logs for this sort of important event. Any input is appreciated! If you are on SQL Server 2005 you can implement a DDL Trigger for this, otherwise you will have to investigate the logs of the master db with a thrid party log reader. HTH, jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Visual C# ep File User Access Rights - Critical!
Hi All, I want to get all the access rights on a file for a particular user. I was able to do so using the WindowsIdentity method, but this requires unsafe code, for the constructor WindowsIdentity(IntPtr userToken). We acquire the userToken using the Win 32 API LogonUser(userName,password,domainName). I dont want to use the unsafe code method for this purpose due to some constraints. I wanted to know how can we get all the access rights on a file for a particular user. Thanks in advance :) -Sandeep Hi Peter, Thanks for your help! Can we get the same functionality using the Cacls (command) utility I want to get complete access rights for a file for a particular user. This will include ...Show All
Visual C# why am i getting this error?!!
I have an application which monitors a database table and it works fine for more than 48hours sometime but then I will get this error on my desktop.. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject ...Show All
.NET Development How to Load Xml data into SqlServer Table
Dear All i created a button on myForm.cs and write following code for it ... ds = new dataSet adapter.fill(ds,"tab"); ds.WriteSchema("xmlSchema"); ds.writeXml("xmlFile"); schema and xml file successfully created, now i want to send these files to another city where i want to read these files and update (insert new records from xml) database, for that i write following code dataSet.readSchema("xmlSchema"); dataSet.readXml("xmlFile"); data from xml successfully read (loaded) to dataSet, but i dont know how to write dataSet data into myDatabase could you please guide me using same solution or any alterntive Thanks Sorry Suppose i developed a software for a co ...Show All
Visual Basic How can we see other applications open in windows and know when they are minimized or maximized
Hi everyone I need to know if there is a way i can see other applications open in windows and know when they are minimized or maximized. So basically if there are five applications open like outlook, excel, word, a bowser, etc. How can i see this in vb.net code Is it possible then to know when that form is minimzied or maximized (event) Thanks in advance :) You can actually get notified when a window is about to be minimized or maximized. You will need to use the SetWindowsHook procedure to install and listen to a WH_CBT_Hook. Here's the general information about WIndowsHooks: http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Hooks/AboutHooks.asp Here's ...Show All
