The Samster's Q&A profile
.NET Development Binding Data retrieved from text file to textbox
In my following code example everything is running peachy except for when I'm trying to tie results[l] = rprtARR .ToString() I keep getting a null exception. I tried declaring string[] results = null; but that did no help to me. Obviously I'm a novice but I've been working my way through this thing. I am coming from developing in Visual Basic so I'm pretty rough around the edges. Thanks in advance for the help and here is the code: private void panelComboBox_SelectedChangeCommitted(object sender, EventArgs e) { using (StreamReader sr = new StreamReader(@"C:\LS.rpt", Encoding.GetEncoding(437))) { char delim = ' '; string entry; string panel = panelComboBox.SelectedItem.ToString(); st ...Show All
Visual C++ Is this ISO C++ conformant?
I wrote the following simple program and could build it happily. #include <stdio.h> #include <conio.h> int main() { int i; printf("Integer please>"); scanf_s("%d",&i); _getch(); } I have two questions about this code. First, is this code 100% ISO C++ conformat I could build this, with language extensions disalbed. Second, is the _getch() function always thread -safe Thank you very much. Thank you, einaros. I really appreciate your comment! extensions disalbed. =>The syntax is conformant, but scanf_s is not part of the standard string library. That's a =>Microsoft addition to the runtime library, AFAIK. The fact is that I could build this with lang ...Show All
Visual Studio Express Editions VB Password Generator Help
Hello there! At the moment, I'm trying to write a password generator in VB express. My plan was to use the textbox.text.replace command and use ("a", "z") and ("b", "y") but this would take ages and for some reason it doesn't work. Any ideas I'm hoping for a password generator that will come out the same each time so I don't think random will work. My idea was to have two textboxes, one with the original password then the next with the encrypted password. A drop down box might be good as well, one that saved all previous entries. ...Show All
Visual Studio Team System VSTS - Implementation Consulting / Training
Hi, Does anyone know of a company in south India selling VSTS implementaiton and training services. I have tried a number of vendors in Chennai and Bangalore that I pulled off the Microsoft Directory but they are not on top of this technology to help me out. Microsoft's call centre in New Delhi were not a great resource on this. Thanks, Trevor Hello, Please help me with your contact details and will discuss how best we can assist you in this VSTS initiative. I work as Technology Specialist for VSTS based out of Bangalore and would like to extend all the possible help thru our set of VSTS Solution Partners. Regards. S S Ramakant ( ssrama@microsoft.com ) Mob :: 988 600 3476 ...Show All
Visual Studio 2008 (Pre-release) Custom WPF text editor
I'm not looking for a solution to my problem. I am just interested in any expert's opinion on a matter of a custom text editor using WPF. I developed a basic Winforms text editor to replace the RichTextBox. The detailed reason why I did this is beyond the scope of this message, but to sum it up I needed a custom control that could support being rendered at non-standard resolutions (without blur) such as 371x529. This was easy to do using transforms. I have not yet developed much with WPF, but I have been studying it for several days now, and it looks very powerful. It appears I may be able to develop a better custom text editor using the following classes: TextFormatter TextSource I've downloaded the SDK and looked through all ...Show All
Windows Live Developer Forums Layers on and off
I am develpoing a map that contains many pushpins in a small area. I would like to turn them on and off by using checkboxes. Doe anyone know how to go about this So far this is what I have come up with. I can turn more than one layer on but I can't turn them off. This is my code: <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src=" http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script > <script> var map = null; var layerid=1; function GetMap() { map = new VEMap('myMap'); map.LoadMap(new VELatLong(45.443452, ...Show All
Audio and Video Development js file not Big Endian
I wrote some javascript to test out in the iHD simulator. When I try to play the content I get the error: "Script is not Big Endian" I haven't heard a reference to big endian storage since my mainframe days. Do I need to convert my javascript to big endian And if so how do I do that on an XP box Bad Analog wrote: Per the HD DVD spec, all JavaScript files must be UTF-16, Big Endian (with BOM). XML files can be UTF-8 or UTF-16 and should include which encoding they're using in the XML header. Right. I usually use Notepad to convert one encoding format to others. ...Show All
Visual Studio Express Editions format integer to XXX
i have an integer field with maximum size of 3, that is "000". when user inputs a value that is less than 1000, i accept it and format it to a string like: 005,010, 025, 380, 669 is there a builtin function can do this in C#.net 2005 or i have to do it myself please help and be more specific in code Because it's typecasted as an object since the DataGrid has no idea what could be put in there. If you know that it is an integer you can actually type cast it as an integer. If it were a double or a decimal - same thing just have to use the specific type of data type. staff_noLabel2.Text = ((Int32) staff_no).ToString("000"); much more conscice. ...Show All
Visual C# How to read a float from a Big Endian binary file.
I have a binary file written in big endian. Scattered within the binary file, there are 4-byte floats that I wish to read. I can't use methods like ReadSingle() since it is in big endian format. The only thing I have found to solve this is to read it in one byte at a time...reverse the order of the array...write it out using BinaryWriter and read it back using BinaryReader.ReadSingle() from the temp file. This seems to have a lot of over head...is there a better way to do this (I tried the way below but did not work) Thanks. -JRozak FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open, FileAccess.Read);BinaryReader r = new BinaryReader(fs); float x=(float)IPAddress.NetworkToHostOrder(r.ReadUInt32()); ...Show All
Visual Studio Team System suggestions for VS DB Pro....
Greetings, I attended the launch event for VS DB Pro today in Ft. Lauderdale, FL, and here are some suggestions I had for future versions of the product: For the SQL Editor: Detect unused parameters or variables in SQL objects (SP's, Functions, etc.) Automatically add 'dbo.' (or schema name of your choice) to all object references in SQL code. Automate SQL layout standards such as indentation and uppercase for SQL keywords. Encapsulate SQL script into a stored procedure/function. For the Database Refactors: get rid of deprecated or inefficient SQL constructs and replace them with the recommended ones: (SET ROWCOUNT to TOP, SQL-89 JOIN syntax to SQL-92, EXEC() to sp_executesql, adding WITH keyword to table hint ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA GSE and Vista
So here's a quick question. I'm pretty sure it's been asked before but none of the combinations I can think of give a definitive answer for me. I'll make this one quick and to the point. Are there any known compat issues with GSE and Vista RTM (currently using Vista Business). Let me know I have gotten XNA to work with Vista RTM. That being said I am experiencing some performance issues. My code is "jerkey" ( at least in debug mode ). While I am staunch advocate of Microsoft tools and technologies the axiom "be weary of 1.0 versions of Microsoft Products" definetly holds true for me. Despite the cleanliness of the XNA Framework I am considering switching back to DirectX ( December 2006 ) for performance reas ...Show All
Windows Forms Making buttons work
Hi! I am totally new to C++ and I do not know how to make an "Okay" go to a different form. Please Help! thank You! :) Project + Add New Item, select the Windows Form template. Then modify your original main form's header file like this: #pragma once #include "Form2.h" ... System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { Form2^ f2 = gcnew Form2; f2->Show(this); } Here are some walkthroughs . Chris Sells' Programming Windows Forms is recommended too although it's for the wrong language. Using C++ for UI programming is a bit of a dead end... ...Show All
Internet Explorer Development IWebBrowser2::ToolBar property not working under IE7
My web application installs a client-side control that uses the IWebBrowser2::ToolBar property to enable / disable the IE menu bar and toolbars. Under IE7 RC1 this works if my application is running in the _only_ IE7 tab; but if other tabs are open enabling / disabling toolbars has no effect. I can see why the tab bar isn't being hidden with more than one tab open, but not why other toolbars are not -- seems like they should be enabled / disabled as appropriate for the active tab (the IWebBrowser2::MenuBar property _does_ appear to work this way). Thoughts Suggestions for a workaround Thanks! Hi, I have developed a BHO which upon Alt-clicking a word anywhere in the browser, pops a translation site ...Show All
Windows Forms Correct way to "Close" a design surface?
What is the correct way to implement "Close" for a design surface For example, if the surface was created as a child of a panel and you wanted to remove it to add a new one into it, would you just clear the Controls collection of the panel or call the existing surface's Dispose() method I ask because when I have a surface with a modest number of controls in it (15+), Disposing it takes several seconds as I can see each control get removed individually. It's much quicker if I don't call the Dispose (before or after removing it from its parent control), but I'm not sure this is the best thing to do. It turned out that just removing my UndoEngine before disposing of the DesignSurface was not en ...Show All
Commerce Server Tax Calculations
I am looking for a sample pipeline Component to caculate tax. I don't need very advanced tax calculations just 3 states with a flat tax and all my products are taxable. Any assistance would be greatly appreciated. Hi there, while we don't have a tax component sample the SDK includes a sample pipeline component implementation. You can use this sample as a starting point in providing your tax calculation logic. At the very basic level, you would need to get the state code from a dictionary item that is passed into the pipeline component, and then run a branching logic to calculate the specific state tax. Hope this helps! Thanks, Caesar. ...Show All
