PlausiblyDamp
Administrators-
Posts
7016 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by PlausiblyDamp
-
A boolean is a simple true or false option and in your situation a document has either been modified since the last save or not - to me a boolean seems the natural choice to represent this quality. A string would require more memory than a boolean and is susceptible to spelling mistakes and typos with no compiler validation while a boolean prevents this kind of issue.
-
Other than the fact I would use a boolean rather than a string to track if the file has been saved or not your method looks fine to me. I am assuming you are going to use the MessageBox to prompt them to save / cancel and then set e.Handled accordingly.
-
System.UnauthorizedAccessException
PlausiblyDamp replied to Lada_Karford's topic in Directory / File IO / Registry
Most of the system protected folders are marked as both hidden and system - it might be worth checking these attributes before attempting to access the folder. Alternatively you could just wrap the access in a try...catch block and handle the UnauthorizedAccessException when it occurs. -
http://www.xtremedotnettalk.com/showthread.php?t=75894 might be of some use to you.
-
Does the line lngRetVal = FT_Write(ftopen, strBytesToWrite, lngBytesToWrite, lngBytesToRead) return anything useful?
-
How to Extract 8-bit Icon from File
PlausiblyDamp replied to grantman16's topic in Graphics and Multimedia
You might have better luck with the ExtractIconEx API - http://www.pinvoke.net/default.aspx/shell32.ExtractIconEx contains the declares and a sample bit of code for using it. -
Rather than have the underlying class manipulate the progress bar it might be easier to get this class to periodically raise an event that you can then handle in the form to alter the progress bar.
-
HttpModule and WCF (AspNetCompatibilityRequirementsMode.Allowed)
PlausiblyDamp replied to vycma's topic in ASP.NET
Not something I have done personally however I think you are best creating a class that implements the IErrorHandler interface, http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.ierrorhandler.aspx might be a good starting point. -
Firstly which version of Reporting Services are you using? Could you also check what page dimensions are set in the report designer - if you go to the Report properties what are the settings for the Interactive Size and the Page Size. I don't have RS handy to test but I seem to remember having problems in the past (can't remember which version either - how helpful am I? :confused: )when these two differed.
- 2 replies
-
- asp.net
- reportviewer
-
(and 1 more)
Tagged with:
-
Unfortunately they are getting better at that sort of thing, these days captcha images can slow down the rate of bots registering but they are not a total solution.
-
Shared Textbox control not visible on form
PlausiblyDamp replied to caeanis's topic in Windows Forms
Try changing the class definition to Public Class optyTextBox Inherits System.Windows.Forms.TextBox Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) Const WM_PASTE As Int32 = &H302 Select Case m.Msg Case WM_PASTE ' The clipboard contents were pasted... 'Code to handle paste event. Case Else MyBase.WndProc(m) End Select End Sub End Class If you are not interested in a particular message you need to pass it on to the default WndProc so it still gets processed. -
One of the overloads allows you to specify where to search from, you can start from where the last occurrence was found using that parameter.
-
You could read the message contents directly into a XMLDocument and then use an XslTransform that sends it's output to a StringWriter or similar.
-
Closing Acrobat 7 through Vb.net
PlausiblyDamp replied to WaddellG's topic in Interoperation / Office Integration
Do any of the Acrobat related classes expose a .Dispose or .Close method (or similar)? If so calling this should free the resources they are holding on to. Just out of interest if this is VB.Net you shouldn't need to call CreateObject either as you should just be able to do stuff like acroApp = New AcroExch.App() as long as you have added a reference to the relevant Adobe libraries. -
Are you wanting to effectively pause the background process and then resume it or to simply get information from it while it is working? If the former you might want to wrap the state used in the function in it's own class and use one of the thread syncronisation primatives to indicate to the background thread that it should pause (e.g. at the start of the loop in the thread you could try to aquire a Monitor or check a waithandle which could be signalled from the main thread when you want the background thread to pause). Alternatively in you simply need information from the background thread you could have it raise an event that contains the relevant information needed by the main thread.
-
Each application will have the dll loaded into it's own memory space and any changes are local to it's address space. If you need to share data between two .Net applications (more accurately Application Domains) you would need to use some form of interprocess communication (remoting, sockets etc.) Out of interest what kind of information is being stored / used with these shared properties? There may be an alternate way of achieving what you are after.
-
You would either need to cast the element to the correct type i.e. ((Product) Products[0]).DoStuff(); or if you are using .Net 2 and above you may be better of using a generic class such as the List class. i.e. List Products = new List(); Products.Add(new Product("Coke")); Products[0].DoStuff(); //should work
-
Is the task killable using a 3rd party tool like process explorer though?
-
I'm running Windows 7 x64 and version 9.0.0.418 and I can't see the option there.
-
Fixed Vertex point, but draggable user control.
PlausiblyDamp replied to skea's topic in Windows Forms
Odd, when I was playing around with it on my PC I had it draw the pixel for the fixed point in black and it kept a constant position on the form despite the triangle's end point moving around. When I reduced the pen width the end of the triangle seemed to be closer to this point and the movement reduced.- 18 replies
-
User Control with Combobox like property
PlausiblyDamp replied to EFileTahi-A's topic in Windows Forms
public enum myEnum { one, two, three }; private myEnum _test; public myEnum TEST { get { return _test; } set { _test = value; } } should do the trick -
Just tried that on my pc and I couldn't see an option to prevent the process being killed (only one to prevent a scan being stopped from the scanning dialog). Killing the avguard.exe process from taskmanager however works with no access denied message, however the process is restarted (PID changes) presumably by one of the other running antivir processes.
-
Which AV product is it?
-
If someone has sufficient permissions then there is no real way to prevent a person from killing an application, certain utilities like Task Manager will themselves prevent you from killing certain system processes but this is a feature of task manager itself, if you were to use an alternate tool like pskill or Process Explorer then you can kill anything (including stuff like winlogon) and as such you will suffer the consequences. The easiest way to prevent a person from terminating a process is to make sure they are not running as an administrator on the system in question.