JeffWoodard's Q&A profile
Visual C++ C2664 cannot convert from 'System::String ^' to '_bstr_t'
This may seem silly, but how do you convert from a managed System::String to BSTR or _bstr_t or ANY other string (const char *, etc.). This would be required to call an old COM interface from a managed C++ app. If this has already been answered I apologize. I searched but did not find anything. Helper functions and constructors and member operators have been known to help. For example in the days of MFC it was possible to just write CString("sometext") and if the compilation target was Unicode then the CString constructor would do the conversion automatically. It was possible to just w ...Show All
Visual C# some "struct" to "byte[]"
Hi people, Im new in C# and Im having some problems with language. The problem is that i have a function I want to call and one of its parameters is "byte[]" I have to pass an structure to this Byte array... let me show you... The structure is.... ****************************************************************** private struct TEXT_PROVIDER_SPECIFIC_DATA { public IntPtr dwMessageOptions; public PROVIDER_SPECIFIC_MESSAGE_CLASS psMessageClass; public PROVIDER_SPECIFIC_REPLACE_OPTION psReplaceOption; } ********************************************************************************** So in main code ...Show All
Visual Studio 2008 (Pre-release) Reload xml data
Hi, I've try to develop a xaml usercontrol, this uc has for DataSource an xml file. Programmaticcaly, I need to update this file, and visualize the updated data in the xaml obj. how can I refresh the content of the user control Thx a lot Sam (Xml)DataProvider has a Refresh method that should work for you. After updating the xml file, call this method on your provider. ...Show All
Visual Basic PROJECT FILE MODIFICATION
MY PROJECT FILE GOT MODIFIED SOMEHOW . IM WORKING WITH VISUAL BASIC EXPRESS 2005. THE COMPILER DIRECTIVES IN THE PROJECT FILE ARE LOOKING FOR 3 VISUAL BASIC FILES ON DRIVE A: WHICH IS MY FLOPPY DRIVE. I WANT TO CHANGE THE PROJECT FILE SO THAT THE FILES ARE ON MY C:DRIVE WHICH IS MY HARD DRIVE. ANY IDEAS NUMBSCULL wrote: I TRIED TO MODIFY THE PROJECT FILE WITH NOTEPAD. I INCLUDED THE FULL PATH NAME TO THE FILES ON C:DRIVE . THIS DID NOT WORK . IT CAUSED EVEN MORE PROBLEMS. I FOUND THE SOLUTION: I LOADED THE 3 VISUAL BASIC FILES ON THE A: DRIVE BACK INTO THE IDE USING THE "ADD EXISTING ITEM" ON THE PROJECT MENU. ...Show All
Windows Forms DataGridView fault or VS Designer
Hi everyone! I have a Datagridview on a base form, I have changed the Modifier Property for the DataGridView to public , but still I am not able to change the properties in child classes for that DataGridView, The same problem is with MainMenuStrip. Any help will be highly appretiated. Thanks in Advance. How are your trying to change the properties of the DataGridView I’m also a little confused by the phrase ‘child classes for that DataGridView’. Some sample code would probably clear up my confusion. Bruce Johnson [C# MVP] http://www.objectsharp.com/blogs/bruce ...Show All
SQL Server Adding numeric data to a dataflow in a scriptcomponent-> Invalid number in OLE db Command transformation
Hi there, This seems a bug to me. Or does anyone has a logical explanation that escapes me When in SSIS Designer Version 9.00.1399.00 I add output columns (numeric 4,0 ) to a scriptcomponent and fill them with valid numeric data in thescript I get a database error 'invalid number' when I use these columns in an OLE db Command-transformation . This errormessage disappears when I replaces those columns by a dataconversion to the datatype they originally have. Derived Column Name Derived Column Expression STATUS_DEF Replace 'STATUS_DEF' (DT_NUMERIC,4,0)STATUS_DEF Maybethis info is usefull for somebody else who ...Show All
Windows Forms 121 PictureBoxes slow my app. Help me optimize?
I'm developing a program that uses 121 pictureboxes on one form and when I run the program, it is rather slow. I haven't even coded yet! If I try to move the window, the contents get especially choppy. It's even worse if I'm moving the app and it hits the edge of the screen. Plus, my pictureboxes all need to have transparent backgrounds. That slows my app even more. I know that the alternative is having one big picturebox and using the Paint event. I've tried that back in Visual Basic 2003 and it was a total nightmare. Can anyone help me optimize my app so that all the pictureboxes don't slow it ...Show All
Windows Forms ListView Flicker when displaying realtime data and EnsureVisible
Hello, I am using a ListView in .NET 2.0 to display some realtime data. I need the data to scroll up as new data is added. I am using EnsureVisible to force the scrollbar to the end after I have added an item. I perform the add and scroll within a BeginUpdate()/EndUpdate() pair. The problem is that once the data fills the screen and begins to scroll I get significant flicker especially if I have the UI maximized. I have tried deriving from ListView and setting the DoubleBuffered property to true in the Constructor after InitializeComponent but this does not seem to help. How can I get the desired effect without experi ...Show All
SQL Server multiple calls to SP
Hi group, I've got a performance issue. Here's in global what the sp (Let's call it SP_A) does. Step 1 Call a different SP (Lets call it SP_B) and store the output in a variable Step 2 SP_B runs a select statement that returns 1 value Step 3 SP_A uses this value as a parameter in a select statement. Step 4 The result of the SP_A is the result of the select statement (744 rows (always)) All tables used in SP_A and SP_B are temp tables. Total performance of SP_A is between 0.090 and 0.140 seconds. The problem is that this SP is called 180 times from outside SQL server. That means that the total processing time is somewhere between 21 and 25 se ...Show All
Windows Forms Selecting blocks of cells - determining topleft/bottom right + restricting to contiguous
Mark, good work, thanks, got me up and running very quickly. Any ideas on restricting the selected cells to a contiguous block. If they are not a contiguous block I can enumerate SelectedCells and equate Selected to false then equate CurrentCell.selected to true. What I need is the test for whether the selection is contiguous - ie all connected together. The simple test is if GetCellCount / 2 is an integer or GetCellCount = 1. However, theres a couple of other conditions like if all the selected cells are in one row or all selected cells in one column. Just wondering if there's an easy way Related qu ...Show All
Smart Device Development Visual Studio 2005 Standard or Professionl
Hi all Coming from J2ME and Symbian worlds, I would like to learn and develop apps in Windows Mobile. What are the differents between Standard and Professional version of Studio 2005 in regards with Windows mobile developments For mobile developments, are these two versions having similar deployment tools Many thanks in advance for the info For standalone mobile applications without deployment support Std is as good as Pro. Since it’s all subjective, consider getting evaluation copy (Beta 2 for now) of VS Std and see if it’s good enough for you before you buy. ...Show All
Visual Basic convert VBA to VB
hi, I am using VBA to use Microsoft Word functions of open/save file. My code works perfectly. But I found I have to open Microsoft Word in backend in order to run my code successfully. I wonder if it is possible that I could translate this piece of VBA code to a standalone VB program so that I can run it without Microsoft Word thanks, Michael Ji If you post the code, i'm sure most of us here can convert it. I've never used any porting programs, i like to do my own conversions. But there might be a program to port vba to vb, as they are really similar. Dustin. ...Show All
SQL Server small scale (light weight) SQL search engine (basically a stored procedure) to search through Products Table
Hi, I am attempting to build a small scale (light weight) SQL search engine (basically a stored procedure) to search through Products Table. I am passing a search string, which i break up by the ' ' (space) delimiter. next for each [value] (after breaking up) in the search string I want to be able to count the number of occurences of each [value] in the [ProductName] [ProductDescription] fields of the [Products] table. However I am confused as if its even possible. We can count the number of rows(or products) that contain the [value] in either of the [products] data table fields but i don't know if its possible to count the number of occuren ...Show All
Windows Forms DataGridViewButtonColumn does not render?
What's the trick to making a DataGridViewButtonColumn render correctly in a DataGridView control I've added the column and set the text property and can even click the cell and cause the cell clicked event to fire but all I see is a blank white cell. Any ideas Thanks. It seems that your button column has its FlatStyle set to FlatStyle.Popup. Consider changing it to FlatStyle.Standard. Here is a sample of a data grid view which contains 2 button columns: the first button column has FlatStyle set to Popup and the second button column has FlatStyle set to Standard. Hope this helps. namespace WindowsApplication1 { partial class ...Show All
Visual Studio Team System How to create a Regular Expression in Data Generator?
Hello everybody, it's a GREAT feature I can create a random text field using a Regular Expression, but.... HOW can I specify a regular expression The syntax and operators we support so far is the following: . \ () {n} { n,m } {n,} * + | [a-kmoxA-E0-9] [^aeoui] Some useful regular expressions are like: 206\-[2-9]{3}\-[0-9]{4}|\(425\)\-[2-9]{3}\-[0-9]{4}|604\-[2-9]{3}\-[0-9]{4} [a-z]{6}[0-9]{0,5}@(microsoft\.com|hotmail\.com|msn\.com) [1-6]{1}[0-9]{1,3} (SE|NE|NW|SW){1} [1-2]{1}[0-9]{1,2}th (ST|CT|PL|AVE){1}\, (Redmond\, WA ...Show All
