Pamela Li's Q&A profile
Visual C# New to club starter kit invalidCastException error
Hello I have just started working with the Club starter kit and cannot understand how to rectify this error. Has anyone a suggestion please Dim lp As LocationsPicker = CType (FormView1.FindControl( "LocationPicker1" ), LocationsPicker) The preceding line of code is throwing up an InvalidCastException was unhandled by user code Conversion from type 'DBNull' to type 'string' is not valid Thankyou in anticipation Hi! Make sure you add a few locations to your list, because right now it's trying to find a list of locations, and it's not finding any, so it is returning ne ...Show All
Windows Forms Help with Print sequencing
I am working with a .NET application that renders pages to a printer in a specific order. I have the ordering down ok and according to my log file things are getting sent to the printer in the correct sequence. The trouble is that the printer is sometimes shooting them out in the wrong order. For the most part the order is correct but I have noticed this issue for a few forms. The client needs this sequence exact as they take these forms and will mail them out to the intended recipient. Any ideas on how to control the spooling ...Show All
Software Development for Windows Vista State Machine Workflow with partial Human Interaction
I am trying to design a State Machine Workflow which is partially controlled by humans using a asp.net website, and on the other hand controlled by the workflow itself. To make this clearer an example: A product is defined using an asp.net website. This starts the workflow. To actually kick the workflow off, clearance (approval) is needed. This is done by humans using the asp.net website. Then the workflow checks certain parameters of the given product. The first check to be made is to look if the product already contains the product number. If it does, the next state is entered. If not a delay is used, to give the system time, to u ...Show All
.NET Development How to decrease Form startup time?
Hello, I have a .NET Form that displays the contents of a directory. It works fine, but it can take 5 to 10 seconds to start and display. If I close it and start it again, it starts faster. How can the Form start time be decreased so the Form displays faster Thanks Mister T Another possibility is this simply has to do with caching... When you do a cold start, everything needs to be looked up off the hard disk to memory, which takes quite a bit of time. Subsequent uses may take advatage of bits of that data persisting somewhere aside from the hard disk, also there could be code around ...Show All
.NET Development Enumerate all Forms
I want to open dynamically some (dynamic) forms. How can I enumerate all WinForms of the current assembly How can I crate dynamic WinForms How can I save them VS05: Thanks for these hints. Some code for example: Open a Form dynamically by Name: Type ty5 = Type.GetType("testTree.ui.V3.frmTestBlockinggrid"); Form f5 = (Form)Activator.CreateInstance(ty5); f5.Show(); but how can I enumerate all (not only shown) winforms of an assembly Assembly a = Assembly.GetCallingAssembly(); Type[] mytypes = a.GetTypes(); foreach (Type t in mytypes) { Console.WriteLine(t.ToString()); } There are missing these Wi ...Show All
Windows Forms KeyDown/KeyPress/KeyUp wishes
This has really anoyed me for a very long time with .net and it really really really needs to be fixed. In VB6 on the Keydown/keypress and keyup events we could override the key that came in. As a result we could do things like all caps what the user was typing very easily even in controls that didn't have that property, simply by using& ...Show All
.NET Development problem with MSN messenger
im having a problem with signing onto MSN and I wasnt sure where to go to ask for help. so here i am. Ive tried to sign in over and over again and i keep getting an error message which says: Signing into MSN Messenger failed because the service is temporarily unavailable. Please try again later. 81000395. I checked the service status and it says that everything is up and running properly. What can i do to fix this This is not the place to ask questions about MSN. This forum is dedicated to questions relating to the System.Net namespace. Please see http://www.microsoft.com/community for an alternate forum for this question. ...Show All
SQL Server Export Embedded Data regions to Excel problem
I have a report that uses a matrix with an embedded table. There are no problems when you view/print it or export it to pdf. However when you export it to Excel the embedded table does not display. Instead the message 'Data Regions within table/matrix cells are ignored' appears where the table should be. Is it not possible to view embedded data regions in excel or perhaps some setting I have missed. I'm using Reporting Services 2000 with Service Pack 2. thanks Scott Then, did you changed the all reports OR you still living with this problem. I am also facing the same problem but am undecisive about the way I ...Show All
Windows Forms Change Pointvalue in a PropertyGrid during runtime
I develop a vb.net 2005 application with a PropertyGrid. The PropertyGrid contains a point Value I'd like to change during runtime. Here is my CodeSample ... Public Class clPropertyWall Private adStartPoint As Point <DesignOnly( False ), DefaultValueAttribute( "" ), [ReadOnly]( False )> P ublic Property StartPoint() As Point Get Return StartPoint End Get Set ( ByVal Value As Point) adStartPoint = Value End Set End Property End Class When I want to change the PointValue during runtime ... Private Prop as new clPropertyWall Prop.Startpoint.x = 1 I get the errormessage "The Expression is a value and therefore cannot be ...Show All
.NET Development Simple TSQL called by ADO fails
(SQL 2005) I have a program using ADO that sends a line of text to SQL Server to be executed. the line is essentially: if exists(select 1) DELETE C_Codes WHERE category=13; I can't get the DELETE clause to execute in ADO even when the if exists clause is clearly true (works fine when manually executed in Management Studio). Can someone explain why this doesn't work, and what I need to do to make it work Thanks. hi there, create an sp and call the sp from ado hope this works. It looks like a batch to me rather than a single query ...Show All
Microsoft ISV Community Center Forums Excel edit mode
How can i detect "edit mode" in excel macros Thank's for idea(s) Yes but Application.Ready is not an event !!! and tranfsorming a state reading in an event by a timer is ugly and buggen!!!! ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Can I develop the DX10 and DX9.0c application use VC++ 6.0?
Can I develop the DX10 and DX9.0c application use VC++ 6.0 My develop environment is VC++ 6.0 and installed VSSP 5.0. VC++ 6 hasn't been supported by the DirectX SDK for quite a while now. If you go back far enough you can use DX9, but I think it was somewhere around December 2004 that VC6 support was dropped. The short easy answer is no. You'd be better of downloading VC++ 2005 Express (which is free) and using that. ...Show All
Visual Studio Query Builder Re-use
Hello, I have been trying to find the interface or Factory that would allow me to interact with the Query Builder that is used when adding a query to a DataSet. I have been looking in the Microsoft.VisualStudio.Data namespace but have mainly found the DataConnectionDialogFactory or the DataConnectionFactory... But I haven't been able to track down the Query Builder.... It looks like the Query builder is a reusable interface that has a connection string and query passed to it, but I can't find it for the life of me.. Anyone know how I can create an instance of the Query Builder from my code Thanks for any help Tim ...Show All
.NET Development socks proxy and HttpWebRequest (.NET 2.0)
I have a socks proxy ( not it is not a http proxy, but one obtained by example with putty -D 8080 somehost.com ) How do I redirect my HttpWebRequest to use this proxy, just like I could set up the socks proxy in internet explorer. I've seen some examples with HTTP proxy, but it's not the same. For example, when I try: HttpWebRequest request = (HttpWebRequest) WebRequest.Create(@"http://www.whatismyip.com/"); request.Proxy = new WebProxy("127.0.0.1",8080); byte[] c = new byte[1001]; request.GetResponse().GetResponseStream().Read(c, 0, 1000); I get an exception that the underlying connection has be ...Show All
Visual Basic Retrieve the ID of a new row
I have two table: Category and Product. The second one has a column CategoryID referring to the Category ID. Now, I need to add a the same time a row on Category and a row on Product with Product.CategoryID =Category.ID If a create a new row on Category I don't know the ID value of this, because it's autonumber and I don't set it, it's automatically created. If I have to create just after that the row on Product, how can I set the CategoryID How can I find the value of ID of the new Category row just created Thanks in advance Dado I would like to make a slight change to the info above. that I wrote.. I ...Show All
