Nate Bross
Avatar/Signature-
Posts
609 -
Joined
-
Last visited
About Nate Bross
- Birthday 07/01/1987
Personal Information
-
Visual Studio .NET Version
Visual Studio 2008
-
.NET Preferred Language
CSharp
Nate Bross's Achievements
Newbie (1/14)
0
Reputation
-
I think that what you really want to do is have your SQLGuardian.exe application run as a service. That way you will not need to be logged in, as PD said, you should write the windows service to _do_ all the work, and write a winforms application to communicate with the service and tell it what to do.
-
Where does your picture come from? Is it static? (exists as a file somewhere) or is it dynamic? (is generated on the fly) If it is static, you should be able to load in a few rectangle objects behind the words in the picture and set the tooltip on the rectangle object.
-
Couldn't you use multiple rectangles per word? Or is the image generated dynamically?
-
This code If TextBox1.InvokeRequired Then Dim LogsafeSub As New tbCall(AddressOf processRP1) TextBox1.Invoke(LogsafeSub, TextBox1) Else Is making the sub processRP1 execute on the same thread that TextBox1 was created (the UI thread).
-
Once you detect a collision you must then set the position of the moving object exactly next to the stationary object.
-
Adding column and data to an EXISTING datagridview
Nate Bross replied to massoud12345's topic in ASP.NET
Adding a column and data to a gridview should be easiy; the question is do you require updating the database schema as well? -
So I have a Linq2SQL type that is the return type for a method. This works fine; except the lazy loading is causing me issues since I'm returning the method via WCF. I have been able to use DataLoadOptions to get the related data I need; however it generates some HORRIBLY inefficent SQL, especially since I'm trying to filter 2M records down to about 20. It takes over 15 minutes for this query to execute. So I'm trying to manually select the data and populate my own instance of a Linq2SQL type. I run into this error: "Cannot convert IQueryable<T> to EntitySet<T>." I started trying to use an anonymous type, but alas I cannot convert from my anonymous type back into my Linq2SQL type. Am I screwed? is there away to convert between Anonymous Types / And or IQueryable<T> to EntitySet<T>? or do I need to create my own classes that reflect my Linq2SQL classes? Any help is appreciated; I can post relevant code if it'd be helpful.
-
Can you post the code that you have? I hope you aren't using a table for layout and this is some TABular data that you are using. I'm not sure what an aspx table is; a normal table tag, with a runat="server"? You may want to try something like this: <table id="myTable"> ... </table> #myTable{ width: 500px; height: 400px; padding:0; }
-
Download Mail Attachment using POP3 in C# winforms
Nate Bross replied to Prashus's topic in Windows Forms
I've used this as a starting point to understand how to process pop3 data. http://www.codeproject.com/KB/IP/despop3client.aspx You should be able to use that as a launching point. -
Can you post a screen shot of the text you are talking about? Most of the configurable text is available in the Install Wizard Pages (form Setup/Deployment Project). The Title is the name of your solution, IIRC. In terms of the Window Title, that displays at the top and in the task bar, I don't know if you have control over that...
-
I'd say KIS and use StringBuilder if all you need is simple text replacement; however, if you need to produce standards complient output; the XmlDocument may be a good option. I don't know if this would apply in your situation, but would an approach like this help you: http://haacked.com/archive/2006/11/29/Express_Yourself_With_Custom_Expression_Builders.aspx
-
As PD mentioned, MEF is developed by Microsoft, and open-sourced on codeplex. I have not used it; but everything I've heard about it is good. IIRC the Visual Studio team is using MEF as part of VS2010. (don't quote me on that though). Scott Hanselman has a podcast with one of the developers of MEF: http://www.hanselminutes.com/default.aspx?showID=166
-
I ended up setting up IIS Smtp Relay service inbetween. So now my application talks to IIS, which in turn talks to the mail server. Its not pretty, but it works for me.
-
This method uses alot of unmanaged code, but will probably be very fast: http://www.developerfusion.com/code/4630/capture-a-screen-shot/ This code will get the image into a BitmatpSource (for use with WPF .Net 3.0/5) Bitmap bmpScreenshot; Graphics gfxScreenshot; // Hide the form so that it does not appear in the screenshot this.Hide(); System.Threading.Thread.Sleep(1); // Set the bitmap object to the size of the screen bmpScreenshot = new Bitmap((int)System.Windows.SystemParameters.PrimaryScreenWidth, (int)System.Windows.SystemParameters.PrimaryScreenHeight, System.Drawing.Imaging.PixelFormat.Format32bppArgb); // Create a graphics object from the bitmap gfxScreenshot = Graphics.FromImage(bmpScreenshot); // Take the screenshot from the upper left corner to the right bottom corner gfxScreenshot.CopyFromScreen(0, 0, 0, 0, new System.Drawing.Size((int)System.Windows.SystemParameters.PrimaryScreenWidth,(int)System.Windows.SystemParameters.PrimaryScreenHeight), CopyPixelOperation.SourceCopy); // Save the screenshot to the specified path that the user has chosen BitmapSource bitmapSource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(bmpScreenshot.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); imx.Source = bitmapSource; //bmpScreenshot.Save(saveScreenshot.FileName, ImageFormat.Png); // Show the form again this.Show(); Otherwise, this code will probably work if you just want a Bitmap object: Bitmap bmpScreenshot; Graphics gfxScreenshot; // Hide the form so that it does not appear in the screenshot this.Hide(); System.Threading.Thread.Sleep(1); // Set the bitmap object to the size of the screen bmpScreenshot = new Bitmap((int)System.Windows.SystemParameters.PrimaryScreenWidth, (int)System.Windows.SystemParameters.PrimaryScreenHeight, System.Drawing.Imaging.PixelFormat.Format32bppArgb); // Create a graphics object from the bitmap gfxScreenshot = Graphics.FromImage(bmpScreenshot); // Take the screenshot from the upper left corner to the right bottom corner gfxScreenshot.CopyFromScreen(0, 0, 0, 0, new System.Drawing.Size((int)System.Windows.SystemParameters.PrimaryScreenWidth,(int)System.Windows.SystemParameters.PrimaryScreenHeight), CopyPixelOperation.SourceCopy); this.Show();
-
I had a similar issue; I thought I could save myself alot of time using this: String[] files = System.IO.Directory.GetFiles("C:\\", "*.*" SearchAll); This will throw a UnauthorizedAccessException() on operating system hidden folders (even if you have them turned off) The only solution I found was this: List<String> files = new List<String>(); void DirSearch(string sDir) { try { String[] dirs = System.IO.Directory.GetDirectories(sDir); foreach (String d in dirs) { String[] files = System.IO.Directory.GetFiles(d); foreach (String file in files) { try { Files.Add(fd); } catch (System.IO.IOException ioex) { // } catch (System.UnauthorizedAccessException uaex) { // } } DirSearch(d); } } catch (System.Exception excpt) { Console.WriteLine(excpt.Message); } }