|
Is there any way to hook keyboard input as wl as mouse clicking event?
Word.Application object has an event called
WindowBeforeDoubleClick I am looking for similar event for keyboard.
I am trying to find a way to enable a toolbar button when active document is modified.
Van
|
|
|
|
|
As i understand, you want to keep track of every keyboard action the user performs in the word document?
You can always implement a local hook on the word document thread using any of the classes available here: http://www.codeproject.com/csharp/NetWin32Hooks.asp or here http://www.codeproject.com/csharp/GlobalSystemHook.asp
The rest of the work you have to do is first get fmailiar with these classes (maybe you already are) and second you'd have to get the ThreadID of the desired word-document window...I know a way to do this by using the Win32 API call for FindWindowEx...you simply have to specify the name of the window (in your case "Word" and it will return the hWnd...just stick that hWnd instance to the above classes and you're hooked to the word thread
Let me know what happens
|
|
|
|
|
Hi
We want to create a startup script that when run will remove all groups from the local Windows 2000 Power User group and then add a Active Directory Group to this local group. Does anyone have or know were I could find this a example of code that does this?
Thanks
Andrew
www.purenetworking.net
|
|
|
|
|
You'll find what your looking for at the Script Repository on MSDN[^]. Be careful how you code this script and when it is run though. You don't want your users to be running it at login. This will have to be run by a Policy object that has admin rights to the machine.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Try to browse the script in here[^]. It has a lot of sample script to work in windows OS.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
how do you play a sound-file in VB.NET without having to play it through a Media Player object?
|
|
|
|
|
Mentalis.org[^] has a class[^] to play media.
I used it for a media player I made a while back.
--
Aaron Eldreth
|
|
|
|
|
I have a situation where I need to download multiple files in a vb.net application.
To speed up the process, I am trying to download multiple files at one time looping through each of the files and launching them in their own thread (code below). The problem is that when there are hundreds of files to download, it launches them all at the same time and half don’t get downloaded. Any idea how I could control it to launch say 4 at a time, so that when one finished another would launch until the batch is complete? Was thinking message queues but am not sure if this is the right path to take.
Any help is appreciated
Dim count As Integer
'loop through each file
For count = CType(txturlcountbegin.Text, Integer) To CType(txturlcountend.Text, Integer)
' create new download object
Dim c As Common = New Common
' Hoook up the on download complete event
AddHandler c.FileDownloaded, AddressOf filesaved
'Set the file download properties
c.fn = txtFileName.Text
c.sp = txtSavePath.Text
c.wc = txtWildCard.Text
c.tb = txtBegin.Text
c.te = txtEnd.Text
c.url = Regex.Replace(txtURL.Text, txtURLWILDCARD.Text, count.ToString)
c.batchnum = count
'launch a new thread to download the files
Dim t As New Thread(New ThreadStart(AddressOf c.getFiles))
t.Start()
Next
|
|
|
|
|
You would have to write your own thread manager, probably using the thread pool to do this. For an example, you might want to search the 'Net for examples of download managers.
You might also want to consider using the BITS service to handle file downloads for you. For an example of this, you can check out Background Copying[^] on MSDN.
Considering that the network pipe can only send a single packet at a time to a single thread, all of your threads will be waiting for each other to get done with the network pipe. You could have 10 downloads going at the same time, but their really not going to get there much faster than if you downloaded them one at a time.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to display a save dialog box on a web page.
I used response.append header but that displays both save and open dialog whereas I want to have only the save button.
Or else. is it possible to display a file dialog box to the user the same as used in Visual Basic 6.0
Thanks in anticipation.
Regards
Nidhi
|
|
|
|
|
This question really belongs in the ASP.NET Forum. But, you really don't have any control over the dialog box the browser puts up in response to downloading a file. Unless, of course, your page has the dialog box functionality coded in JavaScript.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
can u code the same in java scrpit?if yes how.
thanks n regards
|
|
|
|
|
Like I said, this is a question for the ASP.NET Forum, not VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I wanted to show a PrintPreviewDialog directly on top of a form in my application just like the way IE does. However, setting the Location, Size and the SetDesktopLocation properties of the dialog fails to do this. The dialog has the same size as the calling form does but it is moved to the left and lower than the calling form. I think this is by design but I do not know why. Is there a workaround for this?
|
|
|
|
|
Can it be determined if the user presses a menu or if the user uses a shortcut? Both actions result in the same code being run, I just wanted a slightly different behavior between the ShortCut and the Menu.
|
|
|
|
|
That doesn't follow proper GUI standards at all. If the user presses a keyboard shortcut for a menu item, it should do EXACTLY the same thing as clicking on that menu item.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yeah, I know. But could it be done?
|
|
|
|
|
There is nothing in the MenuItem event handlers that will expose this kind of information. You could try to use the OnKeyDown and OnKeyUp events to track what keys are being used just before the Click event fires on the MenuItem object, but I don't see this as a good or even flexible option to use. Is that much code really worth the odd (and non-intuitive) interface?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can i interrupt a loop operation? Example im iterating over all the records of a 100,000 datareader however i decided to cut short the iteration by clicking a Stop button. How do i do that?
|
|
|
|
|
you can set a temp var
dim tmp as boolean
when you press the button set it to true
in the while code use this
while tmp = true
...
end while
|
|
|
|
|
You add a variable that you check within the loop. Exapmle:
<br />
dim b as boolean as boolean<br />
dim i as long <br />
for i=0 to i=1000<br />
if b=true then<br />
exit for<br />
end if<br />
next i<br />
you change the value of b somewhere else in your code, probably in the "Stop" Button event. You may also want to consider concurrency issues on that variable.
Good Luck.
|
|
|
|
|
erm.. what would the point of this be. You're saying give me the number from this list, when it's this number that I have already.
I'm not sure, but should you not put quotes around a query for a numeric value ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
ralphz wrote:
if i never include 'where TagNo= '"+ ListHardware.selecteditem.tostring+"'" ' then all field is populated
That's because you selected them all.
My advice would be to stay away from computers.
First of all, the advice I gave yesterday is correct, you should get rid of the quotes around the number you're looking for, otherwise you look for it as a string.
Secondly, the SQL as I read it yesterday was something like SELECT ID from myTbl WHERE ID=5. If you know ID is 5, why do you need to select it ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Christian Graus wrote:
That's because you selected them all.
My advice would be to stay away from computers
Christian, are you the kind of VB programmer that was teased/bullied at school, who now feels he must look down on others in need of help, introducing a side of snide comments and an unfriendly attitude.
|
|
|
|
|
Anonymous wrote:
Christian, are you the kind of VB programmer that was teased/bullied at school,
No, actually, I am an actual programmer ( I don't use VB, and I refuse jobs that require me to ), who comes into the VB forum on the basis that I can help people with VB.NET questions.
Anonymous wrote:
who now feels he must look down on others in need of help
I was actually trying to help.
Anonymous wrote:
introducing a side of snide comments and an unfriendly attitude.
I did feel bad about being rude to this guy afterwards, but the fact is that both myself, and everyone I have shown this code to, thinks it is hilarious. I told the guy (assuming you're a general anonymous pussy and not the guy in question ) that the query was redundant, and he still couldn't work it out. Based on that, he is clearly over his depth, and anyone who is over their depth using SQL or VB should seriously consider if they're up to the world of computers.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|