VS 2010 - Detect If App Is Not In Writeable Medium?
Oct 8, 2010
In an ideal world, we wouldn't need to educate our users about the "intricacies" of ZIP files One of my apps is a stand-alone-ish app that has no dependencies that need to be installed. Well, except for the Framework of course.So, in order to make the download smaller, I've zipped up the package. One of the functions of the app is to download some files into a subdirectory the application is located within. Well, some users don't unzip the package and as we all know, you can't just download some files into a ZIP file. I spent a good 20 minutes looking through my code and adjusting things to figure out why it wasn't working for one user, when I realized there were no issues in my code and that he probably wasn't unzipping the package.So, does anyone know of a method to determine if the directory my app is in, can be written to?I know I can just try writing a small file or something and catch the exception, but that seems... sloppy.
I have a VB.Net program which reads and writes to an Access database. I am trying to deploy the program using a setup (created with INNO Setup). Upon installation on a Windows 7 computer, Windows 7 is preventing it from writing data without changing the permission settings. It reads data but it doesn't write data. This problem doesn't happen in Windows XP. My question is: is there any way to make the Visual Basic .Net program write data to an Access database on Windows 7 from the setup without the user having to change permission settings?
We have a vb.net desktop application that uses a number of graphical images. All is well when the Windows Display is set to the default small font; however, when the display is set to the medium (125%) font, the graphical images don't display properly. We can accommodate the changes to windows sizes and text boxes, etc using autoscale and autosize; however, this doesn't help with images. Is there any way to overcome this issue?
Which one of these two do you suggest for writing simple windows form applications?Visual C++ is too complicated for my small to medium applications and the proccess of creating seems to be longer when compared with C# or VB.NET.
I am trying to detect plug/unplug of usb flashdrive using WMI. I used this code: Imports System.Management Public Class Form1 Private WithEvents m_MediaConnectWatcher As New ManagementEventWatcher Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim query2 As New WqlEventQuery("SELECT * FROM __InstanceOperationEvent WITHIN 1 " _ [Code] .....
When the user releases the left mouse button (MouseUp) anywhere on the screen (whether it be outside of the form or not), I want a message to be shown. How do I do this?
I'm creating a basic text editing program that will be used for UCAS Personal Statements (probably not a unique idea but hey). It will be a basic text editor with no special text formatting to sit in line with the guidelines of UCAS (there is a character limit for personal statements).
What I want to do is have a save/load option (which is easy enough), however on the "Exit" function I want the program to detect text changes and alert the user that saving is recommended (ya know like when you close word and it asks if you want to save blah blah blah)
I recently bought this multi-touch monitor (writing on it right now :P), and am creating an application for it. Now I need to detect which screens are touch-enabled. For example, I have the touch screen as my main monitor now, but I also have a secondary regular screen, I need the aplication to be able to detect which monitor has a touch screen, EVEN WHEN THE TOUCH SCREEN IS THE SECONDAY NONITOR!
I know you have to use WM_EXITSIZEMOVE or whatever it is, but I'm just not really sure how to use messages properly...I've read a few things online but just can't get it to work properly.
I'm looking into making child forms dockable inside my parent form and want to know when to hide my dock labels again (after the child form has stopped being moved).
I'd like you filter some results in a grid, and i want the user to be able to type a value into a textbox, and then the grid will be filtered by that value. I don't need help with the grid or how to populate it. My question is in regards to the textbox; How can i tell when the user has stopped typing so i can automatically load the grid? I thought about doing a refresh automatically in the TextChanged event, but that seems silly since the user could still be typing more characters.
Going from VB6 to VB10 I find VB10 has much easier ways of doing things, like getting command line arguments, getting all subfolders, etc, the hardest part is knowing what commands to use. Is there a better way to detect if a string ends with certain text? I'm doing it like this....
I want to detect the operating System of a local or remote pc based on the IP or computer name I typed in a text box, these will all be on the same domainThis is what I use for the local OS version
I have a question about event handling. Is it possible to detect field level data change in vb.net? i don't want my codes to be dependent on the the bound control's event to detect the change on the field value. I'm thinking there must be a better way (coming from a Delphi background). For example: a change on the Qty field will automatically trigger the event to compute the invoice detail Amount - (pseudo-case sample: Amount = Qty * UnitPrice). In Delphi, every field is treated as an object with its own properties and events. So it's very easy to associate an event with it.
Example: procedure TfrmInvoice.qryInvDetQtyChange(Sender: TField); begin inherited; qryInvDetAmount.value := qryInvDetQty.AsInteger * qryInvDetUnitPrice.AsCurrency; end; How can I achieve the same using vb.net?
Not sure this is a VS specific question - the answer is probably more os related (xp, vista, win7...)But at any rate - how could I go about detecting all the files that are opened while a machine is up and and running??
I've searched around but can't find a clear answer for this. From my winforms VB2010 app, I'd like to be able to detect the country of the user's PC at runtime. Specifically, all I really need to detect is whether the user is in Australia or Canada.Most things I've seen will say "have a look at System.Globalization.CultureInfo", but with no clear example. I also know that the old-school "GetLocaleInfo" API can be used for this as well. I do have some code using the latter, which detects Australia when LOCALE_ICOUNTRY returns a value of 61. However, that won't work for Canada, as it returns 1, which is the same as USA (I know that these are based on telephone country codes).
I have written a calculator program, and when the mouse clicks on the equals button, the button sets a boolean varaible to true, and then that variable can be used later.But I am wondering if the button control has it's own property that can indicate if it has been pressed?
I have a tough situation that I don't really know how to code. I have one main list of point that contains all the points on a picture that are black.(1point=1pixel) I need to group all the black pixels that are less than 15(more or less) pixels away from each other into one Separate list. In the end I want about 5 lists.
What I said above is what I think is best to detect the centre of a shooting target. This information is just for those who think they know a better way. Each card has 5 targets on it and I need to detect the centre of each target. Ignore the sticker on the top target, in all cases the top one will look like the rest.