|
In that case, you're going to have to ask in the ASP.NET Forum. But, ASP.NET won't do this, since it is a server-side technology that generates HTML for browsers. What you want to do is entirely client-side and hence will have to be written in JavaScript.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In that case it sounds like you need a banner (also called AdRotator). You should be able to get plenty of code examples if you post your question in the asp.net forum.
|
|
|
|
|
Hello,
I’m rather new to VB.NET and was hoping someone could explain to me how to capture mouse and keyboard events in an application that is running in the system tray. It seems that minimized and trayed apps don’t catch event unless they have focus. What is the work around?
Thank you,
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
A global keyboard/mouse hook is what's required. VB.NET may be capable of this, as it's able to import API functions. In the end, C or C++ code will do the real work, as usual.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
What do you mean "may"? Application.AddMessageFilter()[^]
Picking up the pace of your VB bashing?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
What do you mean "may"? Application.AddMessageFilter()[^]
Correct me if I am wrong, but this seems to be a message filter for the application in question. How will that catch global keyboard and mouse messages when the app in question is minimised ? Or do I have it wrong ?
Dave Kreskowiak wrote:
Picking up the pace of your VB bashing?
*grin* I was astounded in the face of a recent 'name one thing that VB.NET can't do that C# can do' conversation recently ( the person in question was plainly obtuse, he rejected both the 'using' keyword and pointer access as valid examples ), to find out today that VB.NET does not yet support operator overloading. Perhaps that coloured my frame of mind.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I seem to remember Heath saying that it works, but I can't remember when or in which Forum...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Fair enough. I'd be interested to know, seeing as I may well use it at some point in C#. I'd be surprised if it intercepts messages for all applications though ( which is what you're saying ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i would like to know how to compare date in ASP.NET Web Application..??
the prob is that we are using Oracle as the database..which uses date as DD/MM/YY format while VB.NET uses MM/DD/YY format,..
so how to cope with these two diff formats ??
|
|
|
|
|
VB.NET doesn't use any particular date format. The default dateformat is determined by the system, not VB.NET.
You should be comparing two Date objects, not two Strings of text representing the dates. Convert your data from the database, as well as the compare date, to Date objects and use the .CompareTo() method of one of them to compare it to the other.
Dim dt1 As New Date(2005, 2, 12)
Dim dt2 As New Date(2005, 3, 21)
Dim result As Integer = dt1.CompareTo(dt2)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ya Mr. Dave..
the system date that we tried to enter into the Oracle database through "Today.date.date" is not being entered into the database,,..
wat can be the prob... and so how shud we enter the system date in the database ??
|
|
|
|
|
Without seeing your code, it's impossible to tell you what your doing wrong.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I run into this all the time in my CIS349 and CIS 405 classes. In fact I just emailed a student of mine about a similar problem.
use the oracle to_date or to_char functions.
in SQL:
select * from orders where orderdate between to_date('01/23/2005', 'MM/DD/YYYY') AND to_date('02/23/2005', 'MM/DD/YYYY')
for the reverse....
select to_char(orderdate, 'MM/DD/YYYY') from orders;
In the latter version when you get your data back from the db into your data container you will already have it in the right format.
http://www.jasncab.com/huberblog :: Jason Huber
|
|
|
|
|
We have a bunch of terminal servers using roaming profiles (copies user setting to network share, includes contents of HKCU).
Problem is our logon script is locking the HKCU hive and it is not unloading to be copied.
I installed a tool that is now telling us this is what is locking it.
wmiprvse.exe (1428)
HKCU (0x1dc)
Then I found out that if a certain part of our logon script does not run the profile unloads
We don't really have any WMI experts here. I think we just copied this from somewhere. But what I think is going on is we are not "cleaning up" correctly after doing our calls and this is resulting in the profile being locked.
This is one section that we do some calls.
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
' determine the logon server
objReg.GetStringValue HKEY_CURRENT_USER, "Volatile Environment", "logonserver", strLogonServer
' "\\" prefix needs to be removed
Anyone know what we should do after this to free up the HCKU hive?
|
|
|
|
|
There's nothing to do. Your read shouldn't be locking the key. You can TRY setting objReg to Nothing and see what that does. The WMI Standard Registry Provider doesn't have any Open/Close methods, everything like that is handled internally by the Provider.
Also, if all you need is the name of the Logon Server, just grab it from the Environment strings.
ExpandEnvironmentStrings Method[^]
set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo "Logon Server is " & WshShell.ExpandEnvironmentStrings("%LOGONSERVER%")
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
To bad.
To set objreg to nothing is this what I would do:
Set objReg=
or
set objReg=""
or
set objReg=null
Thanks
|
|
|
|
|
Set objReg = Nothing
Seriously, if all you need is the Logon Server, get it from the Environment strings. Only use WMI and the Registry Provider if you have to. They add a large chunk of execution weight to your script if you use them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Just anybody know how to add a images dynamically to a listview control.and list view control should display like thumbnail images
suiscf
|
|
|
|
|
I want to re-organize the files in a FTP folder. Is there any way to "move a file from a Folder from FTP site to some other folder which is in that FTP site itself" without copying that file to our system.
Thanks,
Regards,
Rajkumar.S
|
|
|
|
|
Only if the FTP Server supports it. You'll have to with the documention for your server.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
I read the articles related to message windows that popup but i still don't have the answer for my problem.
I have a form which launches a new form (i want it to be a topMost form) but even with the ShowWindow() function the second form still gets focus.I tried a simpler example with a main form and a second that didn't contain any controls or painting code and it still gets the focus.This is my declaration of function.Am i doing anything wrong?When should i call showWindow()?
<dllimport("user32")> _
Private Shared Function ShowWindow(ByVal hWnd As IntPtr, ByVal nCmdShow As Int32) As Boolean
End Function
(...)
Dim myForm2 As New Form2
ShowWindow(myForm2.Handle, 4) '4 is the SW_SHOWNOACTIVATE value
This doesn't work for me (using vb.net).Can anyone help me?
Never say never
|
|
|
|
|
I don't know how to avoid changing the focus to the new form, but maybe the following will help you:
You should be able to use the Show() method to display the second form then call Focus() to set focus back on your primary form.
Example:
<br />
dim f2 as New Form2<br />
public sub ShowForm2()<br />
if firstTime Then Me.AddOwnedForm(f2)<br />
f2.Show()<br />
Me.Focus()<br />
End Function<br />
|
|
|
|
|
Hi!
I was trying to avoid that solution, but after a whole day of searching the web and grups, maybe i'm gonna follow that way.
Last night at home i was trying to accomplish this, and i kind of got it (i don't understand why this works but... ) : I was declaring the forms locally like dim myForm2 as New Form2 and then calling the showWindow() function.But then i declared the form as a class Member: Private myForm2 as Form2 and then in the init.Components method i did myForm2 = new myForm2 and then showed the form and it worked ok!!!Why is this?What's the difference between showing a form declared locally and another that is a class member?
Never say never
|
|
|
|
|
Hi!
I GOT IT.It was about time...i can't believe it took me a day and a half to accomplish this.
I think the problem is in the topMost Property.After a bit of thinking, i didn't use that property in the form designer, what i simply did was this, 2 simple instructions(that's what pisses me off):
ShowWindow(Me.Handle,SW_SHOWNOACTIVATE) 'SW_SHOWNOACTIVATE = 4
setWindowPos(Me.Handle,HWND_TOPMOST, XPos, YPos, myWidth, myHeight,SWP_NOACTIVATE) 'HWND_TOPMOST=-1
'SWP_NOACTIVATE=16
The first instruction tells the window how to behave when it appears. That constant tells it to not to steal the focus from other window.
The second instruction places the window where you desire with your desired behaviour.Once again the constants mean that:
1-the window will appear as TopMost
2-the window will not steal the Focus
AND IT WORKS FINE.
Never say never
|
|
|
|
|
Thanks for sharing your findings.
|
|
|
|