I have used if commands a lot over the years, and one thing i have noticed is that unless you get the logic right, thiings can slip through the net. I think i am having that problem here:
For mm = 0 To 1 'ds.Tables("AddressBook").Columns.Count - 1
If Night = DataGridView1.Columns(mm).HeaderText Then
If DataGridView1.Rows(0).Cells(mm).Value < 1 Then
I have an MS access database that has fomrs with buttons to do certain tasks - a "console" or "toolkit". I am trying to run cmd.exe as the local administrator using this command....
If my domain account is added to the local administrators this works fine (it asks for a password - is there any way round this?)
If i visit another PC in the domain on which i am not a local administrator, it doesnt work and i don't know why In both scenarios i can manually browse to cmd.exe and right click and runas a differnt user without any problems.Also, is there a more efficient way of running this command?
First let me say that I am not sure whether or not this should go in this section or the API section, and if it needs to be moved I apologize. My issue is fairly straight forward, but for some reason I cannot get it to work.
I am trying to send a command to a command line and then submit the command. I have been trying without success to get this to work in v2008 Express and v2010 Express, Here is the code I am trying to us:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _ ByVal lpClassName As String, _ ByVal lpWindowName As String _
I have a combo box with "Existing Customers" Full Names in it.This combo box gets updated when a "New Customer" entry has been entered in a different form.When the new customer entry has been saved, the user is directed back to the combo box, here the user should be able to pick the new entry at the end of the combo box.This is not working currently, and the combo box only gets updated when I press stop, and play the program again. I was thinking that I possibly was not closing and loading the forms corretly for the "new customer name" to be added to the combo box? [code]is it possible to sort the combo box alphabettically? I tried setting the "sorted" propety to True, but it gives this msg box "ComboBox that has a DataSource set cannot be sorted. Sort the data using the underlying data model."
Im using ms-acess 2007 as database and this issue is ridiculous.i run the FORM and enter some details ! and now i click display and display the data that was entered! this thing happens while im DEBUGGING sometimes when i stop debugging and debug again the data that was stored previously its not even getting displayed!! and its not even present in the actual database ! this doesn't happen every time!! this is weird and i dont understand , whats causing this issue?
well i have been looking all over the internet for hours and i just cant sseem to find a working line of code. ok i know this isnt efficent or anything but i just wana know how to use sendkeys to send control c (copy to clipboard) ive tried using this: Sendkeys.send("^C") and many varriations of that but none of them seem to work and i dont understan why. My program is highlighting some text then i want it to copy that to clipboard.
Possible Duplicate: How to use SubReport in XtraReport? I'm having a problem with my XtraReport it doesnt display the Sub Report but it Displays the main Report
I am adding values and descriptions manually to a list box.I have a class for the items [code] and in a form the most basic example click a button to add a value and some text and then show a messagebox to get the value [code]however ListBox1.SelectedValue is always blank , however no error is thrown when adding the values.I have gone right back to basics with this example , but just cannot get a value added in manually and stored in the listbox.value property.
on my program that im making when closing the app by on my app it is file then exit and it executes Application.Exit()
which works fine but if i exit the program by the x mark in the top right corner it closes the app but the apps name is still in task manager and if i re run it there is 2 instances of my app running so basically it closes the app but it leaves in in the memory i believe can anyone explain why this is happening and a solution because it makes no sense to me because that it part of windows itself not my programming so i don't understand it at all.
I created an ASP Table Control and added a row to it programatically. I then repeated the process to add another row. The first row that I added disappeared and only the newest row is being displayed. Is there a property that needs to be set to allow the state of the table to be saved?EDIT:All I do is click a button on the page and it adds a row to the table. Repeated clicks of the button only add one from to the table., here is the function that adds the rows.
Protected Sub addItemButton(sender As Object, e As EventArgs) 'get the id of the item they selected Dim id As String = CType(sender, Button).Text
Ive created a program for work which is very plain and simple, a problem i have been having with it is that the OK button. the OK button deletes a key from registry and copies a pdf to the desktop and also creates a .txt file in a folder and as well closes the program. This seems to work on the machine that i have created it on and also from a Flash drive but when i have the folder and program on another PC every button works apart from the OK button.
I'm not quite sure why, but this program doesnt work as intended. It's kind of difficult to explain but if you tried it, it doesn't work properly.
Private Sub btnApply_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApply.Click 'clears the changes box before going through if statements Me.txtChange.Text = ""
The following lines are supposed to display to a text box the phones numbers that match the condition in the sql statement, however it shows me all the phone numbers:[code]
i have a problem, from some reason i'm getting an error when "i" and "i+6" value within the str i = 1 To str.Length If i Mod 79 = 0 Then Dim c As Integer = str.Substring(i, i + 6) If c = "" Then str = str.Insert(i, "b") End If End If Next i
I was just wondering if anyone out there has experienced the same problem as i. I have tried using open process with ReadProcessMemory and have been getting the same darn return value back (OpenProcess return value = 373662154752) and i dont know why.I tried even changing the processID to a bogus value and i get the same handle back! i find that really weird and frusterating. Anyways here is a snipet of my code.
[Code]...
I also want to mention that i have tried changing the Access rights to PROCESS_ALL_ACCESS and received same damn value... Any help on getting it to work would be appreaciated. Also i am working under windows 7 X64(Bit) if that makes any difference.
P.S If you have questions to why im using these api functions, its to do with creating a program to save information from stored buffers of a flight simulation software at bombardier where i work. All software has been given to me in order to build this program.
So i made 3 forms in the first i made a simple textbox on form2_load i have this code [code] It SHOULD show in form 3 the input of form 2 but that simply doesnt work while it works with the same code on Form 2 . that when Form2 loads it actually has the Input of form1 but not in form 3..As i said there is NO error message and i dont know what i did wrong . Can anyoone help me out
Ok, so I have set my form as the parent of a 3rd party application.Appactivate works when the 3rd party application is not a child of my form.It would appear that if the application is not on the taskbar (A non taskbar application) appactivate does not work.
I got this code from a c# post on how to get the location of an open process. What I want to do is beable to snap applications to running processes by finding their location using winapi user32.dll and searching window name then parse the location and set my application on a time to constantly move to what ever location that program is in. I tried the C# to vb.net converter doesnt work.
I have the Immediate window option available in my menu, but when I click it or do the keyboard shortcut, nothing happens. It's quite difficult to debug an application without an Immediate window.I've tried resetting my settings to general developer and all of the other suggestions I found on the web, but still, no immediate window shows up when I click it or do the keyboard shortcuts..
I made a program that clicks in different places. I wanted it to be able to click on other programs, but it doesnt. I know it clicks because when i test it on VS where i am typing changes when the program clicks.
how can i do it so the same image doesnt get repeated more then once. so when two of the same images are already picked, it goes on to select a different image until there are pairs of everything. This is my code
Quote: Dim intPic As Integer Dim rand As New Random intPic = rand.Next(0, ImageList1.Images.Count)[code].....
Ok, here is the problem,in vbscript, i was reading parts of streams
i.e. teststrid = left (strLine,8) teststrnm =rtrim( mid (strLine,15,30)) teststrx = mid (strLine,57,8) teststr = left (strLine,3) strFormcode = left (strLine, 10) strSymmetrycode = left (strLine,14) strSigncode = left (strLine, 10)
Even in cases that strLine length was less than the index used to split the string, the program kept running.Now i am trying to do the same in VB.net, but since the strLine is not always bigger than the index used to break the string, it ives an error.I do not want to use try catch, because i will have very dirty and uselless code.
I was thinking something like resume next, but i guess it doesnt exist anymore.