Will8754's Q&A profile
Visual C++ error C3641 - invalid calling convention
Hi all, I'm new to VS2005 C++ / .NET and I've inherited some code that requires porting to VS2005 C++ .NET. I get the following error when compiling with clr/pure: error C3641: 'CWThread::Redirector' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe The relevant offneding class code is: //The method to cast the inheriting classes Run method to the required type. static DWORD WINAPI Redirector( LPVOID Arg ){ CWThread* ThreadPtr = (CWThread*) Arg; return ThreadPtr->RunWrapper(); } //Wrapper method for the Run method DWORD RunWrapper( void ){ TVoidPtr ResultPtr; //Call the run method R ...Show All
.NET Development How to update data based on dataset entries
I have a xml < xml version="1.0" > <Amazonbooks> <Mybook> <MyBooktitle>Astronomy</title> <booknumber>b121</booknumber> <city>SHILLINGTON</city> <state>PA</state> <description>Astronomy b121 Description on 19 dec</description> </Mybook> <Mybook> <MyBooktitle>Geology</title> <booknumber>b212</booknumber> <city>West Palm Beach</city> <state>FL</state> <description>Geology b212 Description on 19 dec</description> </Mybook> <Mybook> <MyBooktitle>Astrology </ ...Show All
Visual Basic Variables in Different Forms
I have a variable that's declared as a result of a dialog. This variable has a specific value after the dialog, but then I need to refer to that variable from another form. How can I do that My.Computer.FileSystem.WriteAllText("textfile1.txt", variable, False) That is the code in which I refer to a variable called variable. Variable is declared when a guy types in soemthing in a text box and presses okay in another form. How can I use the variable in the above code without changing its value Another problem that I have is here: Dim variable As String = My.Computer.FileSystem.ReadAllText("TextFile1.txt") WebBrowser1.Navigate(variable) That is where I d ...Show All
Visual C# How Can I create Windows User Account by calling WMI method to do that ??
Hi How Can I create Windows User Account by calling WMI method to do that I know that I can create windows user account by using [System.DirectoryEntry] Class as this artical in microsoft support website http://support.microsoft.com/default.aspx scid=kb;en-us;306273 but my question is to create the Windows user Account using WMI methods , How Can I do that and thanks with my best regarding Fraas :-) This is what I said. the script given is WMI/vbscript but since I currently cannot convert it to C# for you, using the Management classes and so on, I thought it would be best if you could until I can actually do it. The script is actually WMI ...Show All
Windows Forms TreeView fails to display icons, why?
**also posted to VSTO form...no replies ** My VSTO Outlook add-in shows a form with a TreeView control. The tree works properly, showing the data I expect it to, but not the icon images. When I add a default root node in VS Designer and assign it an image from my ImageList, it appears correctly in the designer. When I run the add-in, the default node appears, but without icon. There was a related thread MSDN Forums Windows Forms Windows Forms General Icons not showing up on Treview on VSTO beta, but no real answer posted. Anyone have any ideas The debugger shows that the TreeView object does have the ImageList, and that the ImageList has the right number of images, and that the nodes have ImageIndex values in the prop ...Show All
Software Development for Windows Vista Freeformdesigner --> saving to XOML
Hi! I have implemented a workflow surface who is using the freeformDesigner. I can now resize and move the activities free around the workflow surface. I can also draw arrows between the activites in any direction I want. I have used much of the flowchart example code. Here is my BIG challenge for you: When I save the workflow and re-open it it doesn't appear like it was before I saved it. The activity-boxes' position and size is correct (I have implemented this). The problem is that the arrows between the activity-boxes is gone. How can I save the arrows' position into the XOML-file I don't even know where to look for this properties... Thanks a lot! Add the following to the p ...Show All
.NET Development .net Runtime error on touchscreen device
I have a .net 2.0 windows forms application that runs on a touch screen XP machine. This application crashes sporadically, apparently when the user is "clicking" about the form. I can't replicate this on non touch screen devices. The event log entry is: Event Type: Error Event Source: .NET Runtime 2.0 Error Reporting Event Category: None Event ID: 5000 Date: 17/10/2006 Time: 10:33:39 User: N/A Computer: SAFEHANDS01 Description: EventType clr20r3, P1 safehands.exe, P2 1.0.2477.22358, P3 452f3f5c, P4 system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 16b3, P8 159, P9 system.componentmodel.win32, P10 NIL. How should I attem ...Show All
.NET Development Port Binding and Intercepts
I have attempted asking this question all over, and none of the responses I’ve gotten have proven to be helpful. I’ve created a listener and client in c# along with its related DLL. I’ve gotten the port to bind and the listener works fine with the client. My question is this – Logically, if you bind a port, you should be able, under some sort of event triggered, to intercept a soap request before it is dispatched to it’s relative service call, and after it has been dispatched to that service call , i.e. Before the request is carried out and after it has been carried out, but before the response is sent. I would expect some sort of OnBeforeDispatch event and OnAfterDispatch event, or something of that nature. My reason fo ...Show All
Windows Forms Running number for data grid.
Dear All, I have a datagrid. First I design and set the column for my datagridview. Then I have few textbox and a sumbit button. Upon submitting I will add a new line into my datagridview. My problem is simple as I add I want a running number to appear as a column. As example the first data enter the column should show 1 then 2 etc. But when I delete I want the number to be resetted to as the row number. Thanks. Hi,sukbir I think you can change your method.You can repaint rowheader,add ID in the rowheader.In this way ,you won't do any change to your DGV when you deleted a row. There is some code for you,I hope it will help you.   ...Show All
Smart Device Development Compressed Cab file format
Hello Everyone, well i developed a client server applications for smart device but when i made the Cab file.. its over 1 MB in size (as it contains many bitmaps)... i want to compress that Cab file .. i know there is an option of compression but the problem is that .. when any client ask for the installer, the server will make some changes in that Cab file before giving it to client .. so its necessary for server to know the format of the Cab file .. so that it can make changes in it ... and its not easy to change anything in a compressed Cab file ... but how can i compress that Cab file in such a way that the server can understand its format and can made changes easily .. is there any way of doing this ... i really appreciate res ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Help Please, kinda alot of questions in here
Hi, im a complete beginner with any kind of coding and i want to make a simple game to start learning how to code. I'm very fluent in 3ds max and want to put some use to the models i've made and put them in my own game... I want to make a simple space ship flight game. I've done the 3 tutorials for moving models but I dont really know how to apply them to my own game. heres mainly what i want; 1. I want the camera to rotate around my model using the right thumb stick. 2. the gun on top of the ship to rotate with the camera view. (when you look up and down the guns would aim up and down etc.) I have bones going through the gun on the model. 3. want to press up or down on the d-pad to toggle 3 different speeds. 4. steer the ship with the lef ...Show All
SQL Server SQL's america date format conflict with australian date format
Hi I am trying get my VB6 application to insert a record into a table (SQL Express) which has a datetime column but it would not process if the data format is differ to *American Date format*. The date() function in VB returns 15/11/2006 which is in Australian Date format (DD/MM/YYYY) according to my setting in "Reginal and Lanuage Option-> Locale 0> English (Australia)" setting. I get the following error: Msg 242, Level 16, State 3, Server KIT\SQLEXPRESS, Line 1 The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been terminated. My computer's locale is set to English (Australia) and I expect the datetime format would follow what is set ...Show All
Visual Studio 2008 (Pre-release) WCF Extensions for VS2005 on WinXP
Group, is the WCF Extensions for VS2005 on Windows XP a production-quality download Or is it still in beta fx Is there a WCF Extensions for Visual Studio 2005 (after the November CTP) that can be installed on WinXP SP2 and used for developing & deploying in a production environment The Nov CTP I could find is here: http://www.microsoft.com/downloads/details.aspx familyid=F54F5537-CC86-4BF5-AE44-F5A1E805680D&displaylang=en ...Show All
.NET Development raising an event via reflection
Using reflection is it possible to check if an event has a handler and more importantly raise that event. I have a string with a value of the event and the object instance which I need to fire. Hi Could you post a c# sample I am just a bit curious to look at your current implementation. I've tried several samples, even with GetField(), and I always get null back. Thank You, Julien ...Show All
Windows Forms EventHandlers for dynamically created controls.
I am trying to subscribe to the click event raised by the dynamically created LinkButtons in MyCustomTable class. I want to handle these events in the code behind of my webform. In my webform.aspx.cs I instantiate this custom control and pass it in a populated sqldatareader and it returns a table which I then add to the to a placeholder control on my page. This is a very simplified version of my actual control, but it serves the purpose for what I am looking for. I know how to add the event handler in this same class. myLinkButton.Click+=new System.EventHandler(myLinkButton_Click); where myLinkButton_Click is a method name in the MyCustomTable class. I want to define the method to handle the instance Click ...Show All
