TrevorW's Q&A profile
Visual Studio Express Editions Problem with system.io
Why does the first line of the code below take about 15 sec to complete the first time it is called, during my programmes login request. But when subsequently used there is no delay (LoginReq is dim as Net.HttpWebRequest ) Dim SendReq As System.IO.Stream = LoginReq.GetRequestStream SendReq.Write(Data, 0, Data.Length) SendReq.Close() ...Show All
Software Development for Windows Vista Trap last browsed URL
I would like to be able to create something in Vista that "listens" for when a page is opened in IE (I would liek it to listen for any browser..but just IE will be fine).. Does anybody know where I should look for documentation on how to accomplish this Thanks! Looks good, except that it doesn't work when built under Visual Studio 2005. I couldn't get it to recognize a single thing that my Internet Explorer browser did. Is there anything else available that might work ...Show All
.NET Development Object dieing after some idle time
Hi, Need some help ragarding remoting . I have an application developed using remoting scneorio. I am using SAO singleton objects. My application is working fine. But when i left the application idle on client sie, (user machine and not server machine) say some half an hour, ,y application returns the error. I found that object is dieing after some idle period. Any guess why this is happening Thanks Vyanki Hi Vyanki, did you check out the document Gandalf referenced It sounds like your singleton is timing out, which is a normal part of .NET Remoting. If you want to control the singleton's lifetime you'll need to register a sponsor. When a lease is set to expire, we ask all the sponsor's if it's OK to coll ...Show All
.NET Development Copying tables from a dataset to a SQL Table
I have a dataset with 5 tables and there is a database in my SQL server 2005 with the same set of tables with no rows in them. I am trying to import the rows in my dataset to those in the database. This is the piece of code I have written: int tableCount = ds.Tables.Count; for ( int i = 0; i < tableCount; i++) { DataSet destSet = new DataSet(); SqlDataAdapter destAdapter = new SqlDataAdapter("select * from " + ds.Tables[ i ].TableName, destinationString); destAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey; destAdapter.Fill(destSet, ds.Tables[ i ].TableName); foreach (DataRow dr in ds.Tables[ i ].Rows) { destSet.Tables[ds.Tables[ i ].TableName].ImportRow ...Show All
SQL Server databases on SAN will not reattach @ SQL server reboot
Hello. I have a SQL 2000 server running on server 2003. The databases are located on a lefthand networks SAN. At SQL server reboot, the databases will not automatically reattach. You can however manually attach them. No, I haven't tried to automate the restart of SQL Server after the failure. If you're up to modifying registry settings, you could try to modify the service start order using ServiceGroupOrder settings to try and get SQL Server to start dead last. Here are some links that talk about it: http://support.microsoft.com/kb/115486 http://download.sysinternals.com/Files/WindowsInternals-Chapter4.pdf ...Show All
Visual C++ "...application configuration is incorrect"
I created a .exe application using Visual Studio 2005. My app. will run on my development system but when I use my target system I get the error message "...application configuration is incorrect." I studied the web site detailing the /MD option and how MSVCR80.DLL and MSVCRT.LIB become part of my code. I checked the Properties of my project in the project and the /MD option is set. I copied the MSVCRT.LIB and MSVCRT.LIB files to the same directories on my target system as they are on my development system. My app. still will not run. Maybe I need to install Visual Studio to get at the required files instead of copying them So, how do I get my app. to recognize the required .dlls and .libs I have studied other people's post ...Show All
Visual Basic Sami language characters
Is it possible to use the characters below that are not in the Ascii table when programming in VB 2005 A C3 81 E7 E7 00C1 LATIN CAPITAL LETTER A WITH ACUTE a C3 A1 E1 87 00E1 LATIN SMALL LETTER A WITH ACUTE C4 8C A1 A2 010C LATIN CAPITAL LETTER C WITH CARON C4 8D A2 B8 010D LATIN SMALL LETTER C WITH CARON C4 90 A3 B0 0110 LATIN CAPITAL LETTER D WITH STROKE C4 91 A4 B9 0111 LATIN SMALL LETTER D WITH STROKE C5 8A AF B1 014A LATIN CAPITAL LETTER ENG (Sami) C5 8B B1 BA 014B LATIN SMALL LETTER ENG (Sami) C5 A0 B2 B ...Show All
Visual C++ Converted from C: How to make it accessable from other .Net programs?
Hi there, I am familar with .Net in generial but really new in C++ .Net. Now I am charged with a task of converting an existing C program into .Net so that it can be accessed by our other .net components. Due to the complexity of the C program, re-witting is not an option for us. That's why C++ comes up as the tool for the task. I created a new C++ .Net project (class library project) and then created a new class file in it. Then I pasted my C code into the class. I also loaded all the header files needed into the project. After a bit of struggle I finally got it compiled! I can also see the DLL file generated. Big achievement, right While, only if I can figure out how to use it. What I want to do now is that I need to make this c ...Show All
Visual Basic Restarting Windows
I need my program to be able to restart the computer. However, when I copied the code off of http://support.microsoft.com/default.aspx scid=kb;en-us;176695, but when I run, I get a PInvokeStackInbalance run-time error at the OpenProcessToken line. So if the Microsoft code example doesn't work, does anyone else have an idea on how I can restart Windows Just wanted to second ahmedilyas' suggestion. Using: System.Diagnostics.Process.Start("shutdown.exe", "-s") Is by far the easiest way. You can run Shutdown / from a command line to find all the other parameters available; these allow you to restart, log off, or issue this command against a remote computer (if you have permission). ...Show All
Visual Studio Tools for Office Outlook add-in works only for me
My VSTO outlook add-in works for Me only on the test machine (Not the developement machine) I am installing addin using .msi I changed the registry settings as mentioned in the following thread http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=360200&SiteID=1 and my add-in is creating registery entries inside HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER I have changed custom action data for install to reflect allUsers = "1" still it is working for the user who have installed the add-in. Yes, you can use these variables on any machine. Do that and post the error you are getting... it will probably make more sense then! ~Joe ...Show All
Visual Studio 2008 (Pre-release) Can InkCanvas Keep element in bounds?
Is there a simple way to tell an inkcanvas to keep all elements within its bounds I don't want the elements to get dragged partially out of view. I am currently using DragCanvas, but thought I would check out InkCanvas too. I need the ability to resize elements and it's very nice that InkCanvas provides this functionality. ...Show All
Visual Studio 2008 (Pre-release) Passing additional parameters to the DataContext
Hello all, I am working on a ListBox where the selected item should a sub-ListBox (the idea is to simulate a top-level menu, and each menu has a sub-menu). I read Josh Smith's excellent blog-entry on setting the selected item's DataTemplate ( http://www.infusionblogs.com/blogs/jsmith/archive/2006/08/09/699.aspx ) And I worked on that to implement the sub-ListBox. I have the following within the DataTemplate of the top level listbox:- < local:SubMenuList x:Key = " subMenuListData " /> . . . < ListBox Name = " subMenu " DataContext = " {StaticResource subMenuListData} " ItemsSource = " {Binding} " ItemTemplate = " {StaticResource subItemTemplate} & ...Show All
SQL Server How to update my program with a database
I need help to decide how to proceed. I have written a program using vb 2005 express that will create menu items after the user presses a particular button. So if the user picks a mountain dew then inside the reciept window(list box) the user will see 1 MT DEW $1.00 also as the user selects more items the price is calculated and displayed also. This part of the program works fine. After using the program for a while I realized that I will need to update prices and be able to add and subtract items from the menu that customers order from. The way I accompolish this now is to go back into my code and rewrite alot of code. From reading the forums I think that a database would be a good solution because what I have gathered so far is t ...Show All
Windows Live Developer Forums MySQL, VE API, and around 1Million places to display
Man do i need help. i started off and got to this point and realised i was going in 2 opposite directions. i have a simple VE Map page using HTML/JS. i also have a PHP page that Queries a MySQL server and returns results. all i am looking for is how i would be able to do the following: allow a person to cruise(browse) the map in my simple page, and have 4 buttons to the side that would be toggled on/off to show 1 of 4 categories in my MySQL DB. obviously i realised with PHP it's server side and couldn't update on the fly. i am using a linux provider for this, which means no ASP.NET or any other gr8 MS jazz. the layout: MySQL-DB (name,address,type-of-place, lat, long). i currently dont have lat and long info (i'm guessing thats what everyon ...Show All
Windows Forms received NullReferenceException error while hitting "Edit" button in a Formview
The datasource of the formView is a sqldatasource object. But when I hit the "Edit" button in ItemTemplate view to access EditItemTemplate view, I received this error message: System.NullReferenceException: Object reference not set to an instance of an object. Here are my codes: Protected Sub formProf_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles formProf.Load Dim rowView As DataRowView = CType (sender.DataItem, DataRowView) ' Retrieve the state value for the current row. Dim PR_DO As String = rowView( "PR_DO" ).ToString() -- got error at this line ....... end sub I found out that rowView object is nothing. This means that the formview doesn't hav ...Show All
