|
The Managed Windows API has some really easy functions for Global Keyboard Hooks.
http://mwinapi.sourceforge.net/[^]
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
I've been using Cursor.Current to get the mouse point image but it doesn't capture alpha correctly. Is there something I can do to make it give me the alpha correctly?
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
I can't remember exactly, but I think the Cursor class didn't work with 32-bit cursor images with alpha. I believe this had to do with a problem in GDI+, but I could be wrong.
I think you'll have to use Win32 API functions directly to get at the complete image, though I don't know exactly how to do it. I'd probably start by looking into the GetCursor and CopyImage Win32 functions.
|
|
|
|
|
Copyimage doesn't seem to convert it from a cursor to a bitmap.
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
I have solved this. For anyone who needs help in the future with this problem, use the DrawIcon method to draw an Icon created from the handle of the cursor.
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
|
When click the check box with the device not conectted i get the error msg box and the check do not stay thare that part works good that is what i want
When click the check box with the device conectted it runs the code
and most of the time it only runs the code once i have to stop and start my program to get it working agine
If CheckBox1.Checked Then
NumericUpDown1.Value = CType(CTemp.Text, Integer) + 1
NumericUpDown2.Value = CType(CTemp.Text, Integer) - 1
and it works
But when you click to take the check out of the check box it will not run this code
Else
NumericUpDown1.Value = 0.0
NumericUpDown2.Value = 0.0
phidgetIFK.outputs(0) = False
phidgetIFK.outputs(1) = False
End If
witch it was working before i put the bChecking
This is my code for the check box
<br />
Private Sub CheckBox1_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged <br />
If bChecking Then Return <br />
bChecking = True <br />
If Status.Text = "Not Connected" Then <br />
MsgBox("interface is not connected. Connect USB cable and try agine.", MsgBoxStyle.OkOnly + vbCritical, "Error") <br />
CheckBox1.Checked = False <br />
bChecking = False<br />
If CheckBox1.Checked Then <br />
NumericUpDown1.Value = CType(CTemp.Text, Integer) + 1 NumericUpDown2.Value = CType(CTemp.Text, Integer) - 1<br />
Else <br />
NumericUpDown1.Value = 0.0 <br />
NumericUpDown2.Value = 0.0 <br />
phidgetIFK.outputs(0) = False <br />
phidgetIFK.outputs(1) = False <br />
End If<br />
End If<br />
End Sub<br />
I want to thanks everone for your help
|
|
|
|
|
I'm not entirely sure what you are trying to achieve but I think I see a problem with your code anyway.
* You first check bChecking, if it is not 'True', then you run the rest of the code
* Then, later on in the sub, you set CheckBox1 to checked, which I believe will then run this event again because after all, this sub runs when CheckBox1's check state changes!
* You now check bChecking again, but it is now 'True' therefore the event will exit (I think)
Maybe a better event handler would be CheckBox1.Click
|
|
|
|
|
How about simplifying things by scraping this and enabling/disabling the controls depending on if the device is connected/disconnected or not? That way, you're not trying to change the value of a checkbox inside the checkbox's own changed event.
|
|
|
|
|
you got me thare i thot i was on the right track here
do you have some information i can look at for the idea you have ??
|
|
|
|
|
I would probably be looking for a Connected and/or Disconnected event in the phidgets library. Something that tell's you a new device has shown up or been removed.
|
|
|
|
|
is it possible to show a pps or ppsx file in my form? I don't want to run it outside my application. I want to set the size of the show as my form size.
OmarMallat
|
|
|
|
|
There's no way to do this if powerpoint is not installed. It *may* be possible to embed powerpoint as a control, but I have never heard of it being done. You'd have to read the microsoft tools for office docs to see if they support that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi all,
I am newbie in outlook programming using vb.net.
i m facing write event problem of outlook.
The code is below. What i am doing in this code. i m getting all contacts form outlook and create write events for all contact. When i m trying to edit any contact from outlook 2007 and save that contact, then it is showing last contact name and body of contact which is last write by for loop given below. But i want to show those contact full name and body info which i edit.</b> I am using vb.net2005.
For i1 As Integer = 1 To contactFolder.Items.Count
contact = DirectCast(contactFolder.Items(i1),Microsoft.Office.Interop.Outlook.ContactItem)
AddHandler contact.Write, AddressOf Contact_write_Event_
Next
Public Sub Contact_write_Event_(ByRef cancel As Boolean)
MsgBox(contact.FullName & "-----> " & contact.Body)
End Sub
Where i m wrong please guide me.
Thanks a lot
Dharmchand Dhingra
|
|
|
|
|
Your post is hardly readable.
1 - Please don't use unnecessary bold letters.
2 - Wrap your code inside <pre lang=vbnet> </pre> .
3 - Indent your code properly.
|
|
|
|
|
First of all sorry for that
I think expert programmer don't see this type of thing like bold and alignment. They just concentrate on problem and write desired solution.
So please if you have a solution than reply otherwise no.
Again sorry for that Navaneeth
|
|
|
|
|
dcdhingra wrote: I think expert programmer don't see this type of thing like bold and alignment. They just concentrate on problem and write desired solution.
Errm, No we're human too, and in fact expert programmers will expect well written code and within set convensions.
dcdhingra wrote: So please if you have a solution than reply otherwise no.
With this sort of attitude, I will be suprised if anyone will help you now.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Hello Steve Jowett
you are right,
Actually i have posted near about 5 types of outlook problem in codeproject.com.
No one give desired solution of my problem except bold and italic and alignment issue..
I m really sorry to all who read this. But in frustration and for newbie it can happened.
I will change my attitude.
Thanks for reply
Dharmchand dhingra
|
|
|
|
|
I've got a VB.Net windows program that monitors a database
This progam sits in a repetitive loop. I would like to be able to output some data about what the program, had been doing in each loop.
The problem is that the listbox on the user interface does not display anything until the process has eneded.
Does any onw know how I do this?
|
|
|
|
|
Martijn Groen wrote: The problem is that the listbox on the user interface does not display anything until the process has eneded.
Looks like you have only a single thread. Try to run the operation on a different thread. If you are adding items continuosly in a tight loop, use ListBox.BeginUpdate()[^] and once finished call ListBox.EndUpdate()[^]. This will prevent unnecessary drawing the listbox.
|
|
|
|
|
Thanks Navaneeth
I've tried using the update. It doesn't seem to do what I'm trying to achieve.
What I need is to be able to update the listbox realtime eg to show data flowing through (mid loop) rather then render the control with all data when the sub completed execution.
I want to build a data flow monitoring tool that sites on a desktop.
For the below code I'm aiming forthe application to pump a new item into the listbox visually in every iteration of the loop. I've added the thread sleep to slow it down and spread the timestamp apart.
Dim counter As Integer = Nothing
Do While counter < 100
counter += 1
ListBox1.Items.Add(" timestamp output " & Now)
Threading.Thread.Sleep(200)
Loop
Does anyone have any ideas?
|
|
|
|
|
Again, you have to move the code that is generating the data to a new thread, then Invoke a method on the form to update the ListBox on the UI thread. Don't worry about the BeginUpdate and Endupdate methods just yet. Worry about getting the data to the control from a background thread first.
You may want to look into the BackgroundWorker component if doing your own threading is a bit intimidating.
|
|
|
|
|
Hi,
as others have said, you need a separate thread to keep things running AND your GUI alive.
Choose one of Thread, ThreadPool, or BackgroundWorker.
The former is the most flexible, the latter often is the most comfortable. You could implement a loop in its DoWork handler, include a Thread.Sleep if you want to, and call ReportProgress() to report progress on the GUI; i.e. your Progress handler could add data to the ListBox. That would seem the easiest way to avoid cross-thread problems. And you might want to read this little article[^] if you would consider another way (Thread, ThreadPool; or even BackgroundWorker without ReportProgress).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks to everyone for their feedback I've got it going now
|
|
|
|
|
I need to decorate my VB 2008 db app with icons for command buttons, data grid views etc. But I don't know where to go for a library of Icons to suit most situations. Can I have a top 10 with best value as a factor?
Thanks
|
|
|
|