paul one's Q&A profile
Visual Studio 2008 (Pre-release) VisualBrush at Runtime BUG?
Hi, I'm filling a visualbrush using a custom control at runtime. I have something like this in my main window: <object> < DiffuseMaterial > < DiffuseMaterial.Brush > < VisualBrush x:Name = " visualBrushCustom " ></ VisualBrush > </ DiffuseMaterial.Brush > </ DiffuseMaterial > In the code behind: void Window1_Loaded( object sender, RoutedEventArgs e) { customControl = new CustomControl (); visualBrushCustom.Visual = customControl ; ..... BUT The customcontrol is not rendered as visualBRush. If I insert the customcontrol inside my window and then redirec ...Show All
Windows Forms ReadXml with ProgressBar
Hi, i am getting a stream from a ftp server... I am reading this stream to a dataset... My stream is about 4-5.MG, so i have 2 options: To download my xml file from the ftp server, to save it localy on my computer. In this way i can make a progress bar of my recived data... and i can know how much time left... The other way is to read the stream directley from the FTP server... This way is better because of the performance. But in this way i can make only a progress bar that is moving left and right (marquee)... Is there a way to read the stream from the FTP server, to my local computer without saving a file on my drive ...Show All
Visual Studio Express Editions how to code to make application icon goes to WINDOWS notification area when "minimize" is clicked in c#.net 2005 ?
some programs can be moved to notification area instead of just go to taskbar when "minimize" is clicked, how to do this with c#.net2005 windows form applications plz help Take a look at what the NotifyIcon provides for you ( http://msdn.microsoft.com/library/default.asp url=/library/en-us/vbcon/html/vboritrayiconctltasks.asp ). With a little extra logic in your forms Resize event handler, you can check the value of WindowState and hide the form when minimized and show it when it’s coming back from being hidden, all the while toggling the Visible property of the NotifyIcon. ...Show All
Windows Forms How to bind 2 columns of data table to one datagrid column
Hi, I have 2 datatable columns, firstname and lastname, and I want to bind them to a single column of datagrid. How can I do this Also, if I want to do some formatting, like adding a comma (,) after the last name such that the datagrid column rows look like "LastName, FirstName" how can I do that Thanks, Create a new aggregate datacolumn and bind that to the datagrid Dim dc as New DataColumn() dc.ColumnName = "FullName" dc.DataType = System.Type.GetType("System.String") dc.Expression = "lastname + ', ' + firstname" myDataTable.Columns.Add(dc) ...Show All
.NET Development C# 2.0 Convert Bitmap to Icon
Hi There I am using .NET 2005 Beta 2, and am trying to write a utility program that converts icons to bitmaps. The following function creates an icon file OK, but the icon file is not properly formed. When I try to open it using Visual Studio I just get a heap of jumbled characters. public void BitmapToIcon(string sourceFileName, string destFileName) { // Create a Bitmap object from an image file. Bitmap bmp = new Bitmap(sourceFileName); // Get an Hicon for myBitmap. IntPtr Hicon = bmp.GetHicon(); // Create a new icon from the handle. Icon newIcon = Icon.FromHandle(Hicon); &nb ...Show All
.NET Development Did asynchronous execution change in 2.0
hello, i have this code that called method asynchronously through the delegate class with the begininvoke and endinvoke methods. Exceptions could be thrown withing the methods which were always caught by the framework and rethrown when endinvoke was called. Has this now changed as my exceptions are no longer being caught and rethrown, and just bringingt the whole app down as they are unhandled. he is sample code that i use to denote the changes. .net 1.1 /// <summary> /// Summary description for Class1. /// </summary> class Class1 { private delegate void ThrowExceptionDelegate(); private static bool stop; /// ...Show All
Visual C++ declare/initialize int?
Hello, I wish to have an integer inumber to use as the index in myArray[inumber] How do I declare/initialize this value Also can I have something similar to the C# code of private string[] results; results = new string[myArray.Length]; Thanks Geoff Jonathan, I got there just before your message - largely by trying anything I could think of! Thanks Geoff ...Show All
Smart Device Development Serial Port DataReceived Event in .Net 2.0
Hi there, This is driving me crazy, I cannot seem to get the DataRecieved event to work on the Pocket PC using the new serial port class in Visual Studio 2005 with C#. The DataRecieved event just never seems to be called. I can write data to the port just fine. Here is some very simple sample code that reproduces the error:. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO.Ports; namespace SerialTest { public partial class Form1 : Form { ...Show All
Visual Studio Team System False positive on IndexersShouldNotBeMultidimensional
I'm implementing a custom XmlReader with base class XmlReader. IndexersShouldNotBeMultidimensional is firing on the method /// <summary>See <see cref="XmlReader.this"/></summary> public override string this [string name, string namespaceURI] { get { return GetAttribute(name, namespaceURI); } } However this is an abst ...Show All
Software Development for Windows Vista Creating Vista-like applications .. Which SDK/API to use?
This maybe a silly question, but what API/SDK do I use to create Vista-like applications I mean following the Vista UX style guidelines; creating the open/save dialogs like we have in Vista, changing the look/feel of various controls, etc. I know for sure WinFX is not the one...since this is not a platform SDK. There's a platform SDK( Longhorn Beta 1) on MSDN, but it just looks like a regular sdk (nothing special). A easy example is how do I get the File->Open dialog you see in the latest Vista builds (I am using the Vista beta 1 build). Thanks, Keeron Thanks, one of the recent videos on Channel9 men ...Show All
.NET Development NullReferenceException when accessing DataTable.Rows
I feel sure there must be a simple explanation for this that I am missing, but I have searched the help files and Googled for HOURS and I'm at a loss. So I'm hoping someone out there can see what I'm missing. I'm trying to get data from a table in a dataset and build a string, which I will later write to a file. But when I try to access the rows in the table, I keep getting a NullReferenceException. I've tried several different approaches, all copied straight from .Net help files, but I always get the same error. I know there is data in the table because I displayed it in a datagrid with no problem. ...Show All
Visual Studio Team System Load of fxcop input assembly failed
In Vis Studio 2005 beta 2 I receive the 'Load of fxcop input assembly failed' when I open my c# project. I have read the material at the thread shown below http://forums.microsoft.com/msdn/ShowPost.aspx PostID=2386 It does not seem to apply to my project, as I have the output path under the project directory. However, I observe that, after a build, beneath my project directory, I have a both a bin\debug and a obj\debug. The obj\debug contains myapp.exe and a myapp.pdb, whereas the bin\debug contains only myapp.vshost.exe. When I do a start (with or without debugging) from the debug menu, I get a long message about how bin\debug ...Show All
Visual C# Editor
I had a *quick* look through the Tools > Choose Toolbox Items... menu but the list is far too big for me to check out every single item. My question is; is it possible to use the editing component from the IDE in our own applications I want to build a nice script editor for my application with code folding, syntax highlighting, intellisense, etc. I don't mind how the colouring is done, even if I have to add my own RTF code at specific places or similar, it's the code folding I'm interested in. Basically I want a textbox that is capable of code folding (think of the treeview type bars on the ...Show All
Visual Studio Team System Install ok but error messages connecting to TFS from client
I have installed a single server (WORKGROUP) setup of TFS without any issues in the installation routine The only non-standard selection I made was not to enable the Team Foundation Alerts. However when I try and connect a TFS client, I get the following error message in the client window :- TF30291: There was a problem on the server of unknown cause. See the Team Foundation Server event log for details. Time 2005-10-14T10:09:53:562 Looking in the event log on the TF Server I get two messages :- Type : Error Event ID:3000 An unexpected condition has occurred in a Team Foundation component. The information containe ...Show All
.NET Development FTP to IP address
I need to send a text file on the local machine to a unix server. I know the IP address, username & password to connect. I have tried using the following line of code: My .Computer.Network.UploadFile( "c:\test.txt" , "10.2.2.10" , "username" , "password" ) This gives me the following error: '10.2.2.10' is not a valid remote file address. A valid address should include a protocol, a path and a file name. Parameter name: address Do I have to specify the destination path on the remote server If so how do I specify that with an IP address Maybe like this ... 10.2.2.10/foldername/su ...Show All
