Clintonf's Q&A profile
Visual Studio Tools for Office Help: How to add keyboard shortcuts to Excel Custom Menu and Menu Items
I can't figure out for the life of me how to assign a keyboard shortcut to a custom toolbar in Excel. I am using C# and have successfully added the toolbar with menuItems but can't find a method or property to allow me to accept the actual keyboard shortcut and execute code. Any ideas I am using CommandBar, CommandBarControl, and CommandBarButton. Cindy was absolutely right. In VSTO project: Set a shortcut key and attach a VAB macro to it: //Ctrl+E activates the macro: LoadEntityManager Application.OnKey(“^e”,”LoadEntityManager”); You can assign a shortcut key from Excel. Go to Tools -->> Macro -->> Macros..-->>Option. In VBA: Create the macro: LoadEntityMan ...Show All
Windows Forms WebBrowser control freezing up
I have created a windows forms application containing a WebBrowser control. One of the pages that is loaded by the control contains a Windows Media Player ActiveX object. The movie that is being played in a 500MB mpg and it is set to loop indefinately. After it has been in use for a few hours, the application locks up and must be killed with task manager. This issue is not seen if I access the pages in IE, only if I use the WebBrowser control. I believe this is a memory issue and would like to be able to free the memory used by media player when the page is navigated away from. If anyone has any suggestions or help, it would be appreciated. Mike Thanks for the response. The video is a 10 minut ...Show All
Visual Basic TabPage Header Question
Is it possible to change the color of just the header of a tabpage If so, can someone please assist me with this Any ideas Thanks all... jb Absolutely...set the drawmode to owner draw and then draw the tabs in the drawitem event: Private Sub Form1_Load ( ByVal sender As Object , ByVal e As System . EventArgs ) Handles Me . Load With Me . TabControl1 . DrawMode = TabDrawMode . OwnerDrawFixed End With End Sub Private Sub TabControl1_DrawItem ( ByVal sender As Object , ByVal e As System . Windows . Forms . DrawItemEventArgs ) Handles TabControl1 . DrawItem Dim g As Graphics = e . Graphics Dim p As ...Show All
Software Development for Windows Vista CustomActivityFramework sample and Persistence
When using the CustomActivityFramework sample ( http://wf.netfx3.com/files/folders/activity_behavior/entry838.aspx ), I noticed that rehydrating the workflow does not work properly. I have the following scenario: 1. The workflow is currently waiting for a file being created on the "Event1" activity (a FileSystemEvent activity) 2. I stop the wf host. 3. I run the host again, only starting the runtime, not loading a new workflow The file system is no longer being watched, the Event1 activity is not active. I tested the same scenario with a HandleExternalEvent Activity, and it works there. I guess, the problem ist that the FileSystemEvent activity does not use the ExternalDataExchange mechanism, so the event handle ...Show All
Windows Forms ProgressBar during a DataBase update
Hi, I have an update operation on an Access DB and it takes between 20 and 30 seconds. So that the users doesn't think the application is dead, I want a ProgressBar to let the user know something' going on... Here's what I have: A form with a panel containing a message and a ProgressBar. A Sub that performs a DB update. Obviously, I would like the ProgressBar to match the progress of the DB update but I can leave with the fact that the ProgressBar match a timer... I have taken the code below from a Forum entry but I don't see how the ProgressBar would be modified by the Timer_Tick sub. Thanks in advance for any advice... Claude. Code from a Sub where the Update is launched: Me.Progress_Panel.Visible = True Me.Progress_Progr ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Vista install problems
XNA won't install on Vista RC 1 5736. I'll try on a daily build tomorrow in the office. Are you going to support Vista in December It's the kids... they make me crazy! ;) I've just been reading too many blog comments lately, seen too many people complaining. Ended up singling you out. I don't know how the XNA team always ends up being so polite and helpful. Kudos to them. ...Show All
SQL Server Getting sample databases in Management Studio
How to get sample database AdventureWorks and AdventureWorksDW deployed in Management Studio. I selected to install sample database entire feature on my local hard drive and I can see it did installed all the .mdf,.ldf,.dim,.cube and the rest in C:\Program Files\Microsoft SQL Server\90\Tools\Samples\ How can I get the database in Management studio. I tried to use Attach db and it didn't worked, gave me following error Msg 1813, Level 16, State 2, Line 1 Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted. Msg 602, Level 21, State 50, Line 1 Could not find row in sysindexes for database ID 8, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes. Any help would be appreciated. ...Show All
Visual Basic count
hi, i am very new to vb and have been looking for a solution for this problem for hours! i think that i have been looking at it for to long and have just completly lost the point of it, so any reply will be greatly appreciated!! anyway, here it is... i have a project where i must display the total number of items from 4 textboxs in between a certain range. for example if 10, 3, 4, 11 are entered into the textboxes, i want to display the total of numbers in between 0 and 5, thus 2 would be displayed. i know the answer will probably be something simple that i have overlooked, but i am near the end of my rope mentaly due to this !!!!!!!!!!!! First of all you want to display these things in a fashio ...Show All
Visual Basic How to retrieve Wireless network information?
I'm trying to use VB.NET in order to collect some information of a WiFi systems - such as WLAN card name, SSID, bandwdith, signal strength... I think I should use WMI to query these information - but I don't know much about it. Could you please provide me with some details Here is an example of WMI query, hope that it can help you. Imports System Imports System.Management Public Class Query_SelectQuery Public Overloads Shared Function _ Main( ByVal args() As String ) As Integer Dim selectQuery As SelectQuery selectQuery = New SelectQuery( "Win32_LogicalDisk" ) Dim searcher As ManagementObjectSearcher searcher = New ManagementObjectSearcher(selectQuery) Dim disk As Management ...Show All
Visual Studio 2008 (Pre-release) RichTextBox save to string
Hi, I want to save the content of the a RichTextBox to a string, in the DataFormats .Rtf. This is an example a saw, but it doesn't help me to save in a string. TextRange sourceDocument = new TextRange (richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd); MemoryStream stream = new MemoryStream (); sourceDocument.Save(stream, DataFormats .Rtf); cmnjgfj C C call stream.Seek (0, SeekOrigin.Begin) after you call sourceDocument.Save(). TextRange sourceDocument = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd); using (MemoryStream stream = new MemoryStream()) { sourceDocument.Save ...Show All
Visual C# adding name to the row and column of datagridview in windows c# application
hi, how can i add name to the row and column of a datagridview in a windows c# application through dataset. actually i want to creat the matrix view using dataset. can anyone help me out thanks & regards Isaiyavan Babu hi i want the datatable look like the following ColumnHeader1 ColumnHeader2 > Somevalue Somevalue > Somevalue Somevalue > Somevalue Somevalue here how can i set the columnHeader Name and replace ">" symbol with row 1, row 2, row 3. i need to take the data of the columnheader Name from a database table, and row ">" name fr ...Show All
Visual Studio Express Editions A retired newbe
Ive followed MS try it to create a database. No problems Added a table also no problems and filled in some data. Ive opened a second project to connect to the first database and followed the Try it procedure. However when I update data and save it, it saves in my second project but does not update my database. My question is should it update my database and if not why do I need it. Balsoft see if this thread helps solve your problem... http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=427451&SiteID=1 ...Show All
SQL Server SQL 2000 and SQL 2005 on same machine?
Can you have a SQL 2000 and 2005 running on the same machine Can you direct me to resources regarding this Yes, this is supported. Here is a good thread with a few suggestions: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=347460&SiteID=1 Thanks, Sam Lester (MSFT) ...Show All
Visual Basic Sorting a Listview
Hi, I' am currently writing an irc client for my own personal chat server. And I'm trying to sort the nicklist properly. So it would be like "." above "@" , etc. But I can't seem to figure out how. If you know what I' m trying to do then please help. Thanks. Becasue I remove the "." and "@" and replace them with icons on the listview so then the nicklist isnt sorted right. So you will have normal users above hosts. =\ Im writing this in Visual Basic .NET 2005 Express Edition. i see your problem the thing is the listview will not sort by character ie: . @ +, etc if those characters are removed. It will sort alphabetically. The .@+ MUST be present. I see no problems with having an icon and the usermo ...Show All
Visual Studio Express Editions Form shadow
Hi. Is there an easy way to add a shadow to a form Thanks. Good work Brendan. I would not have posted anything if you had not given the forum readers a 'C' example. So I dug up an old VB6 example and converted it fairly quickly. It would have taken me quite longer to figure out the 'createparams' usage in VB Express or try to convert the 'C' example to VB. So my 'brute force' newbee way was useful in that it prompted you to show us a better way in VB Express! (BTW, I never heard of form shadows or createparams before today.) ...Show All
