473,379 Members | 1,190 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Controling a progressbar by its handle

Hi all

I use vb.net 2005
Lets say I have the handle number of a progress bar from program1.exe
Can I change the value of the progress bar from program2.exe using this
handle number?

TIA
Guy Cohen

Jan 21 '08 #1
5 1474
"Guy Cohen" <Gu******@discussions.microsoft.comschrieb:
I use vb.net 2005
Lets say I have the handle number of a progress bar from program1.exe
Can I change the value of the progress bar from program2.exe using this
handle number?
P/invoke 'SendMessage' + 'PBM_SETPOS'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jan 21 '08 #2
If there were, presumably Program1.exe would "fix" the progress bar soon
after program2.exe changes it.

"Guy Cohen" wrote:
Hi all

I use vb.net 2005
Lets say I have the handle number of a progress bar from program1.exe
Can I change the value of the progress bar from program2.exe using this
handle number?

TIA
Guy Cohen
Jan 23 '08 #3
If you are developing both program1.exe and program2.exe, then there should
be a way that is easier. If you are not developing program1.exe, then, what
makes you think that program2.exe knows better what the progress bar should
show?

"Guy Cohen" wrote:
Hi all

I use vb.net 2005
Lets say I have the handle number of a progress bar from program1.exe
Can I change the value of the progress bar from program2.exe using this
handle number?

TIA
Guy Cohen
Jan 23 '08 #4
"Family Tree Mike" wrote:
If you are developing both program1.exe and program2.exe, then there should
be a way that is easier. If you are not developing program1.exe, then, what
makes you think that program2.exe knows better what the progress bar should
show?

"Guy Cohen" wrote:
Hi all

I use vb.net 2005
Lets say I have the handle number of a progress bar from program1.exe
Can I change the value of the progress bar from program2.exe using this
handle number?

TIA
Guy Cohen
Hi all and thanks for the reply.

Firstly its not a problem - I found a solution it can be done using API
....that is not wrong - is it ? ;)

re: what makes you think that program2.exe knows better what the progress
bar should show?

I develop windows services that handles stuff in the company during the night.
I want to develop a program that controls the status of the services and
that can tell what they are doing.

I had in mind to add a custom service control command - "send status"

In that custom command the service will update the progressbar and / or
textbox that it will have as "progress controls" in his properties.
I will use API to update these by their hwnd...
VOILA

Guy Cohen


Jan 25 '08 #5
On Jan 25, 10:52 am, Guy Cohen <GuyCo...@discussions.microsoft.com>
wrote:
"Family Tree Mike" wrote:
If you are developing both program1.exe and program2.exe, then there should
be a way that is easier. If you are not developing program1.exe, then, what
makes you think that program2.exe knows better what the progress bar should
show?
"Guy Cohen" wrote:
Hi all
I use vb.net 2005
Lets say I have the handle number of a progress bar from program1.exe
Can I change the value of the progress bar from program2.exe using this
handle number?
TIA
Guy Cohen

Hi all and thanks for the reply.

Firstly its not a problem - I found a solution it can be done using API
...that is not wrong - is it ? ;)

re: what makes you think that program2.exe knows better what the progress
bar should show?

I develop windows services that handles stuff in the company during the night.
I want to develop a program that controls the status of the services and
that can tell what they are doing.

I had in mind to add a custom service control command - "send status"

In that custom command the service will update the progressbar and / or
textbox that it will have as "progress controls" in his properties.
I will use API to update these by their hwnd...
VOILA

Guy Cohen
Guy,

I also wonder how to implement a progressbar to see an updated
position of a Windows Service using s"ervice controller" control.
Don't know which API function does show you the current service
proceeding situation within a progress bar, (also knowing it would be
good, not so criticial), reporting only "servicecontroller1.status" as
text.
Jan 25 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stefan Turalski \(stic\) | last post by:
Hi, I used to use CopyTo() method from FileInfo class, does anyone know if there is a way to bind this with progressbar, or with some sort of paintBox - to show progress of moving/coping file ?...
3
by: Steve Teeples | last post by:
Is there a way for code from one class of C# to send a communication to a progressbar in another class to update the bar during runtime? -- Steve
2
by: jez123456 | last post by:
Hi, thanks for the previous advice on progressbars with showing the percentage. I would now like to create a less clunky version. I.e at the moment my progressbar shows 7 separate steps. Some...
2
by: Bill Nguyen | last post by:
How can I create a shared function to display process progress that can be called from other routines within an application? Any example that I can follow? Thanks Bill
2
by: Steven Smith | last post by:
is it possible to change the color of the step blocks from the default blue which are incremented in the progressbar control or is this goverened by windows ? I tried ...
1
by: nobody | last post by:
Hi I'm currently developing a Windows application. At the start of the application I load several tables into datatables in a dataset. I also use a progressbar to show the user how much percent...
6
by: Sam | last post by:
Hi, I have to process a large data loading in my form. In order to give a feedback on the loading status, I'd like to display a progressbar in a popup, in the middle of the screen. How can I do...
4
by: Sin Jeong-hun | last post by:
Some system utilities such as Windows Backup on Windows Vista show RED progress bars when something went wrong. Is this possible in C# applications? As far as I know, the ForeColor property means...
8
by: Eps | last post by:
Hi there, Is there a way to get the progressbar value when a user clicks on it ? I am using wpf at the moment but windows forms solutions would be welcome too. I get the the x and y...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.