TinyGuan's Q&A profile
Windows Forms PropertyGrid and ListBox
Hi All Can someone show me an example of how to place a "ListBox" property within a PropertyGrid I am working on visual studio 2005. srinivasa rao Changing the order by which properties within a category is displayed is doable, however, changing the order of categories, well as far as i know and please anybody correct me if i'm wrong, that is not possible! However, I'll do some researching and get back to you i find anything. BTW, one other thing that i couldn't do with the property grid, is to change the proportions of the column widths, the area covered by the help text and commands text ... etc. You know, the internal dimensions of the property gid. This is one other thing that i think is not possib ...Show All
Visual Studio Team System Migration, common code- Sync between VSS and TFS?
Are any new tools available that would help with the migration period from VSS to TFS. We want to move product teams over one at a time, but they rely on common code that spans teams. So we want have VSS changes sync'd with TFS so that the team migrating to TFS can work on TFS and teams still using VSS can continue to do that. Are there other ways people are dealing with common code during a migration Thanks The best estimate for the toolkit that I can give is later this spring. We are still in development, and as we near our release I will be blogging on the TFS Migration blog. Also, thanks for sharing your experiences with the CSConverter. -Matt ...Show All
SQL Server How to insert an image or logo on the report manager?
Is there anybody who knows how to set up the report manager so that it will display an image on the home page of the report manager Thanks! Adam, Thx for your response. I want to confirm one thing with you. In order to use my own image, do I have to delete the 48folderopen.jpg file and paste my own image Please tell me the proper procedure. Sincerely, ...Show All
Visual Studio Team System Cannot connect from clients
I cannot connect from VS2005 clients to the TFS. The server runs Windows 2003, firewall disabled. The client runs XP Pro SP2, firewall also disabled. When I open Visual Studio from the server (TFS does install Visual Studio standard, right ), I can connect to the server with Team Explorer. However when I try to do the same from the client machine I get an error TF31002: Unable to connect to this Team Foundation Server. Both machines are in a domain, the Active Directory user that is logged in the client is part of the Team Foundation group Project Administrators. From the client I can access for ex. http://<server_name>:8080/VersionControl/v1.0/Repository.asmx so it should not be a connection problem. Any suggestion Thanks, Francesco ...Show All
Visual Studio Express Editions sending a value to a method
Hi, How can I send a value to a method. In the code below when the Analog value has change I would like to send the new value to PictureBox4_Paint. Module Module1 Public AnalogValue As Short End Module Public Sub PictureBox4_Paint( ByVal sender As Object , ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox4.Paint Dim B As New SolidBrush(Color.DarkGray) If AnalogValue >= 100 Then e.Graphics.FillRectangle(Brushes.Red, 0, 0, 10, 5) Else e.Graphics.FillRectangle(B, 0, 0, 10, 5) End If If AnalogValue >= 200 Then e.Graphics.FillRectangle(Brushes.Red, 0, 10, 10, 5) Else ...Show All
Windows Forms How to record screen?
Hi I wish to record the desktop/screen/particular window. The user clicks record button and recording starts till user clicks stop button. How do I access different windows from c#.net The window can be a webcam window of skype/yahoo or a windows media player playing a clip or the desktop !! Thanks Aseem Chiplonkar Hi Thanks for the links. I wanted to know about recording the screen/window as a video file. The article is about taking a screenshot. I got some tools online which does that but I was curious as to how I can have my own Thanks, Aseem Chiplonkar ...Show All
Visual C++ How do I set nCmdShow parameter in WinMain()?
Hello, I am new to windows programming and have a question. How can I set the parameter for the "int nCmdShow" argument in the WinMain function. The function definition on MSDN gives the list of possible parameters but I cant figure the syntax to put them in the function Like how can I use SW_MAXIMIZE as an argument in place of int nCmdShow to specify I want the window to show maximized initially This is the test program I am trying to work with: #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <windowsx.h> int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int nCmdShow) { MessageBox(NULL, L"What's up world!", L"My First Windows Program", MB_O ...Show All
Visual Basic Fonts and comboboxes
I know how to list the fonts in a combobox: Public Sub ListFonts() Dim FontName As FontFamily For Each FontName In System.Drawing.FontFamily.Families Form1.Tool_Font_Fonts.Items.Add(FontName.Name) Next End Sub This works very well; however, I do have a little challenge. While the fonts are bing populated I would like to display the style it's self, such as: Tahoma Arial Verdana Time New Roman Is there any code out there that some one knows I would really like to add this litte feture to my program. I'm using VB 2005 Express if that makes any difference. Thanks There is a sample on the vb-tips website . ...Show All
SQL Server XML versus sql querry
Hello, I have a question regarding building asp.net app with membership I have an asp.net application with membership. Members have their attributes and those attributes together present users's profile. I am asking myself, which solution would be better to display user's profile to other users (frequently). 1. on each request data would be grabbed from userProfile table and other tables where parameters have their descriptive names. For example. Field userEducation would be of tiny integer type and you would read english description of that parameter from table parameterEducation (like id 1 idDesc primary schooll) etc. 2. second solution is some routine which would build xml file with all user attributes, after user complete his/ ...Show All
SQL Server Time of last table write
Greetings. Can TSQL be used to retrieve the date and time of the last time a table was written to Thanks. alan Alan: TSQL can be used to retrieve this information IF your tables are constructed support this kind of activity. We typically keep (1) create_user, (2) create_DT, (3) mod_user, (4) mod_DT as standard data elements of our tables. These columns are updated by trigger whenever a record is inserted or updated. If your tables do not retain this type of information you might want to consider adding it. Understand that this does add some overhead; however, there are times in which this information is a quite valuable. Dave ...Show All
Visual C# Setting the FirstDayOfWeek for a DateTimePicker
My preference for when a week starts is Monday - Sunday. When wanting to find out the day of a DateTime I use the DayOfWeek enumerator. However, this enumerator has the days listed from Sunday - Saturday (i.e. index 0 - 6). I've quickly checked the Control Panel settings and couldn't find anything about setting which day a week starts on. Also, I couldn't find a Property setting to specify this either. Like using MonthCanlendar.FirstDayOfWeek, is it possible to set which day the week starts on for a DateTimePicker Regards, Dr C# You can't change that. It depends of current thread Culture, and if you don't change it will be the current user regional Format. First day of week is not the onl ...Show All
Visual Studio 2008 (Pre-release) Problem: Channel closed after 10 minutes of inactivity
Hello, I am developing a client server application. The client openes a channel via NetTcpBinding on start up and closes it on shutdown. Instead of a generated proxy I am using ChannelFactory.CreateChannel(). The server uses InstanceContextMode.PerCall. After 10 minutes of inactivity the channel seems to be closed automatically. On the next call to the server I get a communication faulted exception because of the closed channel. How can I change the timeout value by code I am using the July CTP. I have attached the client code. Thanks for your help! Regards, Christoph Client code: private static IGlobalService Boot() { NetTcpBinding binding = new NetTcpBinding(SecurityMode.Message); binding.MaxConnections = 100; b ...Show All
Visual C++ Executing Code
I have used Jcreator, CodeWarrior and a dozen other compilers for various languages. Now I am using Visual C++ express to compile code (in C++ of course) and I seem to have run into a snag. In literally every toher compiler, there is a prominent 'Execute' button, however, I have looked, searched the database (as futile as that was), searched through everymenu, enquired throughout the digital world, looked at instruction s and lessons and everywhere I thought an answer could be found, and Lo, I have not discovered where Visual C++ Express has hidden its 'Execute' command/button. My professor has some version of Visual C++ where there is a single button that both compiles and Executes code, but Express apparently has no such thing. ...Show All
Smart Device Development Playing mp3s in an application on PPC 2003 using VB
iv created a alarm clock for windows mobile 2003 which would actually wake me up in a morning compared with the standard one you get with it. all i need to do now is get a specific sound file i want to play... does anyone know how to play sound files i have tried including WMP on to the form like you can with desktop applications but that doesnt work - it will not let me include it on the form. so is there any other code i can get to play the sound file or maybe a way to start an application like my MP3 player i have on it through coding (this would be better). please help its rakin my brain thanks alot Stuar I have faced with the similar problem recently. I wrote C++ DLL which export a function playing MP3 with the help o ...Show All
.NET Development Get source code file path at runtime
I would like to get a source code file name and full path at runtime for a specific class. Say I have a type MyClass and I want to use reflection or PDB to get the source code for that class. So the method should look like: string GetSourceCodePath(Type t) when I pass typeof (MyClass) it returns C:\MyProject\MyClass.cs Thank you You can get the stack frame of the current method or any of its callers by creating an instance of the StackFrame class. However I don't think this is really what you want to do given your further comments. You can't decompile your code through the standard .NET classes. Therefore you can't do this easily at runtime. You could use something like ildasm or so ...Show All
