Emmanuel.Pastor's Q&A profile
Visual Basic Working with list in VB.net
I have this save method that loops through the list and saves the items one by one....The problem is that when it gets to the last element in the list...my boolean variable thinks that it is a new object and tries to Insert it and i get a Sql Exception...This works fine as long as its not the last object in the list....Once it gets to the last value is when it breaks......any help with that issue here "Violation of PRIMARY KEY constraint "". Cannot insert duplicate key in object "". Public Sub Save() Dim intCount As Integer = list.Count Dim intI As Integer For intI = 0 To intCount - 1 Token = list.Item(intI) Token.Save() Next End Sub Public Overrides ...Show All
Windows Forms User and password in code
Hi If i use this code: My .Computer.FileSystem.CopyDirectory(mappe, "//kursist/kursister$/" & combotype.SelectedItem & taltekst & "/" & mappe2, True ) Can i then send a username, password with this code Regards alvin With some PInvoke you could try if impersonating the current thread with that user does help. See here: http://support.microsoft.com/kb/319615/ But your first goal should be to give the user access to its resources (share and directory in this case) who runs the application, to benefit from windows integrated security. -- SvenC ...Show All
Visual C# Check if laptop has low battery? or if not connected to A/C possible?
Hello all, I am using a Dell Laptop (Latitude D520) and I was wondering, is it possible to write a program that checks if the A/C adapter is plugged in or if the battery is getting low, to notify the user I know dell provides a program to do this, but i would like to make my own and access this information myself. TIA! A recent Coding4Fun article You can Take it with You, Part 1 discusses this topic in both C# and VB. ...Show All
Gadgets CSS problem
I am trying to add a link on my gadget that can bring a tooltip when hovering.. This CSS code is not working so far... .Gadget .changecolorfont a:hover { text-decoration : none ; font-size : x-small ; color : gray ; } Any suggestion is appreciated... Hello ; try with this css code : .Gadget_ changecolorfont a:hover But it is not sure ! ...Show All
Visual C# How to Change the Security settings of IE programatically
Hi All, I want to change the security level of the Internet Explorer for Internet Zone to medium.By default its value is high for Windows Server 2003. I want to do it through my C#.net application. How this can be done Thanks, Nupur Hi, Yes it is solved. I was able to modified the CurrentLevel value in the HKEY_CURRENT_USER\software\microsoft\windows\internet settings\zones\3 using the RegistryKey class. Thanks, Nupur ...Show All
Visual Studio 2008 (Pre-release) ColorAnimation, Binding From Property
Hi guys, May be someone knows how can I bind "From" Property of the ColorAnimation list.cs /////////// private Color m_ListColor; public Color ListColor { get { return m_ListColor; } set { m_ListColor=value; OnPropertyChanged("ListColor"); }} list.xaml /////////////// <ColorAnimation Storyboard.TargetName="fillb" Storyboard.TargetProperty="(SolidColorBrush.Color)" From="{Binding Path=ListColor}" To="#111111" Duration="0:0:0.1" /> There is an exception in Presentationframework.dll Appreciate any help, Irina try changing From="{Binding Path=ListColor}" to From="{Binding E ...Show All
SQL Server Connect ms sql db with oracle db
please suggest me the steps and screen shots to connect oracle db and ms sql server db and vice versa so that we can push and pull data from both databases ...Show All
SQL Server measure using calculated member
I have fact and 2 dimensions. i have to create a mesure using calculated member. fact is having fkey ckey monthid hits responses CDIM is having Ckey ADateID MonthDim is having Monthid MonthName now i want a measure(XYZ) to be calculated using calculated member as Count of Ckey for AdateID = '20000101' for current member of monthdim. finally when i browse thru a cube it should display some thing like below. Monthid XYZ 200601 1000 200602 2000 Thanks in adv Lets take this offline. You can email me at stevepon@microsoft.com It would be helpful if you could send me a copy of your project files so I could better understand the relationships. Ste ...Show All
Game Technologies: DirectX, XNA, XACT, etc. GraphicsDevice error during compiling
No matter what I try to compile, whether it's a tutorial, sample game code, or just a blank blue screen after starting a new project, I get this error: NoSuitableGraphicsDeviceException was unhandled The values used in the attempt to create the GraphicsDevice were invalid. The code is namespace WindowsGame1 { partial class Game1 { /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.graphics = new Microsoft.Xna.Framework.Components.GraphicsComponent(); this.GameComponents.Add(this.graphics); } private Microsoft.Xna.Framework.Components.GraphicsCompon ...Show All
Visual Studio Class Designer & Project References Error
When a Solution contains many projects and a projects contains reference to another project in same solution, then if I try to open Class Designer File, its throws error which says "Cannot Load '[Class Designer File Path]' Object reference not set to an instance of an object; but if I remove all project reference from that project, class designer files open normally, but then project won't compile. I reinstall Visual Studio, even reinstall windows, but nothing works. What should I do No, My documents folder is not on network share, its on another drive "E: Drive" and the Path to My documents Folder is "E:\DOCUMENTS\Anwar's Documents\My Documents" ...Show All
.NET Development problem service starting from web app
i can working on windows services. but i can writing on asp 2.0 and starting service on asp.net serviceController sco=new ServiceController("ServiceName"); sco.Start(); has error =Cannot open "ServiceName" service on computer '.' have error when start service. any idea Make sure the ServiceName actually exists. Remember that the services' Display Name may not be the same as its Service Name. Also does the user who is running the ASP.Net 2.0 app have access to start services You may need to run it with a user with higher priveledges. ...Show All
Smart Device Development Identify Incoming call
Hi, I have a question about Phone call. Programmatically How to identify incoming call that comes for me Can i do this thru Phone APIs I could retrieve call informations (missed calls, Dialed calls...) by using Phone APIs. Please send your suggestions or links. Thanx. M. GANESAN Hi If you are using Windows Mobile 5.0 devices use the State and Notification Broker. This API provides all information you need (class SystemState ). For instance SystemState.PhoneIncomingCallerNumber returnes the phone numer of an incomming call. Hope this is what you are looking for. Michael ...Show All
.NET Development Web Services, Serialization and Interfaces
Hi, I'm writing a Web Service layer. I would like to use interfaces to pass data in and out, this will allow the server and client to have different implementations and allow for example the DBA to change the database structure and server implementation without the client apps needing to change their implementation, but.... XmlSerializer can't serialize interfaces... I don't want to have the same implementation on server and client, and using interfaces seems to be the "correct" way of doing this. Has anyone encountered a solution to this problem I understand the reasoning behind XmlSerializer not being able to do this, but I can't understand why it shouldn't! Any help would be greatly appreciated... Kev ...Show All
Visual Basic Sigh - I remember one-based.
Well, I know this is nothing new, but: What's with this zero-based (nearly) everything For i = 1 to Thingy.Count or For i = 0 to Thingy.Count -1 It is simply not true that the first element of anything in the universe is ZERO. It is not common-sense thinking. "How many items do you have in your hand " "One" "Show me the first item" "Error, you should have asked for the zero-th item" ha ha ha I would like to request that two versions of the .Net Framework be made available. One for those who love zero, and another one for those who love one. 0 Based arrays is a hold over from the days of C (more appropriately B but it was made pop ...Show All
Software Development for Windows Vista How to create default fault handler for state machine workflow
Dear all, A few months back, I asked the question: Trevor E Hilder wrote: 1) It is a major irritation that I cannot apparently define a fault handler for the whole state machine workflow (which can be done in a sequential workflow). Is there any way to provide such a global fault handler, which can then be overridden by local ones inside the states Paul Andrew kindly replied: You can create a super state that contains all of the states in your workflow. This superstate can have a fault handler which applies to the whole workflow. I asked him for clarification of how to do this, but he didn't reply and I got involved in other issues. I have just tried to do what he suggested, b ...Show All
