Ravel's Q&A profile
Visual C# extracting data from comma delimited string
hi, im using c#, have a comma delimited string and i wish to split it. string example is: john smith, freddy, mark/,jones, john i don't wish to split where a comma is backslashed. any ideas thanks. andrej, your latest code gives me this: TechRepublic.com CNET.com News.com Builder.com john/ smith GameSpot.com any ideas ...Show All
Windows Forms I have to remove a databinding at runtime
Hi all, I need to remove a label's databinding at runtime and immediately add a new one. I tried to use lblMyDatabindedLabel.DataBindings.Remove and .Add but I'm not able to do this thing. What I have to do in order to solve this issue Thanks in advance. Perfect! It works. After using .Clear method, I added the following: lblMyDatabindedLabel.DataBindings.Add("Text", MySourceBindingSource, "fieldname") Thank you very much. ...Show All
Visual C++ Compiler Warning (level 4) C4428
I am getting the C4428 warning with this line of code: /************************************************************************************* *To include any Unicode character in a string, locate the character in * *http://www.unicode.org/charts. The standard encoding of characters from large * *character sets into the smaller set supported directly by C++ is presented as * *sequences of four or eight hexadecimal digits: * * \UXXXXXXXX * * \uXXXX * *Here, X represents a hexadecimal digit; e.g., \u1e2b. The shorter notation \uXXXX is* *equivalent to \U0000XXXX. A number of hexadecimal digits different f ...Show All
.NET Development Dynamically remove textbox
I created textbox dynamically. i would like to remove them dynamically. ie i created one checked list box that will display some items. if user checked the item i would like to create a textbox and user unchecked it i like to remove the textbox. how do i do. pls help. thanks in advance. I need code sample. Thanks Arun Hi Arun, When you dynamically add a control to a form, you should always add the control to the Controls collection of the form (this will ensure proper cleanup of all references when the form closes). To remove a control from the form, you can simply remove it from the controls collection. Here's an example (it's in C#, let me know if you need a VB sample): ...Show All
Smart Device Development How do I manually deploy the CF2 to my PPC?
I tried running the Microsoft installer and although it starts the installation on my PPC (running Windows Mobile 5.0), it never actually installs the Framework. Is there a way to manually install the CF 2.0 There is a file created in the root partition called MS .NET CF 2.0 LOG.TXT. Here are its contents (sorry this is long): 10/05/2005 00:40:57: PocketPC 5.01 10/05/2005 00:40:57: Processing alternative file: '\Program Files\.NET CF 2.0\cgacutil.exe.-410~-410~ARMV4'. 10/05/2005 00:40:57: Special file extension: '.-410~-410~ARMV4'. 10/05/2005 00:40:57: File is intended for OS: -410 to -410, CPU: ARMV4 10/05/2005 00:40:57: Device CPU: 'ARMV4I', 05020000 (84017152) 10/05/2005 00:40:57: Delete file '\Program Files\.NET CF 2.0\cgacutil.exe.-4 ...Show All
SQL Server How to use Alerts
I have two fields in my report(Start Date and End Date).Start Date should be earllier than End Date.Please help me how to use alerts. Frankly im lost I don't understand what is your problem right now so please clarify this a little bit Maciej ...Show All
Visual C++ CaseSensitive Keyboard Hook
Hi, i made a programm. it displays the entered keys in a console window. But all letters are in "caps lock"! How can i prevent that eg. if i enter: aBcDeFg it displays: ABCDEFG [code] __declspec(dllexport) LRESULT CALLBACK KeyEvent (int nCode,WPARAM wParam,LPARAM lParam) { if ((nCode == HC_ACTION) && ((wParam == WM_SYSKEYDOWN) || (wParam == WM_KEYDOWN))) { KBDLLHOOKSTRUCT hooked = *((KBDLLHOOKSTRUCT*)lParam); DWORD dwMsg = 1; dwMsg += hooked.scanCode << 16; dwMsg += hooked.flags << 24; char key[16]; GetKeyNameText(dwMsg,key,15); std::cout << key; } return CallNextHookEx(hKeyHook,nCode,wParam,lParam); } [/code] Peter Ritchie w ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Disposing Resources?
Hi, I've been working on a few game components in my XNA project but I've become curious what is the correct way to dispose of resources that the component loads I load these resources either in LoadGraphicsContent or a load method of my own, but when the component is disposed, UnloadGraphicsContent is not called. I assume UnloadGraphicsContent is only called when the graphics device is reset. Now, the question is, where to I dispose my resources (spritebatch, textures, IO streams) - in the Disposed event If so, how can I detect whether the class is disposed and throw ObjectDisposedExceptions when a public member handling a resource is attempted to be accessed Thanks in advance for any help... Alex The ...Show All
Visual Studio 2008 (Pre-release) Changing rectangle's position in the scene
Hello, I was trying to change a rectangle's position in a scene by using the procedurel code: Rectangle.Margin.Top = Rectangle.Margin.Top + 10; But I got an error which says that "Cannot modify the return value of 'System.Windows.FrameworkElement.Margin' because it is not a variable." So how the position of the rectangle could be changed Rectangle.Margin = new Thickness(Rectangle.Margin.left, Rectangle.Margin.Top + 10, Rectangle.Margin.Right, Rectangle.Margin.Bottom ); ...Show All
SQL Server Management Studio: UNWANTED Firing of Triggers
I have a trigger on a table that updates a 'date_modified' field anytime a row is changed. Like so : CREATE TRIGGER mytrigger ON mytable FOR UPDATE NOT FOR REPLICATION AS UPDATE mytable SET date_modified = GetDate() WHERE keyid = mytable.keyid When the table is opened in Management Studio and only ONE ITEM changed, the trigger fires as expected. BUT once the window is closed, M. Studio is firing the trigger for all rows. Does anyone know a way to prevent this I only want the trigger fired for the one row that was changed AND this includes when the table is viewed in M. Studio. thanks, Running SQL 2005. Don't you need to use the special tables Inserted/Deleted i.e. (note: n ...Show All
SQL Server Query much slower on 2005 compared to 2000
We have a database developed using SQL Server 2000. We are in the process of testing it on SQL Server 2005. So far i've not done much testing but it has become apparant quickly that quite a lot of queries are performing much slower in SQL Server 2005. I am currently trying to figure out why a particular query is not performing well. One SQL Server 2000 it runs in around 6 seconds. On SQL Server 2005 it takes around 50 seconds. The query is this... SELECT StartBase, StartPoint, PickupPoint, PickupInstructions, SingleJourney, Destination FROM vwJobs WHERE StartDateTime BETWEEN '2006-09-01' AND '2006-09-23' vwJobs is a view in our database. The view includes many UDF's and also has a UNION which combines two seperate table structures ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA - Microsoft lack of vision
Its real sad that Microsoft, once again, shows this lack of vision for a games development tool: 1: Get visual: Don't force users to write such a lot of code to do just very little. It reminds the Charles Petzold's "Hello Window" hell of code days. 2: Provide visual tools: Let users choose the components, change their properties and write just the required code for the events. 3: Quick development means quick prototype and minimum learning curve. XNA has a lot of things to learn. Definetively it is NOT for students and hobbists. We will have to wait until someone encapsulates XNA framework into a group of visual components, that can be easily drag & dropped, inspected and tested very easily without having to learn lots of n ...Show All
Software Development for Windows Vista Custom persistence service and timer activities
Hello. I have a question regarding how should I recreate the TimerEventSubscription (I use DelayActivities and a custom delay activity) on the Start method of my custom persistence service. I believe that the service is the one that must do that task, am i right If so... how :) Thanks in advance, Matias You don't recreate the subscription - you fire the timer by asking the WorkflowRuntime to load that particular workflow from your store. When you implement a persistence service and persist an instance that has a timer - you must create you own timer mechanism. The SqlWorkflowPersistenceService does this by writing the timeout stamp to the database and has a background thread that polls the databa ...Show All
Software Development for Windows Vista Get just the current workflow data
Hello, I have a workflow with several activities. And when I do a SqlTrackingQuery on a current workflow, I get four instances of ActivityTrackingRecord, because there are four activities in my workflow. But I just want to get one instance with the current values of the workflow properties. How can I implement that Thanks for your help. You will need to create a tracking profile and add an WorkflowDataTrackingExtract for all the properties that you would like to access the value for. Like the following: System.Workflow.Runtime.Tracking. WorkflowDataTrackingExtract workflowDataTrackingExtract = new System.Workflow.Runtime.Tracking. WorkflowDataTrackingExtract (); workflowDataTrackingExtract.M ...Show All
SQL Server Convert SQLExpress db to Sql Anywhere
Hi, Is there any way that an existing database in SQL Express can be converted to a SQL Anywhere regards Hi Dharam, SSIS transfers data table by table from a data source to SQL Mobile database. It does not transfer the schema. There are third party tools that transfers schema and data. Joao Paulo Figueira has provided a link to a tool in the following post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=484575&SiteID=1 Regards Ambrish ...Show All
