Jon Watte's Q&A profile
Windows Forms Control.Focus & Control.Select
Hi - quick question here: what's the difference between Control.Focus and Control.Select (is there any or are there just two different methods on some controls for readability purposes e.g. you "select" a textbox when you want to input text rather than "focus" it ). If someone could clarify the difference and/or an example of where to use each, that'd be great. Thanks in advance! Aha! All is clear now... :) Except I think Select() would be more appropriate usually since you only really need Focus() when something is not in the foreground, right ...Show All
SQL Server using views to access tables in another database
We have a database where the application configuration tables are in the same database as the user database. We want to move the user data to another database (to ease deployement of changes). We are thinking of moving the tables to another database and creating views in the old database to eliminate having to recode our application. We have tested that the CRUD statements will all work with the views, but are wondering what performance impact this will have. So, what impact will using the views to mask the tables from another database have Thanks, Ernie There should not be any performance difference as long as the queries in your views are simple SELECTs against the original tables. ...Show All
Visual Basic argument not specified for parameter 'eventArgs' - calling sub in another UserControl
If a UserControl contains a Sub such as Public Sub BackOne_Click( ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles BackOne.Click and another UserControl calls the Sub above as per; MainForm.ctlPostEdit.BackOne_Click() where it is defined on the MainForm as; Public ctlPostEdit As PostEdit.PostEdit, why/how would I solve the following error Argument not specified for parameter 'eventArgs' of 'Public Sub BackOne_Click(eventSender As Object, eventArgs As System.EventArgs)' This worked just as is in the previous vb6 app. Thank you, -Greg You have to provide the arguements specified in the method signiture (in this case, a S ...Show All
Visual C++ How to PostMessage between 2 separate applications?
I'm trying to implement messaging between 2 different applications using PostMessage (HWND_BROADCAST, msg, 0, 0) in one, and setting a On_Message handler in the other. The idea to test this is that when PostMessage is sent from App1, App2 will receive the message with On_Message and call the appropriate handler function. Unfortunately, its seems that this setting doesnt work. I set the message ID to the same one for both applications (something like 9990) . I did a search thru MSDN and had a clue on RegisterWindowMessage but have no idea on how to implement this, especially when the messageID must be a constant for ON_MESSAGE to work. Is there any way around this problem Actually, I agree most with using R ...Show All
.NET Development BinaryWriter - Dynamic cast
Hi, I am new to C# and I don't know how to cast dynamically an object to a specific type . I have the object and its type (as a Type object). For example, I read some data from a query (which has been created dynamically) and get a list of objects and theirs types (string, Int64, DateTime...). Now I need to put them into a BinaryWrite. Is there any way of dynamically define which Write method to call I don't want to have a BIG switch to test each possible Type. I would like to have something similar to that: Object obj = new Object(); \\ it comes from a datareader... let's assume it is a string objBinaryWriter.Write(obj as obj.GetType()); Thanks in advance objBinaryWriter.Write(obj as obj.GetType()); ...Show All
.NET Development updating an ms access database
I am new to vs2005. I used the wizard to connect to my ms access database. I can succesfully retrieve the records, and do everything else I need to do, but I can't get the udpates to save, nor deletes nor updates. I saw someplase that I need a command builder, but when I try to pass the sqltable adapter to the command builder, it fails. I don't know what to do on this, and I need to figure it out by friday when my project is due. Are you getting an error when you try to update You don't necessarily need a CommandBuilder, but you do need some way to tell ADO.NET what SQL statements to use for inserting/updating/deleting. If you are using the wizard, I assume you are using a TableAdapter, which should have ...Show All
Software Development for Windows Vista Not exists IniWrkflIP.aspx
HI, I am from Russia. I don`t have IniWrkflIP.aspx form in my "_layouts" folder... Do you now, where can I get her Please help... Best reguards... :) Well... This is it. IniWrkflIP.aspx is Initiation page for Workflow in SharePoint Server... When you use custom workflows, you can setup your workflow by this page... ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XML TOOL KIT HELP
hey there was wondering if any one is able to give me a few pointers on XNA. trying to create a toolkit using xna that will allow me to design levels, but also want to export the created level to an xml file and also reloaded it into my main game engine from the the xml file, any pointers cheers, thanks for there help I like my 3 lines of code to save better. "[Edit: I see Jim has beet me to the punch yet again. His way is another option as well. Nice job yet again Jim!]" At least I didn't rutabaga you to the punch. ...Show All
Visual Studio 2008 (Pre-release) how to stop elements from being created?
I am writing a program in which one object only appears if it a boolean value is true. The object is in the XAML code for the project. How can I make it so the object only 'comes to life'/initializes under a certain circumstance Yes, Mike is right on there. I posted a small sample to show how to do it. It shows programmatic creation of an element and also programmatic harvesting of elements that were declared in markup as a resource. I also used this sample to illustrate the minor changes in a xaml file that are necessary depending on the programming language you use. VB & C# xaml files are generally going to be slightly different. Thanks, Rob Relyea Program Manager | WPF Team | h ...Show All
Windows Forms keeping eBay developer keys secure in winforms app
I am developing a Winforms app that uses the eBay web services. They provide 3 developer keys to be used on all web service calls and these keys need to be distributed with the application. How can I keep these secure I believe that the official eBay response is to put them in the compiled code, but using Reflector, it is trivial to retrieve these keys. I know I can obfuscate the strings with appropriate software, but the application is a freebie and I do not want to have to pay for anything (I am using express edition). Any help would be greatly appreciated Thanks Zaph0d Forgive me if I am mistaken, but to encrypt/decrypt, I would need an encryption key which would have to be stored in the application, m ...Show All
Windows Forms Panels or UserControl
Hi, I have a tab control which will has a user control. The user control has many tabpages. Each tabpage has a menu and depending on the menu the user clicks, I have to chnage the tab page area. I was thinking of using user controls. I want to know if panels are a better choice which of the two has better performance at runtime Thanks! Hi, We don't know how the user control is implemented, therefore it's hard to tell which one is better. Generally speaking, the standard control is more general, stable. But if your user control is specific on this problem, say has some optimization on it, maybe you can try the user control. ...Show All
Windows Forms Focus in Form
I am using 3 different user Controls in a form. Each control is having a Datagrid , at any given time the three datagridviews are having focus. if i select particular datagrid focus on another controls should be loose. I want Focus at only One at a given Time. yes it is like selected in each control ,it is not focus, --thanks you should handle all selectionchanged events from controls grids. You should also define event on your controls that will be raised when this happends. That events should be handled on the controls form, and in that handlers should be executed some public method of controls that clears selected rows of underline control grids. ...Show All
Visual C++ Extending CEdit problem
Used Class view to Create a new Class: class CEditEx:public CEdit. Without doing anything further an attempt a complining gets the following results: EditEx.cpp(12): error C2440: 'initializing' : cannot convert from 'size_t' to 'LPCSTR' EditEx.cpp(12): error C2440: 'initializing' : cannot convert from 'CRuntimeClass *(__stdcall *)(void)' to 'CObject *(__stdcall *)(void)' Everything is pointing to IMPLEMENT_DYNAMIC and is microsoft implemented code. Can someone explain what is going on. When I attempt to add a new variable to the project dialog the new variable type isn't shown. Thanks for any help MtEvans It's not that it needs further details, you are simply in the wrong forum. See ...Show All
Visual C++ internal compiler error (compiler file 'f:\vs70builds\6030\vc\Compiler\Utc\src\P2\p2symtab.c', line 4537)
I'm getting the following error when trying to compile a C++ file in VS 2003 with SP1: fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'f:\vs70builds\6030\vc\Compiler\Utc\src\P2\p2symtab.c', line 4537) It happens on the following line in my code: const char* p = "SomeText"; If I were to change this line to something like const char* p = "SomeOtherText"; then it would compile just fine. I've trying doing a complete rebuild, but the problem is still there. Any ideas what is going wrong As suggested, I've posted a bug report to the Microsoft VS feedback site: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=252700 ...Show All
Visual C# What is the maximum literal address for a local file?
I thort it was 255 but when tried I found it only == 248 CHAR full LITERAL filename & path string length!!! How do I determine what the user can enter before submitting it to the OS as the intended filename Um actually Gabriel my users will basically be creating the name of the file dependant on whereabouts in the tree the wish to place it which will determine how big the their actual filename can be but I don't want them to get that annoying ! Brrrump! sound. The selected text from the current window is a prefix to what they can then specify as the addendum for themselves. I will automatically be calculating drive and subfolders as part of the literal 260 total allowed. lol ...Show All
