i am trying to use the sleep command in vb 2008 multiple times to constantly change back color but am told, Unable to load DLL 'Kernel 32': The specified module could not be found. (Exception from HRESULT: 0x8007007E). i tried it with another program and one sleep(1000) and it worked so is there a way to use this multiple times or any other command.ian hendry
I have a 4 table database and need to query at least 2 tables (the single table query works fine). The output goes in textboxes / labels on an existing form.
I'm trying something like this:
Private Sub AddCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Currently I'm using System.Threading.Thread.Sleep(5000) to let my app pause/sleep for some time. This works great but I can't open my app anymore when it's sleeping and it uses about 25% of my CPU. I guess there must be a better way to do this. I also tried using a timer but that didn't work out to well for me..
The coding that I have a problem with might make people think that I am creating some malware or something stupid. So the project I am doing is associated with iTunes. iTunes allows people to have one library. There is another way, but it is very confusing to some people, and very unreliable. So my project is that I will allow people to have multiple iTunes libraries on one computer. So the problem is this. In order to have an option to choose your library, I gotta make sure that iTunes is not running. So this is the script:
Code: Private Sub CheckAndCloseiTunes() retry: 'Custom class that includes the function to safely close iTunes
[CODE]...
So when I use the Threading.Thread.Sleep(2000) code, the form becomes unresponsive.
Title pretty much says it all. Does anyone know a way to to prevent a computer from entering a low/non-processing mode while the program is running? I don't care about monitor modes, screen-savers, hard-drive spindown, etc (in fact, I'd prefer to leave those alone; I like it that it shuts the monitor off after a time period).Basically, I have an industrial program that needs to continually monitor a PCI card it uses for IO; and this activity alone isn't enough to convince Windows not to go into Sleep mode. We normally just shut the power-save features off, but we had an incident where a technician forgot, a customer's machine went to Sleep after the end of the shift, the pumps stopped recirculating, yadda-yadda big mess.
The problem - The btnPause doesn't pop up until AFTER the thread sleeps, but the other two buttons works correctly. What the heck is going on? Here, I'm using the Sleep to simulate doing external events yet to be programmed.
Im just learning and have made some userforms with text box's and comand butttons and i am trying to make them create a new excel workbook and save it. I have try'd all sorts of different code that i have found on the net but carn't get any to work.
I want a program a very simple program, a software that will let you enter a name and then you click "Create". This will create a program and when you click it it will show "Hello! *the name*"
I new in vb. Currently im using vb2008 to run a program.Dim notepadID As Integer = Shell("C:\Program Files\Motvik\wwigo\wwigo.exe", AppWinStyle.NormalFocus)This is the code is use but it keeps show "file not found exception was unhandled.
I edited the development copy of a cherished program beyond restore by CTRL+Z, the original version which I want to recover is already published and it is in the c:/deploy folder but I dont know how to open such files for editing. How can I open this deployed program to edit and add some methods. I was cautious enough to save the program before editing but I was suprised that the original was over written by the edited copy.
Published VB program will not run on another computer yet works fine on the computer the program was written on. Message window during set-up on the other computer reads "Cannot download the application. The application is missing required files." The set-up file is being run from a flash drive.The entire error summary is included below. A recurring line in the error message summary is "+Downloading file:///C:/Documents and Settings/username/Desktop/Application Files/filename_1_0_0_6/filename.exe.manifest did not succeed."The word "filename" is the name of my program. "username" is the computer's owner.Interestingly, the "manifest" file on my computer is kept in C:UsersusernameDesktopApplication Filesfilename_1_0_0_6filename.exe.manifest" I'm running Windows7; the other computer is running Windows XP.How do I get my program to run on another computer?
PLATFORM VERSION INFO Windows : 5.1.2600.196608 (Win32NT) Common Language Runtime : 2.0.50727.3625
I am making a program for me and I told my friend about it and they said that they would like to test it. The only problem is that they don't have VB2008, and there seems to be no way to compile my program so that another person WITHOUT VB can use it. Does anyone have any tips, or perhaps I'm missing something? Let me know ASAP
I decided give up vb6 and begin use vb.net.And I'm going to update my old vb6 code.I used write a vb6 program to update my program.it's a simple program:I have a webside,I put a file in the webside,this file it's just a document(.txt),only include version number.my program use "inet" download this file(address like this [URL]and compare the version number,if this document number it's bigger than this program number,than told user you need update your program.like this:
dim ver as string ver=Inet1.OpenURL(http://www.sample.com/info/ver.txt)
[code]....
But,In vb2008,I don't know how to write those code.I search the local MSDN,it said I can use:""my.network.download" to download files,but it's only can download a file and save it as a file,I want to download a file and save it as a variable(type is long),I don't know how to write those code.
is there anyway to sleep a thread for a "tick". i.e. the tick in StopWatch.ElapsedTick. right now the best i could achieve is this thread.sleep(1). i need it faster
I want to write a program that if ping www.microsoft.com is success,than caption title it's "ok,connected Internet",if ping it's failed,the program "caption" title is "sorry,not connected",but I don't know how to write those code
I have a PictureBoxMain on my form. I have 6 buttons. When I click a button, I want the picture box to display an image that relates to the button I've clicked.
Public Class FormPipe1 Private Sub ButtonBranch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonBranch.Click
When i run the program everything works fine. I want the textboxes to keep the data in them till the next time i run it. Right now when i shut it down (with data in the textboxes) then start it up i have lost all the data.
Heres my code
Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress 'Numeric values only If Not Char.IsNumber(e.KeyChar) And Not e.KeyChar = Chr(Keys.Delete) And Not e.KeyChar = Chr
I have built up an interface in VB2008 with many textboxs and labels on. When I click "New", I would like to clear all the textboxs and labels, i.e. each with a NULL value. Meanwhile, I also would like to clear all the arrays behind the program, i.e. the arrays which are not shown on the interface but is important for the calculation.The only way I could find out now is to clear the textboxs, labels and arrays one by one. So if there are 100 textboxs, 100 arrays, I have to write 200 lines in total. Obviously, it is not expected. Is there any other quick ways to directly reset everything to the beginning when the interface is just opened?
I'm trying to get a VB2008 multi thread application working that connects to a local server program using sockets. Server requests for this particular system can be more quickly handled by a number of connections, so I've written some code to run any number of data request threads that I choose. The problem that I'm having is that the data returned from the server is getting mixed up and is often returned to a different thread/socket than the one that requested it. Other than that, it seems to work okay. If I use just one thread, then the system works as it should. Pls. see incuded code, which is heavily edited to remove all the other fruit salad. Is there any way to set up the sockets so that data returned to the socket/thread that requested it?
Module StaticDeclarations Public WithEvents g_SD As New SocketDataClass(New MainThread.MTCallback(AddressOf MainThread.MTResultCallbackSub)) Public WithEvents g_MT As New MainThread(New SocketDataClass.SDCallback(AddressOf SocketDataClass.SDThreadResultCallbackSub))
how to save a file to "program files\xyz\folder" using VB2008.here the sample code that i've try but i dont see any files that created on those folder.
private Click Button1_Click(ByVal.... If CheckBox1.Checked = True Then Dim A As New System.IO.StreamWriter("C:\Program Files\xyz\folder" & "test1.xml") Dim w As Integer
[code]....
* If i save it to others places its works fine and i can see the files. but when i try save it to Program Files, The file is not appear in the folder.
how to enter a data that i enter in textbox to a datagridview... for example i enter in the textbox is round and when i click add it will go to database... im using ms access database