|
|
try
progressbarname.refresh
in loop that copies the file
|
|
|
|
|
Well, you've got a bit of a problem. Just putting a ProgressBar on a form doesn't do anything. You have to update it with, well, progress.
If you're using the File.Copy method, you'll never get that progress. It's a blocking call that doesn't report anything during the copy.
In order to make a progress bar work, you have to copy the file yourself using file stream methods. You know...open a file read some of it, write that to another file. Well, that's where you update the ProgressBar.
You get the size of the file first, start copying the file, track how much of the file you've copied and update the ProgressBar as you're copying the file.
Like the others have said, you can even move the copy operation to another thread so your UI stays responsive.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am using vb.net 2005 and I would like to be able to pragmatically bring up a new Gmail compose window logged in to a gmail account that I will supply the username and password to and then fill the form out pragmatically including:
To field, CC field, BCC field, Body field with HTML text, add multiple attachments.
Has anybody done this or know of a component or URL protocol out there that I can accomplish specifically this with?
Best Regards,
Brent Stringer
|
|
|
|
|
Have you tried looking at the Google API. Most of Google's services use a standard set of API that a developer can use in their programs. However, they do impose limitations on at least the searches available with the searching API, and the developer must register to use the API.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Dear All,
I hope your all professional people can help me this issue.
If I don't know all the table name inside a database. I want to retreive all the table name out. How to do it? (using VB.Net)
After this, I also want to retreive the fields name and their type, how to retreive it using a VB code?
Actually I want to write a import data which can let user select want to import which data table and name. I need the code to help me.
Thanks.
|
|
|
|
|
vincentkhoosiongleng wrote: I want to retreive all the table name out.
If you are using SQL Server 2000, you can query table sysobjects.All user tables have the type column = 'U'
vincentkhoosiongleng wrote: I also want to retreive the fields name
You can query syscolumns based on the ids of the tables you retrieved from queyring sysobjects
|
|
|
|
|
hi i want to build desktop application that should stay alligned on to position of the screen just as taskbar stays on bottom with the ability to autohide after some definate time and ability to cover desktop area as well ... i want if any can help me give any example how to build such a an application or find me on the web... any help will be much appreciated !!! Thanks a lot;)
Do Not Follow Where The Path May Lead.
Go Instead Where There Is No Path; and leave a Trail
|
|
|
|
|
Found a nice article here at CP written by Neil Yao that handles the docking and auto hiding. It's in C++ so you could convert it to vb or just us the dll. CAppBar[^]
|
|
|
|
|
Hey all,
I have the folling code to post data to a php page. However, I'd like to retreieve the response from this page after the posting and save it to a file. The response should just be plain-text XML. (IE, it'll echo out an XML file in plain text as the source). Is there a way to use something like the downloadstring(URL) on this AFTER posting up the data, in order to capture the response?
Thanks,
Mike
Public Function PostToWebUpdate(ByVal postData) As Boolean<br />
Dim Client As WebClient<br />
Try<br />
<br />
Dim dataBytes As Byte() = Encoding.ASCII.GetBytes(postData)<br />
<br />
Client = New WebClient<br />
Client.Headers.Add("Content-Type", "application/x-www-form-urlencoded")<br />
Dim returnedBytes As Byte() = Client.UploadData("http://www.mysite.com/folder/file.php", dataBytes)<br />
<br />
Dim myResponse As String = New String(Encoding.ASCII.GetChars(returnedBytes))<br />
<br />
Return myResponse = "SAVED"<br />
Catch ex As Exception<br />
MessageBox.Show("Error: PostToWeb: " & ex.Message)<br />
Return False<br />
Finally<br />
Client.Dispose()<br />
Client = Nothing<br />
End Try<br />
End Function
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
|
alexrad wrote: WHAT WAS OR IS MY MISTAKE
YOU'RE YELLING! Quiet down...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
As you have been repeatedly told, but don't seem to get the idea yet. TYPING EVERYTHING IN CAPS MEANS THAT YOU'RE YELLING AT THE TOP OF YOUR LUNGS! DON'T...do it...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Why are u yelling, it can harm people?
|
|
|
|
|
Your probably didn't make one. It's one of those little quirks that doesn't have an explanation. Though, that may change with the release of SP1 for Visual Studio .NET 2005.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thangs Dave, i will no more yell,but those things
are too much for 2 in the morning
|
|
|
|
|
I would like to be able to know when a key is pressed within my application. I've been looking at different options and came across keyboard and mouse hooks. The examples I've seen (unfortunately for me written in c#) seem to only be for global hooks. I'm not interested in what happens outside of the program I'm writing, just when the program is active should it listen for a keypress. It would be nice if it didn't matter which control had the focus either. The idea is to create a commandline that becomes activated instantly when a certain key is pressed.
I'm not sure if hooks are the right direction to go for this or perhaps there is something simpler that I can use.
Any help would be greatly appreciated.
Thanks,
David
|
|
|
|
|
You don't need a global hook for this. All you have to do is set the Form's KeyPreview property to True, then handle the Form's KeyDown event. It'll give you all the keystrokes going to that form, even it's child controls, before the controls see the keystroke.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
Are there any good, methods of creating a routine in an application, making the application trialware, until a key code has been entered. Must stop application running after x uses or x days after original install date.
Thanks, Andrew Robinson.
|
|
|
|
|
If your familiar with the settings in properties you could have a boolean for first use, when the program is first run set to false and set another setting to the current date, then each time the program is run check that date and compare.
Both of these settings could then be made redundant by a boolean setting that is set to true when registered. Sorry about not providing code, but this might give you a start.
Posted by The ANZAC
|
|
|
|
|
With one of my applications I have an encrypted file named "Activation.dat". This file contains 3 lines of code.
{ProgramEdition}
{Time activation file created - day of year)
(days left of the trial period)
When the program starts in the main procedure I read in all this data and make sure that the days left not equal to less than 0 and that the day of year is not before the current date of the computer. If the file is missing or the days left is less than 0 then I write to the days left field 'expired'. The program will then fail to execute. This is a very basic form of trial protection that I am using in the beta release of one of my pieces of software, I will be updating it but this is what I have right now. I would suggest a strong encryption procedure, I use a OneTimePad rolling encryption algorithm, but algorithms like RSA, DES, Rijndael should be sufficient.
For further protection you can also have the software end on a particular date.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
i have cretaed one blank report and i have placed one textobject now i want to connect to database how to do it?
|
|
|
|
|
|
CR HAVE MANY OF SOURCE OPTIONS
IN FIELD BROWSER U CAN SPECIFIED A PLANTY OF SOUCES
I USE DATATABLE FROM DATASET WICH IS, BY SOME ADAPTER, FILLED FROM DATABASE
FIRST CREATE STORED PROCEDURE TO FILTRATE DATA
WRITE SOME CODE FROM FRONT END TO FILL DATATABLE USING DATAADAPTER IN, FOR EXEMPLE, BUTTON'S CLIK EVENT
THEN CONNECT WITH CR
....
|
|
|
|