David Bridgestone's Q&A profile
Smart Device Development Type inconsistency exception, XmlSerializer & XmlChoiceIdentifierAttribute with .NETCF2 SP1
Hi, I've got a weird exception on such a line during runtime: XmlSerializer xs = new XmlSerializer ( typeof ( IPAddress )); Exception message: Type of choice identifier 'ItemElementName' is inconsisitent with type of 'Item'. Please use array of <namespace>.ItemChoiceType. Here is the IPAddress class, which was generated by xsd.exe from the following schema portion: < xsd:complexType name = " IPAddress " > < xsd:choice > < xsd:element name = " ipv4Address " > < xsd:simpleType > < xsd:restriction base = " xsd:hexBinary " > < xsd:length value = " 4 " /> </ xsd:restriction > </ xsd:sim ...Show All
Windows Forms custom radio button = trap OnPaint to change appearance
Whow can i create a custom radio button with different appareance do you have an example of a radiobuttom modified. thanks in adbvance for your help, Edward You can create a new class deriving from RadioButton and override the OnPaint method. In the normal case you defer to the default implementation. In the special case you paint it yourself. Unfortunately if you want to just change simple things like font or something then that is overkill as you'd have to redraw the entire control which is not easy. For simple changes like font or background color you can instead trap the state change that would trigger a change in the style. For example suppose that you wanted to set the text to bold when the butto ...Show All
Windows Forms Windows timing
Here is the very sophisticated program I just wrote: Imports System.Threading Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load For i As Integer = 5 To 50 Step 5 Dim starttime As DateTime = Now For j As Integer = 1 To 50 Thread.Sleep(i) Next Dim endtime As DateTime = Now Dim totaltheo As Integer = 50 * i Dim totaltime As Double = endtime.Subtract(starttime).TotalMilliseconds Dim actsleep As Double = totaltime / 50 TextBox1.Text += "sleep time: " + i.ToString + " ms; actual sleep time" + actsleep.ToString + " ms; total time" + totaltheo.ToString + " ms; actual total time&q ...Show All
Smart Device Development What wrong in this code for smartphone work well in pocket PC
#include "common.h" #include "MYappext.h" #include "MYContactsProvider.h" extern LONG g_cRefDLL; extern HINSTANCE g_hinstDLL; UINT cmdCtxCustom = 0; UINT cmdCtxJournal = 0; UINT cmdCtxSales = 0; UINT cmdCtxFax = 0; UINT cmdCtxAdd = 0; UINT curCtxCmd = 0; const int WM_CUSTOM_FLDS = 0x0415; const int WM_JOURNAL_FLDS = 0x0416; const int WM_SHOW_SALES = 0x0407; const int WM_FAX = 0x0431; const int WM_EDIT_CONTACT_EXT = 0x0408; ContactsContextMenu::ContactsContextMenu() { MessageBox(0, L " ContactsContextMenu " , L " Constructor " , 0); m_cRef = 0; m_punkSite = NULL; ++g_cRefDLL; ...Show All
Visual Studio VSTA Teething issues
Hi, I've downloaded the latest release of the SDK with a view to integrating VSTA in to one of our applications to allow our users to program against it. However, I've fallen at the first hurdle - trying to generate the proxy. I've tried to follow the help/samples on the MSDN website, but I'm getting some errors I can't deal with and would appreciate some help. I'm trying to use proxygen to create the proxy as per: ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.VSSDK.v80/dv_vstasdk/html/93980f10-3906-45fa-a44e-f03eaf1f70ff.htm but get the following errors: ProxyGen.exe : ProxyGen.exe [Version 8.0.50727.146] c Microsoft Corporation. All rights reserved. ProxyGen.exe Information: 0 : Method Create__Instance__ of type MyForms contains generic paramet ...Show All
Visual Studio Express Editions reading file's name
hi I am new to VB, I want to write a code that reads a file if its name contains a specific letter. For example if I have the files: ax2006.dat, ay2006.dat, az2006.dat, I want the code to read the file which has x as the second letter of the name. can anybody help cheers Haithem I have now this if statement: If files(j).Name = "ax2006" Then ... but I want it if it contains x as the second letter then..... how ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Shader Editor in XNA
Hi all! So, tests and more tests... Now we can say XNA IS ROCKS! But i have a comment. I use FX Composer(nVidia) to code and test shaders in real-time and debug it, but it is only for Cg code. I think XNA Studio need a shader editor with auto-complete, intellisense, highlight, etc, like the nvidia tool but for HLSL. So its my comment... Sorry for my bad english.... FxComposer v1.8 only does DirectX FX/HLSL. Perhaps you are using one of the alpha/betas of FxComposer v2 Cheers, Leaf. ...Show All
Visual C# How to detect when system startup complete
When Windows (XP Pro, for example) is starting up (from computer power on or refresh), it may display desktop icons for applications that are not really ready to be started until the Windows startup process has stabilized. For example, an application may need the SQL Server service to be started before the application can start if it tries to access a database. Is there a way for an application that is being started to detect whether or not the Windows startup process has stabilized or a necessary service has been started If the startup process has not stabilized, we would like our application to go into a wait mode until Windows has finished its initializations, or at the least popup a MessageBox advising the user to wait ...Show All
Visual Studio Team System Any blog or article on getting specific versions programatically?
Hi, I need to understand a bit better how get specific version works programatically. Any links that anyone might recommend Thanks Hi, I tried your solution but it is not working. I go the get with the ChangesetVersionSpec(234) but nothing happens. I inspect the GetStatus return value and it says NumOperations == 1 but nothing else. After doing the get, what do I need to do Do I need to check out or check in or what Thanks ...Show All
Visual C++ /Wp64 and sprintf
Can anyone suggest a portable way to deal with the /Wp64 warning from the following code, targeting 32-bit int main() { int * blockRef = 0; // simplified char buf[100]; sprintf( buf, "blockRef=%x\n" , blockRef ); return 0; } warning C4313: 'sprintf_s' : '%x' in format string conflicts with argument 1 of type 'int *' Thanks. Ah, sorry about that. Assuming gcc follows the latest C standard, looks like you could use the "z" (size_t) or "t" (ptrdiff_t) length modifiers. Some (ugly) macro and string-pasting usage would get you the portability: #if defined(_MSC_VER) #define PTRSIZEMOD "I" #else #define PTRSIZEMOD "z" #endif ... ...Show All
Windows Forms DataGridView Row Height DoubleLine
hallo, i want to give my CustomDataGridView a Contextmenue where the user can say the Row should be displayed in one Line / two line Mode.... i tried to handle the update from the Rows with a RowTemplate, but i think this would only work with new Rows. When i go through the Rows Collection an set each Height to the new Value this is very slow. i would be lucky for an advise Arnold i tried it. But this does not answer my question. I dont want to change only one Row at a time. I want to change all Rows in the Dataset at once. I there are 5000 ore more DataRows it takes a time to do this with foreach (DataGridViewRow row in this.Rows) { ... change RowHeight } Is there a change to speed this up, or i ...Show All
SQL Server trouble starting SQL Management Studio
I have just downloaded (i think sql server express edition but cannot start the gui! can anyone help cheers jim Hi, you may also download and install SQL Express with Advance Services http://msdn.microsoft.com/vstudio/express/sql/download/ Regards Hemantgiri S. Goswami ...Show All
Windows Forms Reg: Custom Drawing the Menu in Dotnet 2.0
Hello All, We have the below requirement:- 1. Custom shaped Main Menu i.e. Main Menu looks like a skewed rectangle instead of a normal rectangle (Similar to some fancy web site menu). 2. All the Drop down menus have a Thick Border with a different color 3. We need to host a Text box in the main menu which takes Incident ID which used when user clicks a Menu item to make it context sensitive. I would like know what is the best way to make this possible (1)Custom Draw the menu (How any pointer is much appreciated) (2)Use a Third party control which supports requirements Using: Dot net 2.0 and Visual Studio 2005 and Win forms Application (No plan to use WPF) Thanks in advance, Kishor ...Show All
SharePoint Products and Technologies "Explorer View" locks Active Directory accounts
We only recently began using Sharepoint corporation-wide, but have begun receiving support calls for locked accounts. We've noticed a pattern that the accounts were locking after the user was browsing around in Sharepoint. I myself am now able to "force" my own account lock by simply clicking "Explorer View" in any document share (note: I am full admin on all Sharepoint web sites). I do in fact get the explorer folder view and can get right-click options, but once I navigate off (for example, by clicking "Home"), I am immediately locked out and receive a login prompt in the browser. Has anyone else had this problem and can shed some light on possible solutions I've tried going through the troubleshooting s ...Show All
Visual C# RawState()
Hello, everybody, I have to have 'new' as the RowState in the dataTable, haw i could do that There is no RowState "new". You can either have Detached, for a row which has been created (using table.NewRow()) but hasn't been added to the table's Rows collection; or you can have Added, for a row which has been added to the table's Rows collection. ...Show All
