Brent C's Q&A profile
Visual Studio 2008 (Pre-release) FlowDocument from RichTextBox to FlowDocumentScrollViewer
I try to view my RichTextBox Content in a FlowDocumentScrollViewer. myFlowDocumentScrollViewer.document = myRichtextBox.document; And I get an exeption {"Exception has been thrown by the target of an invocation."} Somebody help, Please! MemoryStream ms = new MemoryStream (); XamlWriter .Save(r.Document, ms); ms.Seek(0, SeekOrigin .Begin); scrollviewer.Document = XamlReader .Load(ms) as FlowDocument ; ...Show All
Windows Forms IsMdiContainer
Is it possible to define the size of the MdiContainer Sorry the bad english. Thank you. Well since i can't size it my way i used panels to cover the sides and botom of the form, i removed the scrollbars of the mdiparent so i have sized it. LOL Thank you very much. ...Show All
Windows Forms Including non referenced dll in ClickOnce deployment
I'm deploying an applikation using ClickOnce I need to include a dll from another project in the solution. This dll is not directly referenced in the project I'm trying to deploy, but is added as a Project dependency. This dll is not getting bublished alongside the rest of the project files and references. How do I get the ClickOnce deployment to include this dll file -- sparrez The thing is I really don't want a direct reference to the assembly in the project. We use Reflection to create objects from different assemblies dynamically and we don't have the possibilty to have all those referenced in the project as some are delivered by third party. But I think the MageUI approach is the way to go for now. ...Show All
Visual C# How do I underline the accesskey in the button text?
I currently have this button and do not know how to get the F underlined in the button text. I tried adding the & before the letter I wanted underlined and that did not work must be a menu only thing. < asp : Button ID ="btnFilter" runat ="server" OnClick ="btnFilter_Click" Text ="Filter" AccessKey ="F" /> I thought about changing it to an html button but assumed there would have to be some way to do it as an asp button. Any help would be much appreciated. Would this work http://www.devx.com/tips/Tip/13107 type=kbArticle&trk=MSCP ...Show All
Visual C# How to diplay HTML data from DB in grid view ?
I have saved data in sql server 2000 table with HTML. Like this: <a href=’abc.apx’>ANY TEXT</a><br/> But when I bind dataset to Grid View server control, text appears same as it is in DB. What is the solution Please note that requirement does not allow me to set columns(template) at design time. Hi, Zeeshan The Grid View just show the data in the DB as string format, it knows nothing about the HTML code. Why not use DataGridViewLinkColumn or (DataGridViewLinkCell) to create a column that have link property. Reference to: http://msdn2.microsoft.com/en-gb/library/system.windows.forms.datagridviewlinkcolumn.aspx Thanks ...Show All
Windows Forms Treeview questions???
Hi I would like some feedback on the following. After populating my tree view and expand it the scroll bar has scrolled half way down. How can i make it not scroll down when i load the tree and expand it. After i have loaded the users may scroll down if they want. When you click on the treeview it highlights the word in a dark blue. Is it possible to change that colour to another colour Is it possible to make it highlight the whole line from left to right of the treenode selected like a listbox My treeview is reloaded depending on what is selected on a combo box. When i reload it you can see me clearing it and then loading it again. Is there a way to prevent this Any responses/sample code will be great. Thank ...Show All
Visual FoxPro sending email from VFP through MS Outlook
We have the following code for sending email to Outlook. The email gets sent, but the font size is always 36 px or 36 pt (we tried both). None of the <cr><lf> show up. The email is one big paragraph. Can anyone help Here is the code: LOCAL loApp, loEmailItem, cHex lnsize = '"' + str(gaPointsize(Slcrm.nbodysize),2,0)+ '"' cHex = '' nDec = Slcrm.nColor nPower = 8 DO WHILE nPower > 0 cHex = cHex + hexdigit(INT(nDec/16^(nPower-1))) nDec = MOD(nDec,16^(nPower-1)) nPower = nPower - 1 ENDDO lcColor= '#' + RIGHT(cHex,6) * lcColor = '#' + strtran(Transform(GetColor(),'@0'),'0x ...Show All
Community Chat .NET Web Browser Effort - First Preview!
Hi Guys, A couple of months ago I started an opensource effort to create a Web Browser better than IE7 in .NET. So far its going GREAT, with a team of 3 including me. As of now, source code is not offered - it will be once I get it to a Beta 2 state. Also, if anyone would like to join the project please send an email to netwebbrowser@gmail.com or add mateuszrajca@msn.com to your MSN/Live Messenger contacts list(email is preferred) Here are some stuff you can help in: Write code(C#), fix bugs in code(C#), make sourcefourge web site, report bugs, optimize code(C#), make app more responsive, make installer, graphics (icons logos) and whatever else you can come up with! Download Now Preview 1! ~Matt ...Show All
SQL Server XSLT Transform to text results in extra whitespace
All my reports that are getting transformed to text via XSLT has extra whitespace at the end of the report. Checked the file in hex mode and all that whitespace is hex code 00. On some reports, this whitepsace is 12 MB of a 32 MB report. It would be nice to get this fixed so we do not have unnecessarily large reports. Just wondering if anyone else has came across this issue Thank for the help. ...Show All
Windows Forms Disable/Enable Tab Page
I read the thread containing information of how to accomplish disabling a TabPage by using OwnerDrawing methods. Problem is that for some reason, my "disabled" tab is apparently too small for the text. As such the text ends up getting wrapped to a second line, messing up the text positioning on the tab itself. How do I increase the size of the actual "tab" of the TabPage Note: I tried adding spacing to the Text property of the TabPage if I found that the TabPage was disabled, but apparently changing the Text property fires off the DrawItem() again, which ended up putting me into an infinite loop. The original thread I found was: http://forums.microsoft.com/msdn/showpost.aspx postid=13047&siteid=1 Actually, ...Show All
.NET Development how to receive DataSet From ws to Samrt Device
i have crea ws and call ws from my device i try to use this code to receive data from ws WebReference.Service getTable = new WebReference.Service(); DataSet dsTables = getTable.dsTable(SqlCmd); cboTable_ID.DataSource = dsTables.GetXml(); cboTable_ID.DisplayMember = "Table_ID"; but i don't work, it have exception occur * my ws return dataset of table_ID, how to receive DataSet From ws to Samrt Device thank you! hi.guy you cann't pass the SqlCmd from client to service by WebReference object. any query info should be create on server, but not on client .. Matt. ...Show All
SharePoint Products and Technologies Moving MySites to a different farm in BTR
Don't ask why I am trying to do this but I need to migrate a few MySites from a BTR installation to a different BTR installation so I then can upgrade them to RTM. It seems like the stsadm -backup/restore doesn't capture all the meta data and other dependencies tied in with MySites. Does anyone out there know a good way to achieve this I've tried the stsadm -export -includeusersecurity but I am getting all these "access denied" errors on export AND import. Needless to say, this is messy. Thanks, Rabbit I am getting the following error [2/27/2007 11:13:17 PM]: Progress: Initializing Import. [2/27/2007 11:14:17 PM]: Progress: Starting content import. [2/27/2007 11:14:17 PM]: Progress: D ...Show All
.NET Development get file from remote machine using WMI
Hi, I need to copy a file from a remote machine using wmi but i don't know how to define the path to my machine, below is the code that makes a copy of a file in the same machine, what should be the path if i wanted to copy it to my c:\example\ folder ManagementBaseObject inParams, outParams; foreach (ManagementObject mo in queryCollection) { Console.WriteLine(mo["Name"].ToString()); inParams = mo.GetMethodParameters("Copy"); inParams["FileName"] = "c:\\example.config; <----------------- what can i put here so that it refers to my machine outParams = mo.InvokeMethod("Copy", inParams, null); // List outParams Console.WriteLine("Out parameters:"); Console.WriteLine("ReturnValue: " + outParams["ReturnValue ...Show All
Visual Basic click event triggered by pressing enter
Can anyone tell me how to trigger my click event by pressing enter while button is in focus. if the button has focus and enter is pushed the click event should automatically be triggered, If its not maybe you have a keydown event stopping it from occuring but from memory the enter overrides the mousedown event and click should still be triggered. Andrew ...Show All
SQL Server Problem with querry performance locally vs. network
Hi, I work on speed-up our company SQL Server 2000. I reconstructed one querry and test it on client computer (other than server). There was no profit. I was surprised :(. I supposed several times speed-up. Next I run old and new querry directly on our SQL Server machine. The result was proper - new (after modifications) querry takes 2,5 times less time than previous. Ok, question: why there wasn't profit of modification from client computer I thougth that reason is slow network. So I copy from client computer file of weight 80MB to server. This takes 10seconds. Result of my querry is 35MB and it takes 17 seconds on client computer and 6 seconds directly from server. Best regards, Walter Luszczyk ...Show All
