yoshikatsu's Q&A profile
Windows Forms listing files whose folder is in selected directory.
private void button1_Click( object sender, EventArgs e) { string s, p; s = textBox1.Text; listBox1.Items.Clear(); listBox1.DisplayMember = "FileAttribute" ; foreach ( string p in System.IO. Directory .GetFiles(s)) listBox1.Items.Add(p); } I can have a list of the file names in adress of string s.(folder of string s) But I want to have a list of files whose folders are in string s's folder. I answered my question with this method. Thanks for all helps to me. -------------------------------------------------------------------------------------------------------------- private void button1_Click( object sender, EventArgs e) { string s = textBox1.Text ...Show All
Windows Forms Need webBrowser to execute while app waits??
I have an app that waits for an event (enter captcha text) upon submitting ,it goes to another page (user agreement) where i need to sendKeys yet to another submit button... my problem is the final line of code is executing before the next page loads ... I tried Thread.Sleep, but it siezes the whole app! webBrowser included.. I have no clue what to do... any ideas private void button2_Click( object sender, EventArgs e) { HtmlDocument doc = this .webBrowser1.Document; doc.GetElementById( "verificationWord" ).Focus(); SendKeys .Send(CAPTCHA.Text); SendKeys .Flush(); doc.GetElementById( "finishForm" ).Focus(); SendKeys .Send( "{ENTER}" ); SendKeys .Flush(); ...Show All
Visual C# Only support "DateTime.Now.ToLongDateString()" in file name?
using (StreamWriter sw = new StreamWriter((@"C:\" + DateTime.Now.ToLongDateString() + ".txt"),true)) I tried to use "DateTime.Now.ToShortDateString" and "DateTime.Now.ToString()" and "DateTime.Now.ToLongTimeString()"....however, the program will encounter problems when running... It seems the format for file name only accept "DateTime.Now.ToLongDateString()", is there any way to add the current time in the file name Or maybe I can use the log file to record the applications However, I know nothing about the log file... If I write: DateTime.Now.Millisecond.ToString(); I will get value from 0 to 1000 , what does that mean ...Show All
Windows Forms ClickOnce Error Message
Hi, I'm getting the following error message & detailed report: 'Cannot download the application. The application is missing required files. Contact application venfor for assistance.' PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win32NT) Common Language Runtime : 2.0.50727.42 System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) mscorwks.dll : 2.0.50727.42 (RTM.050727-4200) dfdll.dll : 2.0.50727.42 (RTM.050727-4200) dfshim.dll : 2.0.50727.42 (RTM.050727-4200) SOURCES Deployment url : file://(PATH)/SerialSNMPWinApp.application Deployment Provider url : file://(PATH)/SerialSNMPWinApp/bin/Release/SerialSNMPWinApp.application ERROR SUMMARY Below is a summary of the errors, detai ...Show All
Visual Studio Tools for Office Windows Vista, VSTO 2005 SE addin on Office 2003 not working
Configuration: Windows Vista Visual Studio 2005 VSTO 2005 SE Office 2003 Professional Problem: I've just upgraded from XP to Vista and after that even the simplest VSTO Outlook addin doesn't work any more. I can't debug the project and ThisApplication_Startup event not firing. When I look at the addin i Outlook (COM Add-Ins/Add-Ins available) the Load Behavior is "Not loaded. A runtime error occurred during the load of the COM Add-in." Kindly help me with this issue Regards Gazza Hey Guys, I've touched base with someone in the VSTO team regarding the issue and he is looking into it for me. He confirmed that the issue is most likely registry/security related and they are ...Show All
SharePoint Products and Technologies How to show user presence in MOSS
I've been asked to display the presence of some users in a site. I'm trying to find out what I have to do to do that, but can find no documentation. Has anyone tried this I have discovered that there is the 'Colleague Tracker' web part in My Sites, which seems to do this - but it's not available on a conventional site. I was also trying to use the 'Site users' web part - but it doesn't seem to be able to show presence (although I've read some comments which suggest it should be. 1) Does anyone know of any documentation 2) What are the prerequisites for showing presence 3) What web part should I use Do I have to make the Colleague tracker web part available on a team site My apologies; I didn't ...Show All
.NET Development Iframe templates
I am using Microsoft EW, I am using a template that is iframe, my APS.Net Contols all state that Contols in this category require the Microsoft .Net framework 2.0, I checked in add/remove programs and I have it installed 89.47mb, I get the message on a form section, I have posted the question on EW forum but not help yet. Can anyone help please!!!! Debra **do i need to change a html page to a dwt page to make these controls work ...Show All
.NET Development WebService RPC/Encoded
when using RPC/Encoded mode in Webservice , the IsNullable=false is ignored in the WSDL file: I have the class (generated from xsd file) that contains the following attributes: /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(IsNullable= false )] public string CorporateName; /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(IsNullable= true )] public string Type; /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(IsNullable= false )] public string ID; When using document/literal webservice , i get this element in the wsdl file. < s:element minOccurs =" 0 " maxOccurs =" 1 " name ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Ray Ecuation? (collision-response)
1) public Ray ( Vector3 position, //Begin vector Vector3 direction //End position vector Is really Directional vector position (x0,y0,z0)------------->(x1,y1,z1); 2) Ray.Intesect(xx) return a float value .. what is its ecuation could be its use like magnitude of a vector of overlapping between two shapes THK!! :) The direction is a unit vector represents the ray direction. If the return value is zero, it means the ray origin is inside the bounding volume. If the return value is null, it means the ray doesn't intersect with the volume. The positive value ...Show All
Visual Basic Problem with Tab Groups in VS2005, programing in C#
I have run into two problems when using tab groups in the VS editor. 1. If I have two tab groups organized vertially (never tried hz.) after navigating in a file in the second group, after clicking to edit a file in the first group I can not make any edits. I can use the arrow keys, and I can actually delete text, but I can not enter any new text. Simpy clicking on a different file in that tab group, then clicking back to the original file solves the problem. It acts like the first tab group does not get proper focus when comming from the second group, however some of the keys work. 2. If I close VS2005 when I have two tab groups open, the project will not open properly the next time. VS comes partialy up but hangs with a totally whi ...Show All
Windows Forms Cannot download the application error!
Not sure how this happened, but I am no longer able to run my application that I have published. I originally had about 95 revisions published and started getting this error. I manually deleted all the builds from the publish directory, removed my application from the add/remove program, deleted all related file folders under Local Setting/App/2.0, ran mage -cc, etc... I have tried all of that and I still cannot get my application to deploy and run anymore. It seems like the deploymentUrl should be where I am publishing to but my manifest seems to indicate that it is looking at my local drive. Help! I need to get this working again. I am on the verge of rebuilding the project. PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win3 ...Show All
Smart Device Development Cdate cast error
Hi all I'm trying to do a Cdate(datestring) where datestring is the value 25/6/2006 but it's giving me a cast error here are some code examples from the command window Now #11/28/2006 6:12:49 PM# CDate("25/6/2006") Run-time exception thrown : System.InvalidCastException - Cast from string "25/6/2006" to type 'Date' is not valid. CDate("6/25/2006") #6/25/2006# system.Globalization.CultureInfo.CurrentCulture {System.Globalization.CultureInfo} Calendar: {System.Globalization.GregorianCalendar} CompareInfo: {System.Globalization.CompareInfo} CurrentCulture: {System.Globalization.CultureInfo} CurrentUICulture: {System.Globalization.CultureInfo} DateTimeFormat: {System.Globalization.DateTimeFormatInfo} ...Show All
Visual C++ Templates overloades and specializations
I want to create a function that returns the absolute value of a number. This number could be real (int, double, etc) or complex (of real, double, etc). I currently have the following: //--------------------------------------------------------------------- template<class data_t> data_t myAbs(data_t x) { return ((x > 0) (x):(-x)); } //--------------------------------------------------------------------- template<class data_t> data_t myAbs<complex<data_t> >(complex<data_t> x) { return (sqrt(x.real() * x.real() + x.imag() * x.imag())); } //--------------------------------------------------------------------- This compiles. However, when I call the function with a complex argument, the first function is c ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2D Text
Hi everyone, I want to draw a rectangle and put a 2D text string on the plane of this triangle. Now everytime we move or rotate the triangle, the 2D text should move along with the triangle, but the text size won't change as we zoom in or out the view. Any hints would be appreciated. Hi, Firstly: Help us to help you . You've not given us anywhere near enough information to give you a complete or definite answer - we can only guess as to what might be the solution! What language are you using - C#, C++ etc... What API and version are you using - Direct3D, v8, v9, v10.. How are you drawing the text How are you attaching the text to a triangle Or, how are you *attempting* to attach t ...Show All
SQL Server Key Maintenance and Stored Procedures
Basically I would like to ask whether parameters can be used to pass the value of the 'symmetric key id', 'certificate' and optionally 'password' to a stored procedure that uses encryption functions. The reason this is appealing is that when encryption keys etc change over time (we have a requirement to decrypt data, destroy and create new keys, then encrypt data every time we lose a staff - don't ask), as we would be passing the value of keys, passwords and certificates as parameters to a standard stored procedure. Hardcoded Example (Working) USE PSS GO CREATE PROC insert_payer_ba -- define parameters @param_rec_id NVARCHAR ( MAX ), @param_bsb NVARCHAR ( MAX ), @param_account NVARCHAR ( MAX ), ...Show All
