|
I'm trying to use a progress bar in a .Net 4.5 application while calling a method that doesn't return for 5-7 seconds. This is a simple application, but the examples I've seen are either based on file operations or web operations. Since mine is neither I'm unclear as to:
1) What type of async method to use?
2) For the await method what type of .NET method do I use (e.g., .DownloadStringTaskAsync)?
I'm trying to use Furytrader post 'Simple .Net progress bar using async/await', 2/18/2014, but I'm struggling. Example code is a lot to ask for but mod's to Furytrader's post might be easier.
|
|
|
|
|
With a bit more investigation, it was apparent that the time consuming task in this example, retrieving a string from a website, was effectively driving the frequency that the progress bar was updated -- retrieve a string then update the progress bar. My problem is that the task I'm calling does not return for several seconds and it is during this time that I want to be updating the progress bar since the task is a blocking task.
How do I call such a task and also be updating the progress bar?
|
|
|
|
|
Howdy - you might try using a Background worker for this task. The Background worker class provides a straight forward method to update progress bars etc.
|
|
|
|
|
Dear Friends,
I am using Windows 8 (64 Bit) and M. Office 2007 (32 Bit) but I cant create Access Database.
Please tell me, I need to install MS Access 2007 or it pre installed into ms office 2007. there are no option display in start menu about access 2007.
Amol
|
|
|
|
|
What does this have to do with VB.NET??
|
|
|
|
|
Access only comes with the Professional edition of Microsoft Office. If you have the Standard or Student edition, Access is not included.
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
|
Hello experts,
I have a combobox which lists down lot of values like Apple, Ant, Cat, Carrot,Costco etc. But I want it to work as follows.
so when I type "Ca" on combobox it should show only those in the list that starts with "Ca" In this case its carrot and Cat.
This is a windows application developed in Vb.net.
Please let me know how to achieve that.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
Solved
cbmBrand.DropDownStyle = ComboBoxStyle.DropDown
cbmBrand.AutoCompleteMode = AutoCompleteMode.SuggestAppend
cbmBrand.AutoCompleteSource = AutoCompleteSource.ListItems
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
The 5 is for posting your own resolution
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thank you This gives lot of boost up. Because you know I am new to DotNet.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
Hello, are you binding the records from database or from arraylist?
|
|
|
|
|
Database. I used a Stored Procedure to bind in.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
string Block = "1111111111";
string a = "87654321";
string m = "2222";
string c = "11";
string u = "99";
string v = "00";
byte[] result = W(
SoapHexBinary.Parse(a).Value,
SoapHexBinary.Parse(m).Value,
SoapHexBinary.Parse(v).Value[0],
SoapHexBinary.Parse(u).Value[0],
SoapHexBinary.Parse(c).Value[0],
SoapHexBinary.Parse(Block).Value
);
from VB.NET
Dim Block As String = "AAAAAAAAAA"
Dim a As String = "99999999"
Dim m As String = "3333"
Dim a As String = "77"
Dim u As String = "07"
Dim v As String = "00"
Dim result As String = ""
result = W(a, m, v, u, a, Block)
a, m and Block are not accepted.
I'm not a C# expert so I guess that there is something to be done in order to correctly address strings and arrays between the two languages. Must be kind of basic rule I ignore...
Anybody can help?
Thanks in advance.
Seppax
|
|
|
|
|
|
I downloaded a vb 3d game using dx8. When I tried to run it, I got this error message
run-time error '-2005529767 (88760b59)': automation error. I tried google but couldn't get the solution.
Any idea is welcome!
|
|
|
|
|
Otekpo Emmanuel wrote: I tried google So, did I. Looks like you missed a parameter, according to this[^].
Otekpo Emmanuel wrote: Any idea is welcome! Try asking where you downloaded it - we don't know what code you are referring to.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
On top of that Managed DirectX has been dead for a long time now.
|
|
|
|
|
Good day friends! Please does anyone know where I can get good tutorial on 3d raycasting using vb6 or vb.net. I tried google but am not ok with the ones I seen.
|
|
|
|
|
Raytracing is CPU-intensive, and not done in VB. You could look for VB.NET library that does the raytracing for you.
VB6 has been dead for some time - no one should be actively writing software in it, as the product would be considered outdated before the first line is written.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have a user control with two buttons on it. I want to make everything except the buttons transparent, so the main form on which it loads can be seen behind it. There is no code behind on the user control class, but in the designer I have set the backcolor property of all controls to Transparent. When I run the program, I can see different controls behind the button images.
<how can="" i="" add="" images="" with="" the="" question="" here?="">
|
|
|
|
|
Then you must have done something wrong. But without more information we cannot guess what that is.
|
|
|
|
|
Is there a way to add images here? The problem is, while all controls (user control and the 2 buttons on it) have their backcolor property set to Color.Transparent, when I run it, it's not transparent. The background shows an image of wherever my mouse moves on main form. I think the background of the user control does not refresh properly, but I am not sure how to handle this.
For example, if my mouse is on Button 1, then the background of Button 2 changes to the image on Button 1.
|
|
|
|
|
You need to create a simple text application to try and figure out where the problem is. Make a simple form with no more than three controls, in a similar configuration to what you have already. Then run some tests and see if you can identify the exact circumstances of the problem.
|
|
|
|
|
The problem with Transparent is that it isn't.
Transparent only tells the control to take on the background properties of the control that contains it.
Using the properties of the controls in Windows Forms, you CAN make the entire form really transparent, but you can only make the ENTIRE form, along with ALL of its contents, transparent. You cannot single out a control to be not transparent.
It can be done using calls to Win32 functions. Start reading these[^].
|
|
|
|