kiranv's Q&A profile
Visual C# Setting the position of a MessageBox
I need to set the position of a MessageBox in an MDI application. I have multiple forms positioned using tile horizontal and vertical and I want the message box to show up centered on its parent form not centered on the computers monitor. How can I set this so that the MessageBox is always opened centered ontop of its parent form Perhaps if you make the parent form the parent of the MessageBox Otherwise, you may have to create your own message box class. ...Show All
Windows Forms My Biggest wish...
Hi all, To add to the global wishlist. I'd like to be able to use operators with complex types (color, IntPtr, etc.) in VB.net. The only way for these simple things is to use .Equals method or use some weird advanced methods like; op_LessThan, op_Explicit, op_GreaterThen, etc. If my understanding is right these methods are the operator handler but they don't port&nbs ...Show All
Visual Studio Express Editions Variadic Macros Vs Intellisense
Hello, I have identified a strange behaviour in VC++ Express Beta 2 while trying to use variadic macros. It seems like Intellisense stops working just after a variadic macro usage. I own two workstations here: on the first one putting the cursor just after a variadic macro usage and pressing Ctrl+Space causes an "Uknown software exception", just click Ok and go on without Intellisense; but on the second one VC crashes immediately! If someone wants to give a try, just create a new Win32 Console project, put a: #define newmacro(...) printf(__VA_ARGS__); before the _tmain function, and a: newmacro("Hello world!\n") before the return 0 ...Show All
.NET Development Repeater + Extended control not working
Alright this is in my aspx file in the ItemTemplate section of the repeater <td><cwc:DataDropDownList runat="server" DataSourceID="rolesDataSource" SelectedValue=<%# Eval("Role") %> DataTextField="Description" DataValueField="id" AutoPostBack=true OnSelectedIndexChanged=dropDownList_SelectedIndexChanged ExtraData=<%# Eval("FirstName") %> > </cwc:DataDropDownList></td> And this is what the code for the DataDropDownList looks like: namespace CustomWebControls { [ToolboxData("<{0}:DataDropDownList r ...Show All
Windows Forms Help with controls
Does anybody know how to check if a control has an event handler or not You can look in the property window area and click on the lightning bolt. If there are items listed, then there are event handlers for that control. ...Show All
Visual Studio Tools for Office Deploying a Word VSTO solution
I have been trying to understand the deployment procedure for deploying a Word VSTO(2005) application I have developed. The MSDN documentation is very vague and keeps referring you to other documents which don't answer some of the crucial questions. Is there maybe a HOWTO or Lab available on this to give us a step by step guide on how to achieve this Hi Tom, First you need to add those prerequisites to VS.NET. This is described here . ...Show All
Visual C++ vector crashes on method use on debug but not release
The std::vector class is throwing an exception when I try do add something to it by using vector::push_back(). I have declared my vector as: std::vector<MyTreeCLass *> mNodes; Actually, it doesn't just do it for that, even if I did this: // At the beginning of the class, before I add elements if(!mNodes.empty()) // it throws an exception here, but I don't even know which one it is { // foo } When I run it in the debugger, I see that the Like the subject says, this happens on debug mode. The above snippet works fine on release. The release still crashes in unexpected places, although not while something so trivia ...Show All
SQL Server task reusability
I have a same sql execute task that i want to use in all my packages, all this does is track the package name and its start time into a DB. So as i understand, if i create a package call "log start time" and use it in all my packages, the package name will not be correct. Anyway i can build this simple custom task, or any other solutions will be appreciated. You could create a package with just this ExecuteSQL task in it and use it as a template for future packages. See http://support.microsoft.com/default.aspx/kb/908018/en-us hth Donald Farmer ...Show All
Smart Device Development Print Euro Sign
Im sending out ASCII Characaters to a bluetooth mobile printer. When i send out the euro Sign,€, inside of a String it prints it as a ' ' not '€' how can i get the printer to print it or whats the ASCII for the '€' That's quite expected because there's no Euro sign in ASCII. ASCII is probably 20 years older than Euro, so luck of Euro is quite understandable. If your printer has Euro character, you should use printer's encoding to print it, not ASCII. Should you use ASCII encoder, it would replace every Unicode character which is not in ASCII character set with ' '. Here's a good article to get you started with encodings and Unic ...Show All
Visual C++ C++ __clrcall
Ever got a solution to your problem below class __declspec(dllexport) TestClass { public: TestClass(); int GetDotNetMouseButton( System::Windows::Forms::MouseButtons button ); }; I am having a problem when compiling this. The GetDotNetMouseButton function gets compiled with the __clrcall calling convention and as a conseqeunce dllexport is not allowed. This worked fine with VC2003. I have a huge amount of such unmanaged classes with managed types in the function signatures (however mostly these classes consists of native type only functions) Do I realy have to rewrite this to a managed class, or is there a work around E ...Show All
Visual Studio Express Editions Exception thrown in a ClickOnce installation
Hi again, Sorry, but I have another ClickOnce problem. My program runs without exception in the development environment, but the ClickOnce RUN version throws an exception in the form.Load event. Private Sub Form1_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles MyBase .Load Try Dim fileStr As String = "..\Images\" doorPic(0) = Image.FromFile(fileStr + "Door1.gif" ) doorPic(1) = Image.FromFile(fileStr + "Door1S.gif." ) doorPic(2) = Image.FromFile(fileStr + "Door2.gif" ) doorPic(3) = Image.FromFile(fileStr + "Door2S.gif ...Show All
Windows Forms Progress Bar question
I have an application that inserts a whole large heap of data into SQl Server 2000, I have this working fine, however the issue becomes when the user wants to know if its still working, or not responding. I dont know what to do to tell them that their query is currently "in progress", because my window says "Not Responding" but thats because the SQL takes a while to perform its operation. How do I overcome this Thanks! Hello Mark! You'll want to look into moving your database update code off onto a different thread. If you're using VS 2005 that would be the new BackgroundWorker ...Show All
Visual Basic I can't get my toolbox to open in VBExpress
Somehow I closed the toolbox window in a form designer. Now using any of the options it will not open again. I don't get an error message, but if I do View -> Toolbox, click on the Toolbox icon, or ctrl - alt - X, hourglass flashes then disappears and nothing ever happens. Have tried re-installing multiple times, both from the disc I had ,then directly off the MS web site. Same result. Any suggestions Wild guess: do you have a custom user control in your project First check if you also have this problem if you start with a new Windows Forms project from scratch. ...Show All
.NET Development Convert MSXML2.DomDocument to XMLNode
Hi all, I have been trying to convert an MSXML doc to .NET system.xml.xmldocument in order to eventually get the document to a node. However I am not having any luck loading the MSXML doc to system.xml. Example: Dim xDoc As New MSXML2.DOMDocument() xDoc.loadXML("<Root><Element>Text</Element></Root>") Dim xDocNew As XmlDocument xDocNew.LoadXml(xDoc.xml) 'ERROR xDocNew.Save("C:\SAVED.xml") Dim xNode As XmlNode xNode = xDocNew.Clone Sorry ppl, monday I quess not quite with it yet Change: Dim xDocNew As XmlDocument To: Dim xDocNew As New XmlDocument ...Show All
Visual Studio Express Editions app.config problem
hello to everyone I am running windows based program compiled with Express Edition. I have User name and Password that application run OK and connect to remote computer everything is OK I Store these values in Application Settings all is fine… But when I run the application from Windows schedule IT IS CREATE NEW application setting WHICH are EMPTY in first start…. HOW to prevent that I want the application to run with same values stored in first one 10x in advance val use the registry... and with the scheduler make ...Show All
