|
Make sure the service has the option turned on that allows it to 'interract with the desktop'.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
i have problem in vb with timer control i want the miliseconds but whenever i try it by using format() function or Second(Time) function it shows the required result but the seconds are allways in 2-4-6-8 manner in 4 bit format what can be the problem how can i get the exact time on my form?
|
|
|
|
|
the timer control is not this accurate..
it can't get millisconds .. so it seems it steps 2 millisconds.
maybe you'll need to use windows timers (you'll search some APIs)
|
|
|
|
|
The Timer control doesn't have that kind of resolution. You can use 3rd party high resolution timers such as the CCRP High Performance Timer Objects. The package can be found here[^]. It was originally written for VB6, but can be used in VB.NET also.
RageInTheMachine9532
|
|
|
|
|
OK, I'm builing an app (in VB6 as I know it much more than .NET) that has only two form items. A combo box and a button. The combo box has about twenty options that the user can select and it will launch IE and take the user to the specified page. The user can also type in a fully qualified domain name and it will take them to that page.
All that works perfectly.
However, I am trying to add the ability for users to search google by typing "Google:blah" replacing blah with whatever they want to search for. The way it's working right now is that it is trying to open a webpage with the name "google:blah" and of course, IE can't find it.
I have it coded to select the first 7 characters in the text box, but can't get it to remove them and search google if the first sever characters are "Google:". Any help? I'm just not sure how to remove the selected text. I was trying the following code, but it's not working:
go = go - cboChoose.selText
'I also tried this:
go = go - cboChoose.selLength
Here's a copy of the current file so you can see what I mean.
Any help?
|
|
|
|
|
I think I've got the solution for your problem:
'Variables<br />
Dim go As String<br />
Dim totallength As Integer 'the total length _<br />
'of the google:blah expression<br />
Dim searchlength As Integer<br />
'the length of the expression the user _<br />
'wants to search for (e.g. blah)<br />
go = cboChoose.Text<br />
totallength = Len(go)<br />
searchlength = totallength - 7<br />
go = Right(go, searchlength)<br />
'now the string variable go contains the expression<br />
'the user wants to search for
This code might not be perfect, but it works!
|
|
|
|
|
Very cool! It worked perfect (with a few mods so it works with my code).
Can you test it out now? I'm including a link to download a zip file which contains the app plus source.
I also have another thing i'd like to do. I have it setup so that the button "Go" is not the default because if it is, then the Google: search feature doesn't work if you hit return. I am trying to fix that by adding code that will capture if a user presses the Return key and it will then call the function "cmdGo_click". It's explained more in the source.
Source and App
Thanks,
Keith
|
|
|
|
|
The following code should work:
Private Sub Form_KeyDown(Keycode As Integer, _
Shift As Integer)
If Keycode = vbKeyReturn Then
cboChoose.SelLength = 7
cmdGo_Click
End If
End Sub
But there's still another problem:
Your application only works with English
Windows versions. I use Windows XP Home
German, and the program crashed because
the name of the 'Program Files' directory
is translated into the OS' language.
|
|
|
|
|
Well, the application was designed for in-house use at the company I work for, but I can see that it will be cool to release. So, what directory is equivelent to "Program files"? I know that there's a system command that can be used as the root folder (like Windows is %sysdir% or something like that. Anyone know that command?
I'm releasing another version that incorporates the above code (i put it in cboChoose instead of Form so it'll work).
Yet another version
Thanks again M_M_G
|
|
|
|
|
One important thing that I forgot in the message above:
Make sure the form's KeyPreview property is
set to true!
|
|
|
|
|
I forgot it and changed it and it doesn't seem to matter either way. Odd thing, it won't do the Google: feature the very first time i press enter. I have to close the IE windows that comes up and press enter in my app again for it to correctly search Google.
The program works perfectly for all features when just pressing the cmdGo button manually.
|
|
|
|
|
I don't really know why , but I finally got it to work the first time I press enter. This is what I changed:
Dim GoogleCheck<br />
GoogleCheck = Left(go, 7)<br />
If GoogleCheck = "Google:" Then <br />
[...].
I don't know how to get the name of the program files directory. This would be MUCH easier when using VB.NET!
|
|
|
|
|
Holy crap! It works!
Thanks a ton M_M_G.
I'll have to start coding in VB.NET so I can actually get this to work right. If you want, send me the directory that's equivalent to "Program Files" in the german version of windows and I'll write in a if then statement to determine which version the user's using.
|
|
|
|
|
Cool...
The German name of the directory is:
C:\Programme\Internet Explorer .
Will it be possible to download the final version from your website?
|
|
|
|
|
Cool.
Yeah - I'll post a final version later tonight. What sites do you want in there? The ones that are in there now are just for work purposes, so if you give me a list of some popular sites, I'll enter them in place of what I currently have in there.
Thanks again.
Keith
|
|
|
|
|
OK - I added in an error handler so it will catch your directory.
Here's the newest version - complete with a "working" Google: search tool, direct website access via combo box, and by typing in the address.
I personally will modify mine to be my most used sites and will take it with me on a flash drive.
Again, thanks a ton for your work on this. I'm going to clean up the code and post a zip file soon with complete source available.
If you post it though, I can recompile it with a list with whatever you want. Just tell me how you want it to look in the combo box and what sites you want listed. (ex: in my combo box, i have every categorized).
-Keith
|
|
|
|
|
Thanks for this offer, but I don't know which sites to include at the
moment. Please post a link to the source code .zip file, so I can modify the program on my own.
|
|
|
|
|
No problem.
Here's a link to the source and program. I've added a "about" form that describes how to use the app and it also gives you credit for the Google stuff.
If you just alter the "goasp" variable to point to just IE instead of also referencing a specific site, it can get to your list correctly.
-Keith
|
|
|
|
|
The about form looks really good!
Well, I've still got another question:
May I translate this app into German and offer the executable (or a setup program) on my web site? Possibly I'll also make a .NET version.
This would be really cool!
|
|
|
|
|
Sure! All I ask is that you mention me somewhere - even if it's just in the source.
Post a link once you're done. I'd like to see it in .NET!
|
|
|
|
|
I've just finished work at Quick Access.NET version 1.0!
I added some new features:
- a 'notify icon' that is displayed in the systray. Double-click it and Quick Access will open. You can also right-click the icon to bring up a context menu.
- AutoComplete function for the ComboBox
- Support for WinXP look-and-feel
You can download the MSI package here:
www.madcode.net/download/quickaccess/quickaccess_setup.msi[^]
If you want something changed or if I shall send you the source code via email, please contact me: webmaster@madcode.net
|
|
|
|
|
Cool! I really like it. That makes me really want to start learning .NET.
Cool and thanks for the really good update!
|
|
|
|
|
I'm pleased that you like it.
I'll provide some updates in future, just check:
www.madcode.net/download/quickaccess
from time to time.
[This site isn't available at the moment, but it will
be soon!]
|
|
|
|
|
i want to draw a sphere on a form in visual basic.NET
that looks like three D.
What is the way.
|
|
|
|
|
Hello, does anyone know how exactly this Property works for DataAdapters in .NET? Please do not give me MSDN Definitions...I've read all that.
Basically, what I need to know is...if I have set the UpdateCommand of a SQLDataAdapter to a StoredProc that has "Output Parameters", and I want those Output Parameters to then update the DataSet's Values after using the SqlDataAdapter.Update Method...Do I set the UpdateRowSource Property to "Both"?
Also, if the Adapter DOES happen to update the DataSet's values, will it tell me that the RowState has changed? Because I would need to know if the Output Paramters did modify the DataSet!
Comprende?
|
|
|
|