Pascal Mignot's Q&A profile
Visual Basic Using the StreamReader class with a remote system
I'm using a StreamReader.EndOfStream property on a VB 2005 application logged in to a remote SSH server to determine when it has sent data; but intermittently when it reaches the end of a block of data, the VB 2005 debugger renders the property as "error: cannot obtain value" and the StreamReader.Read method hangs up on reaching the end of the data. The code is inside a Try...Catch block, but no error is triggered. How is the end-of-stream property determined (via Peek, maybe ) and is there a way to distinguish between True, False, and can't-tell for EndOfStream Just to wrap this up, I developed a workaround by reading a byte at a time and watching for character string that I know marks the user ...Show All
Visual Studio Express Editions How to search listbox for "Full Name" using lastname/firstname
I'm using vbexpress with MSAccess backend on WINXP sp2. I want to be able to search a listbox which is pre-populated with "lastname + firstname". I want to type my search string in a textbox and have the listbox select the first occurence of a match. I know about the "findstring" method but my quest is slightly more complicated. I want my search string to be a combination of lastname and firstname with a de-limiter. For eg: Listbox contains: Bloggs Joseph; Blocks Jim; Bloggs Joe; My search string may be "Blo / Ji" where forward slash is the delimiter between the lastname and firstname. This should have "Blocks Jim" automatically selected by the listbox. NB: The delimiter can be anythin ...Show All
Visual Basic VB.net how to do a dowhile loop for datatable
Dim dRow As DataRow For Each dRow In Employee.Rows If (dRow("NumberKey") = "1756") Then "blahblahblahblah" End If Next the point is that i have to scan through all the rows in the Employee datatable to look for one numberkey. It is not very effecient I want do to do a loop that will stop right after i am able to match the numberkey with the number i m trying to find. can someone help me.. it is sorta of like a do while loop in C++, but this is for a datatable Sounds like you need to do a little reading on SQL. The SQL Statement is probably going to look something like. SELECT ID, NameField FROM Table1 INNER JOIN Table ...Show All
Software Development for Windows Vista Windows SDK Documentation
Hello, If you have the Windows SDK and Visual Studio installed, you can help me. Please tell me if your Windows SDK documentation is integrated with your Visual Studio 2005 documentation. Thankyou. Because mine isn't. Assistance appreciated. I did a clean installion of Visual Studio on Vista RC2, and I installed the following additional items in the order shown. installed VS2005 sp1-KB918525-X86-Beta-ENU installed MicrosoftR WindowsR Software Development Kit for RC 1 of Windows Vista and .NET Framework 3.0 Runtime Components installed Microsoft Visual Studio Code Name Orcas Community Technology Preview – Development Tools for .NET Framework 3.0 - vsextw ...Show All
Visual Studio 2008 (Pre-release) animate listbox items to scroll
how to animate listbox items to scroll and fade out If you bind the ListBox to an ObservableCollection<Whatever> then you can hook it's CollectionChanged event. In that event handler, if you notice that an item was added to the collection, call ScrollIntoView on the ListBox, passing in the new item. ...Show All
Visual Studio 2008 (Pre-release) Root object(class) in Domain Object Model
I have a question, the question is: In the ADO.NET vNext Entity Data Framework how do I solve the problem of having a root object in my domain model Let's say in my domain object model I have to have a root class from where every other class will be inherited. Obviously the root class does not need to be persisted, it simply adds some behavior to all the objects that I am going to use in my application. While playing with the August CTP, I noticed that I could not make this work. Maybe I'm missing something. Maybe there are ways to get around this problem, can anyone please shed some lights on it I replied to the other thread here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=70336 ...Show All
Windows Forms Graphics: How to create smooth Clip region?
Hello, I am trying to create a graphic that looks like a donut. The outside of the donut is smooth, but the inner circle of the donut is not smooth. Question: How can I make the inner circle smooth Here is the sample code. Thanks for any suggestions: ' ' Create circle Dim myCircle As New Drawing2D.GraphicsPath myCircle.AddPie(80, 80, 80, 80, 0, 360) ' Create cutout Dim innerCircle As New Drawing2D.GraphicsPath innerCircle.AddPie(95, 95, 50, 50, 0, 360) Dim innerRegion As New Region(innerCircle) ' Display e.Graphics.SmoothingMode = SmoothingMode.AntiAlias e.Graphics.ExcludeClip(innerRegion) e.Graphics.FillPath( New SolidBrush(Color.Green), myCircle) ...Show All
Visual Studio 2008 (Pre-release) Is it possible to do a MasterDetail Binding with a TreeView?
I used a ListBox and did a test on MasterDetail Binding and that works find. But if I have a TreeView is there any way to do MasterDetail Binding Example a preview box in a file dialog window /godzilla9 It seem that this is working only for the first level of the tree. I would like to list all childs of any nodes of my tree and for leaves, display their properties. For atomic node I bind textBox in code like this void SelectionChanged(object sender, RoutedPropertyChangedEventArgs<object> e) { TreeView tree = (TreeView)sender; Binding myBinding; myBinding = new Binding("CountryName"); myBinding.Mode = BindingMode.TwoWay; Country c = (Country)tree.Selec ...Show All
SQL Server Error: System.Runtime.InteropServices.COMException ...
Error: System.Runtime.InteropServices.COMException (0x80040428): Exception from HRESULT: 0x80040428 at DTS.PackageClass.Execute() at Microsoft.SqlServer.Dts.Tasks.Exec80PackageTask.Exec80PackageTask.ExecuteThread() Can anyone tell what caused this error when I tried to run the DTS package from my SSIS package Thanks. Steve If you trust the internal logic of your package, then an error condition - especially from an Agent job - usually points to the package's interaction with external resources; in particular, to permissions issues. That's probably why no longer trying to write to an exception file solved the problem for the other gentleman. Check the package's use of database connections and file system resources, ...Show All
Visual Studio 2008 (Pre-release) BindingList<T>, works via remoting but not via WCF
I have a custom list EntityCollection<T> which inherits from BindingList<T> When I try and get one of these custom collections through WCF I get an error similar to that below; >> Type 'System.DelegateSerializationHolder+DelegateEntry' >> with data contract name is not expected. Add any types not >> known statically to the list of known types - for example, by using >> the KnownTypeAttribute attribute or by adding them to the >> list of known types passed to >> DataContractSerializer. Im not using a generated proxy, I am using the same assembly both on the client and the server (this is a closed system) this seems to work fine via .NET remoting - how can ...Show All
.NET Development .Net Silent Install?
can i get the .net framework to install silently so the user has no interaction with it, besides obviously accepting the EULA, then i can throw a progress bar up so they can know it hasn't frozen and is doing something. Also, there are some additional unattended installation options for the .NET Framework 2.0 described at http://blogs.msdn.com/astebner/archive/2006/07/02/655011.aspx . Thanks! Aaron ...Show All
Windows Forms How to show the caps lock is on balloon warning like Windows
Does anyone know how I can show that balloon that windows shows when you are trying to logon and your caps lock key is on There are some VB examples out there of how to show balloons, but I need to show one using C# not VB as a warning to users when their caps lock key is on and they are trying to logon to an internal system. Anyone have any links to how to do this in C# or some C# code that will do this I would appreciate it. Thanks, Nathan Ok, I have re-written the vb code into a c# class that will create the balloon tooltip, but I'm having a problem with one piece of it. The class shows and works fine except for when my Timer_Elapsed event occurs. For some reason the Destroy method isn't doi ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Sprite scaling and blending
OK, I've searched through a couple posts here and didn't find anything that fixed the problem. I'm scaling sprites to draw GUI controls and I'm getting funky results. Here's what I get (blown up 6x to show the problem). I'm drawing the box in chunks - upper left 4x4 pixels, upper right 5x5 pixels, left border, right border, lower left 4x4 and right 5x5 pixels, and upper and lower middle sections.I don't think I have to explain what the problem is. I've tried setting texture filtering, destination blending, but nothing seems to affect it. Here's the sprite I'm using to draw. Maybe I just need to get some sleep. The problem is that there isn't really such a thing as a "single pixel". In a mathematical sense, a pixel i ...Show All
Internet Explorer Development How to detect tab-change in IE7?
Hi I'm wondering if anyone knows how to detect when a tab changes in IE My toolbar has to detect when a) A tab changes site (This I already do by Navigate and DocumentComplete) b) When you change between tabs (this I have no idea how to do). I know there is a DWebBrowserEvents2::WindowStateChanged I maybe could use but I have no idea how to use it The only thing I've been able to even think about up until now is to create a thread that runs every second and checks what tab is visible, if it's not the one that was visible last check then fetch the document URL location from that, not that I've even gotten that to work very well... So I was hoping someone might be able to help me out, maybe show me some code on how to achieve knowing when th ...Show All
Visual Studio 2008 (Pre-release) Accessing events of items rendered by HierarchicalDataTemplate?
I'm using HierarchicalDataTemplates to render a data structure into a TreeView: <HierarchicalDataTemplate DataType="{x:Type CS:ShaimContactGroup}" ItemsSource="{Binding Path=Contacts, Converter={StaticResource OfflineItems}}"> <TextBlock Style="{DynamicResource ContactListGroupName}" Text="{Binding Converter={StaticResource GroupNamer}}" /> </HierarchicalDataTemplate> I know that the rendered items will be TreeViewItems since the objects are always being inserted into a TreeView object. My question: I want to capture TreeViewItem events like Collapsed and Expanded. How can I accomplish this The following code should do th ...Show All
