Is there a way to engage with developers in Cape Town?
Leon v Wyk
Is there a way to engage with developers in Cape Town?
Leon v Wyk
I am trying to register a multi dotted extension into windows explorer Shell context menu (Win XP). I have a custom Excel 2003 (.xml) file that I have given a multi dotted extension like "fileName.matrix.xml". The idea is that if a user does not have the custom editor (application), it will open with Excel, which it currently does. But if the user has installed the custom editor application and I have registered this .matrix.xml file extention, it will open with the custom application. I do not what to register the .xml to open with the custom editor only if it is a .matrix.xml Here is the Regedit script I have so far, but does not work.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.matrix.xml]
@="SODA.Matrix Customizer"
[HKEY_CLASSES_ROOT\SODA.Matrix Customizer]
@="SODA Matrix Customization File"
[HKEY_CLASSES_ROOT\SODA.Matrix Customizer\DefaultIcon]
@="C:\\Program Files\\SODA\\SODA Matrix Customizer.exe,0"
[HKEY_CLASSES_ROOT\SODA.Matrix Customizer\Shell]
[HKEY_CLASSES_ROOT\SODA.Matrix Customizer\Shell\Open]
@="Open with SODA's Matrix Customization Tool"
[HKEY_CLASSES_ROOT\SODA.Matrix Customizer\Shell\Open\Command]
@="C:\\Program Files\\SODA\\SODA Matrix Customizer.exe %1"
Leon v Wyk
I have datagrid with a dataset set as the DataSource. I have added a X number of tables to the dataset, but when I view my datagrid it shows all the tables in the datagrid but I can only view the first table. The other tables don't show when I click or navigate onto them. How do I get it to open or view the other tables? DataSet dataset = new DataSet("Sms Report"); dataset.Tables.Add(sendItemsTable); packagesTables = new DataTable[sendItemsTable.Rows.Count]; for(int i = 0; i < distinctPackagesTable.Rows.Count; i++) { packagesTables[0] = //..Data that I query; } if(packagesTables.Length > 0) dataset.Tables.AddRange(packagesTables); dataset.AcceptChanges(); dataGrid.DataSource = dataset; dataGridStyle1.MappingName = dataGrid.DataMember; dataGrid.Expand(0);
Leon v Wyk
I am working on a FTP client that works great but when I use file drop from windows explorer the application crashes and ends. The error breaks at the Application.Run(new Mainform); and gives me the following error: "An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in system.windows.forms.dll Additional information: External component has thrown an exception." If I put a try catch around that I get this error message Exception.Message = "External component has thrown an exception." I am using Visual Themes and are sure that that is the problem. [STAThread] static void Main() { try { Application.EnableVisualStyles(); Application.DoEvents(); Application.Run(new MainForm()); } catch(Exception Ex) { MessageBox.Show(Ex.Message,"Runtime Error.",MessageBoxButtons.OK,MessageBoxIcon.Error); } }
When I take the EnableVisualStyles(); out it works fine. Also when I do a file drop, my progressbar losses the Visual Theme. How do I get around this and still use the Visual Themes? Here is my Drop code: private void listView1_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { if( e.Data.GetDataPresent(DataFormats.FileDrop, false)) { string[] files_str = (string[])e.Data.GetData(DataFormats.FileDrop); foreach(string file_str in files_str) { FileInfo droppedFile = new FileInfo(file_str); if(droppedFile.Exists) { UploadFile(droppedFile); } else if(droppedFile.Directory.Exists) { DirectoryInfo droppedDirectory = new DirectoryInfo(file_str); if(droppedDirectory.Exists) { UploadDirectoryChanges(droppedFile.Directory); } } else { MessageBox.Show(file_str +"\nis not recognized as a valid file drop.","Unsupported File drop!",MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }
Leon v Wyk
I wrote a Ftp client that works great on a Win2K - UNIX Type: L8 (Serv-U FTP-Server v2.5i) box but not on a Linex or Unix box. Here is the Reponse from the Unix Server [UNIX Type: L8 (FTP server Version wu-2.6.1(1))]: -rw------- 1 visual visual 6035 Dec 1 14:29 .bash_history -rw-r--r-- 1 visual visual 24 Sep 12 2003 .bash_logout -rw-r--r-- 1 visual visual 230 Sep 12 2003 .bash_profile -rw-r--r-- 1 visual visual 124 Sep 12 2003 .bashrc -rw-r--r-- 1 visual visual 688 Sep 12 2003 .emacs -rwx------ 1 visual visual 13822 Mar 3 2004 .ezmlmwebrc -rw-r--r-- 1 visual visual 29 Sep 12 2003 .forward -rw-r--r-- 1 visual visual 29 Sep 12 2003 .qmail -rw-r--r-- 1 visual visual 80 Jun 18 2004 .qmail-default -rw-r----- 1 visual mail 4605 May 4 08:41 passwd.cdb and here is the list from the Win2K [UNIX Type: L8 (Serv-U FTP-Server v2.5i)] drwxrwxrwx 1 user group 0 May 17 17:42 . drwxrwxrwx 1 user group 0 May 17 17:42 .. drwxrwxrwx 1 user group 0 Sep 29 2005 _hide drwxrwxrwx 1 user group 0 Apr 21 09:47 bin drwxrwxrwx 1 user group 0 Sep 29 2005 cgi-bin drwxrwxrwx 1 user group 0 Sep 29 2005 CheckDomain drwxrwxrwx 1 user group 0 Apr 21 09:47 Clients -rwxrwxrwx 1 user group 10490 Apr 20 16:04 clients.htm -rwxrwxrwx 1 user group 10596 Apr 20 16:04 clients2.htm drwxrwxrwx 1 user group 0 Sep 29 2005 Config -rwxrwxrwx 1 user group 4279 Jan 17 09:49 contact.htm -rwxrwxrwx 1 user group 6562 Apr 20 16:04 contact_us.htm drwxrwxrwx 1 user group 0 May 17 12:44 Downloads drwxrwxrwx 1 user group 0 May 5 13:46 flash -rwxrwxrwx 1 user group 8659 Apr 20 16:12 hosting.htm drwxrwxrwx 1 user group 0 May 11 10:11 images -rwxrwxrwx 1 user group 5848 Apr 20 16:04 index.htm -rwxrwxrwx 1 user group 361 May 17 12:08 LaConcordeTester.htm drwxrwxrwx 1 user group 0 May 9 10:56 laservice -rwxrwxrwx 1 user group 56 Nov 28 18:29 layout.css -rwxrwxrwx 1 user group 3028 Apr 20 16:04 map.htm -rwxrwxrwx 1 user group 6834 Nov 28 18:29 portfolio.htm -rwxrwxrwx 1 user group 4296 Nov 28 18:30 portfolio_flash.htm -rwxrwxrwx 1 user group 4211 Nov 28 18:30 portfoli
This is not perfect but it works. namespace id3 { using System; using System.IO; using System.Text; class FileCommands { public static void GetMP3Tag (ref MP3 paramMP3) { try { // Read the 128 byte ID3 tag into a byte array FileStream oFileStream; oFileStream = new FileStream(paramMP3.fileComplete , FileMode.Open); byte[] bBuffer = new byte[128]; oFileStream.Seek(-128, SeekOrigin.End); oFileStream.Read(bBuffer,0, 128); oFileStream.Close(); // Convert the Byte Array to a String Encoding instEncoding = new ASCIIEncoding(); // NB: Encoding is an Abstract class string id3Tag = instEncoding.GetString(bBuffer); // If there is an attched ID3 v1.x TAG then read it if (id3Tag .Substring(0,3) == "TAG") { paramMP3.id3Title = id3Tag.Substring( 3, 30).Trim(); paramMP3.id3Artist = id3Tag.Substring( 33, 30).Trim(); paramMP3.id3Album = id3Tag.Substring( 63, 30).Trim(); paramMP3.id3Year = id3Tag.Substring( 93, 4).Trim(); paramMP3.id3Comment = id3Tag.Substring( 97,28).Trim(); // Get the track number if TAG conforms to ID3 v1.1 if (id3Tag[125]==0) paramMP3.id3TrackNumber = bBuffer[126]; else paramMP3.id3TrackNumber = 0; paramMP3.id3Genre = bBuffer[127]; paramMP3.hasID3Tag = true; // ********* IF USED IN ANGER: ENSURE to test for non-numeric year } else { // ID3 Tag not found so create an empty TAG in case the user saces later paramMP3.id3Title = paramMP3.fileFileName.Substring(0,paramMP3.fileFileName.LastIndexOf(".")); paramMP3.id3Artist = ""; paramMP3.id3Album = ""; paramMP3.id3Year = ""; paramMP3.id3Comment = ""; paramMP3.id3TrackNumber = 0; paramMP3.id3Genre = 0; paramMP3.hasID3Tag = false; } } catch { // ID3 Tag not found so create an empty TAG in case the user saces later paramMP3.id3Title = paramMP3.fileFileName.Substring(0,paramMP3.fileFileName.LastIndexOf(".")); paramMP3.id3Artist = ""; paramMP3.id3Album = ""; paramMP3.id3Year = ""; paramMP3.id3Comment = ""; paramMP3.id3TrackNumber = 0; paramMP3.id3Genre = 0; paramMP3.hasID3Tag = false; } } public static void UpdateMP3Tag (ref MP3 paramMP3) { // Trim any whitespace paramMP3.id3Title = paramMP3.id3Title.Trim(); paramMP3.id3Artist =
Thank you so much! How do I send variables to the method that I invoke? private delegate void NewSMSReceived(); protected void OnNewSMSReceived() { int Position = 1; Solutions.Gsm.Modem.SMSMessageReceive SMS = Gsm.ReadSms(Position,true); SMSReceivedForm NewSMS = new SMSReceivedForm(SMS); NewSMS.ShowDialog(); } private void Gsm_NewSMSReceived(object sender, Being.IT.Solutions.Gsm.Modem.NewSMSEventArgs e) { lbInfo.Text = "New SMS received @ "+ DateTime.Now.ToString(); Solutions.Multimedia.SoundPlayer.Play(Application.StartupPath+@"\NewSMSNotify.wav"); //e.StoragePosistion this.BeginInvoke( new NewSMSReceived( this.OnNewSMSReceived) ); }
Leon v Wyk
I developed a SMS application, I use a timer to pool the modem every now and then for new responses if a response is found I launch an ResponseReceived event, then that event looks for the type of response, then when a new message is detected I launch the NewMessageReceived event from the ResponseReceived event. The main application receives this event and opens a new dialog window, but the problem is that it does not show the window. I can see the window in the taskbar but not on the screen. I tried forcing the window to show, go topmost, maximize, every thing, but no window. I suspect that this could be due to threading of the timer or something, can anyone help? Leon v Wyk
I need to know how to get a specific pixel's color on a panel, lable or image??? Leon v Wyk
You need to check what version you are using becauce the commands changed completely between the two? If you have installed media player 9 it will over write the exiting componet the came with VS. Here is a sample of the older version which I think is the one that you have got! private AxMediaPlayer.AxMediaPlayer VideoScreen; VideoScreen = new AxMediaPlayer.AxMediaPlayer(); string FullPathAndFileName = @"C:\MyVideo.avi"; VideoScreen.FileName = FullPathAndFileName; VideoScreen.Play(); Hope this helped Leon v Wyk
I need to Export Fields in a table into another Database Table on a Remote machine, at the moment I Export the records one by one and delete the records as I go along. This is very slow over a 28k connection that I need to use.(3 records per second or so, I am dealing with 1000s of records) I would love to take all the records at once, dump the on the remote machine and then delete the lot! I can make use of a Dataset to get all the records but how do I specify what and how to export this to another connection???:confused: Leon v Wyk
foreach(string x in Dirs) { labelPath.Text = labelPath.Text + x + "\n"; } \\the "\n" is for newline! if you want a new line! Leon v Wyk
I need to Export Fields in a table into another Database Table on a Remote machine, at the moment I Export the records one by one and delete the records as I go along. This is very slow over a 28k connection that I need to use.(3 records per second or so, I am dealing with 1000s of records) I would love to take all the records at once, dump the on the remote machine and then delete the lot! I can make use of a Dataset to get all the records but how do I specify what and how to export this to another connection???:confused: Leon v Wyk
I am not much of a Web Developer but code in C# and there is nearly no difference between the interaction of Access and SQL, the statements are about exact. I use to love Access but since I have use SQL for the last 7 months I will never go back to Access unless I have no other choice. Hope you come right, I am sure you will see the benefits in SQL just like I did. Cheers, Leon v Wyk
Short and Sweet: "this" refers to the class in which you are typing the word "this" in. It just specifies that you are working with THIS class and not any other class the you refernse to, just the one were you are currently coding in.... public class OtherClass { string MyVar = "OtherVar"; public OtherClass() { } } public class MyClass { string MyVar = "YourVar"; public MyClass() { string OUTCOME = this.MyVar //is anything in MyClass, nowhere else } } the OUTCOME would be "YourVar"; Leon v Wyk
Under your references in your solutions explorer (right click) add a new reference to System.Web That will help! Leon v Wyk
I had a quick look at the SendKeys class but can you use that to send it remotely, I think that was what you wanted to do. I am also looking for remote components to can control terminals across a tellephone line, I found some cool stuff, but not key strokes or mouse events... Let me know if you need any other stuff... Leon v Wyk
I need to determine the amount of records in a database table without looping through the tables records one by one, that seem to be very slow over a 33kbps connections if you got 20,000 records??? Leon v Wyk
Use the MouseUp Event for the TreeView and get the current mouse position. Then you can Use the TreeView.GetNodeAt(X,Y), here follows the code. The TreeView was called FolderTreeView! private void FolderTreeView_MouseUp (object sender ,System.Windows.Forms.MouseEventArgs e) {//MouseButton Released try { //Select the Node Under the Mouse Cursor as Current Node FolderTreeView.SelectedNode = FolderTreeView.GetNodeAt(e.X,e.Y); } } Leon v Wyk
I need to be able to see the status a printer ie. Paper Jammed, On-Line, Off-Line etc. but have got no idea were to start looking?