Pastards's Q&A profile
Microsoft ISV Community Center Forums ComboBox: VBCode to select first item in the list.
Hi I have the following VB code, when someone selects the worksheet name from the combo box in the summary page it takes them to the worksheet. However, the problem is that if they select, for example, worksheet "B" it takes them to the worksheet fine but when they are back in the summary worksheet the "B" is still selected in the combo box and you can not select "B" anymore. You have to select other worksheet name before you can select "B" again. Is there any way to instruct the combo box to always select the first item in the list Thanks in advance. Private Sub AFISGBox_Change() Dim strSheet As String If AFISGBox.ListIndex > -1 Then strSheet = AFISGBox Sheets(strSheet).Select End If E ...Show All
Visual Studio 2008 (Pre-release) Using web services with xbap application
I have created an wpf browser application that relies on calling a web service. However, whenever I call the web service, I recieve a "System.Net.WebPermissions" error message. The web service is located on a different server. How do I get this to work Thank you for the help. Steve Yes, except you don't even need to use WCF on the server side, just use the Atlas bridging infrastructure (steps are documented here ). It's 100% compatible with WCF on the client side. As for it being in a separate directory, that should not be a problem for the sandboxed environment. As long as you're talking to the same server, the directory has no bearing. HTH, Drew ...Show All
.NET Development Another "Communication with the underlying transaction manager has failed."
Client: Windows XP SP2 with all updates, server: Windows Server 2003 SP1 woth all updates. Any distributed transactions fail with "Communication with the underlying transaction manager has failed" if "Mutual Authentication Required" or "Incoming Caller Authentication Required" selected. If "No Authentication Required" selected things work. Running DTCPing revealed "Access denied" when server tries to communicate back to client. Here is the part of DTCPing server log: ++++++++++++++++++++++++++++++++++++++++++++++ DTCping 1.9 Report for ++++++++++++++++++++++++++++++++++++++++++++++ RPC server is ready 01-11, 11:21:30.668-->RPC server: received following information: Network Name ...Show All
Windows Forms How to call a web page as Post method from Windows Form Application?
I have a form application with some TextBox controls in it.I want to send the values of these controls as Post variables to the web page. I can call a web page using System.Diagnostics.Process.Start("Http://...") but how to make a call like it was called from form element with method post Hi You can use XMLHTTP Object as follows just add reference of the msxml6.dll ''' <summary> ''' HttpPost Contains static functions to send/post data to ''' webservice of studio application. ''' </summary> Public Class HttpPost ''' <summary> ''' Posts data to webservies of StudioApp &nbs ...Show All
Visual Studio 2008 (Pre-release) double clicking controls does not work
Hi, I just installed .NET 3.0 and immediately wants to have my first "hello world" app on XBAP. I have just created my first XBAP-based "hello world" application after reading some intros. Just like developing old Windows Forms based app, I am double clicking a button control so it brings me to the code editor to put in some code but i am not sure if this is still possible with XBAP or I must have missed something. TIA! :) ... I dunno. I seldom click into something i didnt mean to. My line of thought is that this functionality has existed in almost all dev tools of MS. I am sure people that are used to this will appreciate if this can be supported. As for the deleting of un ...Show All
Visual C++ C++/CLI Types
Hey All, When I was using Managed C++ back in the old days of VS03, I remember being very careful to use Int16 instead of short, and Strings instead of std::strings. I'm wondering how much of a difference that makes w/ the new CLI. Is "int" equivalent to "Int32" as far as garbage collection and such Also, I caught myself doing this today when I declare variables. String ^str; but when i do my arrays, I put the handle like this... array<String^>^ str; Where is the 'proper' place to put the cap SvenC, you're right about int not having a fixed size but at least the VC++ compiler in both 32 and 64 bit versions defines int as being 32 bit and this is not going to change from a vers ...Show All
SQL Server How to pass database and server info dynamically via code vb 2003 with sql 2005
I am calling reports via url and also using the reporting services 2005 asmx webservices render option to download the report stream. How to pass the database information dynamically for a report, when i created a report project i gave the server, db and username and password info. But i have 4 sites all of the sites are identical but using different databases, databases are also identical. i don't want to create 4 different identical report projects is it possibel to pass the server, db, user, password info via code. Thank you very much. IMO, passing user credentials around is an invitation for a sleazy hack. Instead, consider: 1. Using a private data source with an expressi ...Show All
.NET Development How to easily load data from an XML doc?
Let's say I have an XML file that looks like this: <profiles> <profile> <name>My First Profile</name> <defaultColor>Color.Blue</defaultColor> <size>6270</size> </profile> <profile> <name>New Test</name> <defaultColor>Color.Red</defaultColor> <size>500</size> </profile> </profiles> And I basically want to load this data up in a simple method, such as the example below (pseudo-code): xml = LoadXML("blah.xml"); foreach profile in xml // profileName = xml.Get("name"); // myColor = xml.Get("defaultColor"); // pageSize = xml.Get("size"); next How could I do this in C# ...Show All
Windows Forms error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Hi, I am developing a windows application in .net 2005 that runs a rather large stored procedure in sql server 2000 (about 165 parameters). I run a function that assigns all the select parameters from various check boxes and all the where parameters from various text/combo boxes as a datatable. In that same function, when i executedatatable (passing the connectionstring, commandtype, commandtext, and parameter array), i get a sqlexception with the error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated. I've searched high and low for an answer to my problem. Though many people have encountered this same error, it seems none have reac ...Show All
SharePoint Products and Technologies Attach different Master Page to layout page
I have a site collection and from that collection I have a child site (let's call it site A) I would like to use a different Master Page with Page Layouts used in Site A. I see where I define the Master Page used by Site A in Site Settings. Then from Site A I created a new Page Layout. That page layout was saved to the root site collection Master Page Gallery (as expected). By following instructions that I have found, I should be able to select Format -> Master Page -> Detach from Master Page while editing a page layout. And then use the Attach Master Page menu item to attach to a secondary master page. The problem is that the Detach from Master Page and Attach Master Page menu items are disabled. Where am I going wrong Thanks, ...Show All
Visual Basic How to search a file??
Hi everybody!!! I'm developing an application in visual basic, and its working with a data base... I need to look if this data base is in the correct location, if not I would show to the user an input box (he sould write there the correct location of the data base...) Any idea would be very helpful!!! thanks, alba You can use System.IO.File.Exists to determine if the file exists, and if not, use the System.Windows.Forms.OpenFileDialog to let the user browse for the file. Best regards, Johan Stenberg ...Show All
Visual C++ Why is there a popupwindow for assert(false)
Hello, This code #include <cassert> int main() { assert(false); return 0; } compiled like that "/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN/amd64/CL.EXE -MD -D_CONSOLE -nologo assertion.cpp produces the output: Assertion failed: false, file assertion.cpp, line 5 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. and then a popup window appears that tells me that it cannot find the Visual Studio Just-In-Time Debugger. HOW CAN I PREVENT THIS POPUP WINDOW I would not expect this window to pop up, because the MSDN Library says on the page about assert: The destination of the diagnostic message de ...Show All
SQL Server The Process Could Not deliver the Snapshot to the Subscriber, using WebSynchronisation 2 server setup
I am Having trouble trying to set up SQL Server Replication Utilising Web Synchronisation Where the IIS(Web Server) is on a separate machine to the SQL Server(Publisher). I am using MSDE as the SQL Server Box, however even when I used SQLServer2000, or SQLServer2005 I have had no joy with the 2 separate Servers setup. If I have the one server then I have no problems (i.e. One Server Setup) Server A: Windows 2000, with MSDE installed enabled for Merge replication, and has a Publication set up. IIS Web Page Setup for Synchronisation My SQL Server 2005 Mobile device syncs via the web page on ServerA Fine, no problems at all. The Trouble is when I am trying to utilise SQL Server Replication as follows. (i.e. 2 Server Setup) ...Show All
Software Development for Windows Vista How to use IMAPIv2 in Windows XP, and how to burn DVD in Windows XP?
I have created a demo which can burn CDs using IMAPIv1. But it can burn only CD-R or CD-RW, not DVD-r or DVD-RW. My environment: Windows XP professional; VC6; Platform SDK for Windows Server 2003 R2. My questions: Is there a IMAPIv2 package for Windows XP Does vs2003 or vs2005 support IMAPIv2 Does only Vista support IMAPIv2 now Glad to hear you had success with the v1 APIs. Here are some answers in brief: 1) There is not currently an IMAPIv2 package for Windows XP. 2) IMAPIv2 requires the SDK for Windows Vista. Once you have that, you can use any development environment you like to interface with the COM APIs exposed by: IMAPI2.IDL, IMAPI2FS.IDL (and the TLB equivs). If you only want to ...Show All
Windows Forms Keypresses in picture box
i have a small app where users can draw shapes in a picture box using the mouse. I want the 'delete' key, when pressed to delete the current shape. But there is no way (that i can see) to be able to listen to key events for a picture box. Any ideas around this Hi, I could see that there is no keyboard related events for a picture box. If I am not wrong I think you could handle the keypress event of the Form (container of the picture box) and somehow associate to your picture box. Thanks, JDee ...Show All
