Detect Debug Mode in Managed C++
What's the best way to detect whether an app is running in debug mode in Managed C++/C++/CLI? ...
What's the best way to detect whether an app is running in debug mode in Managed C++/C++/CLI? ...
I have a C# program that uses a class from another assembly, and this class calls an unmanaged DLL to do some processing. Here is a snippet: public class Util { const string dllName = "unmanaged.dll"; [DllImport(dllName, EntryPoint = "ExFunc")] unsafe static extern bool ExFunc(StringBuilder path, uint field); public bo...
Does .NET (C#) have built in libraries for FTP? I don't need anything crazy... very simple. I need to: FTP into an account Detect if the connection was refused Obtain a text file Delete the text file What's the easiest way to do this? ...
I have a usercontrol I created. I added a panel and a vertical scrollbar to the right of it. I'd like to be able to scroll it with the mousewheel. The problem is there doesn't seem to be any events that fire on mousewheel. If I take the panel off then the usercontrol has focus and it will fire on mousewheel in the form. But with the...
Hi, we have a web application that, started out small, any new features that were added on, were just made as part of the same project, however now we would like to create new projects for these said addons... we created a new project, it inharits the global.asax of the main project, and also accesses the web.config of the main project ...
Hi, I'm trying to customize the location of user.config file. Currently it's stored in %AppData%\[CompanyName]\[ExeName]_Url_[some_hash]\[Version]\ I want to it be something like %AppData%\[CompanyName]\[ProductName]\ so there's no version number and no hash stuff. First question: can this be done and how? What are the implicati...
I've got a list view that I'm populating with 8 columns of user data. The user has the option to enable auto refreshing, which causes the ListView to be cleared and repopulated with the latest data from the database. The problem is that when the items are cleared and repopulated, the visible area jumps back to the top of the list. So if...
Hi, On my machine when I test my webapplication (wether in debug or normal) after a javascript:history.back() triggers a postback in my app. On the other hand it does not occur when i precompile the application. Lastly, when I test the same pages on someones elses machine, the postback does not occur at all. I'm using vs2008, asp.net 2...
I have a .NET2.0 C# web-app. It has a variable number of large, init-expensive objects which are shared across multiple requests but not sessioned to any given user. I therefore need to persist them in a lookup structure. These objects need to be created as required and are not required for the lifespan of the app, merely the lifespan of...
I see the tablerow.Visibility property and another property called 'ToggleItem' but am not sure how to make this work. I want to hide the tablerow dynamically if it's only text field (in this case a user comment field) is empty. 'CanShrink' doesn't seem to do the job. The tablerow is .25 inches high and it takes up this much space eve...
Is there any framework available for implementing keyboard shortcuts in a .NET2.0 windows application? Also what are the best practices which should be taken care of while doing this? ...
I have this following data source binding: MembershipProvider provider = new MembershipProvider(); UserUpdateLogs userUpdateLogs = provider.GetUserUpdateLogs(username); dgUserUpdateLog.DataSource = userUpdateLogs.Logs; dgUserUpdateLog.DataBind(); Logs is a collection of UserUpdateLogEntry. This class owns the UserData Property, and U...
I have a gridview that I am binding to via a generic list. I have set all the columns myself. I am just trying to: Catch the event PRE format error when a row is edited- get the row information via a hidden field - and persist I am sure this must be pretty easy but I haven't done much with forms work and I am unfamiliar with its DataG...
I have a DataGrid in ASP.NET 2.0 with the following column in it: <ASP:TEMPLATECOLUMN> <ItemStyle HorizontalAlign="Right"></ItemStyle> <ItemTemplate> <asp:HyperLink id="HyperLink1" runat="server" CssClass="DataGridCommand" Target="_blank" NavigateUrl='<%# GetPreviewURL(DataBinder.Eval(Containe...
Is it possible to implement different layouting modes for a windows form without having to manual compute the alignment locations? For example: I have a Form which should be able to displayed in two modes normal & touchscreen. Touch screen mode being the same form with larger buttons, larger fonts and should not have alignment issues. ...
What would be the best approach to migrate a .NET Windows Service to Linux using mono? I've been trying to avoid executing the application as a scheduled command. Is it possible to obtain a service/system daemon(in linux) like behavior? ...
I'm currently downloading an HTML page, using the following code: Try Dim req As System.Net.HttpWebRequest = DirectCast(WebRequest.Create(URL), HttpWebRequest) req.Method = "GET" Dim resp As Net.HttpWebResponse = DirectCast(req.GetResponse(), Net.HttpWebResponse) Dim stIn As IO.StreamReader = New IO.StreamReader(resp.GetResponseStre...
The ToolStripManager is hopelessly broken. LoadSettings doesn't do a thing...and I'm evidently not the only one with this problem: http://social.msdn.microsoft.com/forums/en-US/winforms/thread/656f5332-610d-42c3-ae2d-0ffb84a74b34/ https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=128042 So...anyone have...
Using VS2005 and C#. Having a button in a form and an image from a resource, the image does not have transparency. How can I have transparency when assigning the image from the IDE ? Thank you. ...
I have got an enum which is defined like this: public enum eRat { A = 0, B=3, C=5, D=8 }; So given value eRat.B, I want to get the next one which is eRat.C The solution I see is (without range checking) Array a = Enum.GetValues(typeof(eRat)); int i=0 ; for (i = 0; i < a.GetLength(); i++) { if (a.GetValue(i) == eRat.B) ...