|
You need a system wide hook to catch the event you're looking for, and activate your program.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Yes, a program that watches the keyboard across the whole system. If you search CP, you'll find articles on it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Friends,
I am getting the exception on this line
ballot = CType(Context.Handler, ballotpaper)
Invalid Exception code was unhandled by user code
unable to cast object of type 'ASP.electionvote_aspx' to type netvoting.ballotpaper
I posted my code here:
Dim ballot As ballotpaper
Dim str As String
Dim ecode, bcode, empid, voterid, sql1, sql2, elcode1, dt As String
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
ballot = CType(Context.Handler, ballotpaper)
str = ballot.radiostate
'*****************************
***************************
If Application("CON").STATE = 1 Then Application("CON").CLOSE()
Application("CON").OPEN()
Can any guide me to come out from this exception?
Thanks in Advance
|
|
|
|
|
Eswar4u wrote: ballot = CType(Context.Handler, ballotpaper)
Context.Handler is the web page, electionvote.aspx. It cannot be cast to type ballotpaper.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
And people wonder why there seems to be so much electoral fraud when it comes to electronic voting...
|
|
|
|
|
Hi Christian Graus,
Thank you for ur response. I am strange to this type of coding. actually we are working on updations. For each page the code is in the same way. I am not facing problem in any other page. Only in this page I am facing this exception. Can u explain how to proceed to come out from this exception?
Thanks in Advance,
|
|
|
|
|
Eswar4u wrote: Can u explain how to proceed to come out from this exception?
Not really. I have no idea why you think you can cast between these objects, or what you're trying to do, I just know that it's fundamentally broken, the cast is not valid.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Iam working in Visual Basic not in VB.NET
I want to create Windows like DLL. I mean "Shell32.dll" like that. In ActiveX Dll we simply add the Reference it in our project. But i dont want like that.
We are accessing "Shell32.dll" in Windows Directory know. like that i want.
I saw this link already
http://www.windowsdevcenter.com/pub/a/windows/2005/04/26/create_dll.html?page=1[^]
But I dont understand. They aren't said which type of project is to open for create a dll
Please give me a idea to do this...
-- modified at 1:40 Wednesday 11th April, 2007
Thanks & Regards
Kumaran
|
|
|
|
|
The dlls in windows are written in C and C++. You can create managed dlls by creating a class library project, but they won't be exactly the same as a Windows dll.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
VB6 can only create a COM-based .DLL. It doesn't support creating a function library .DLL that you're talking about.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I have a arraylist which contains a lot of strings splitted on a delimiter
Dim arrTemp as ArrayList
Dim strRule as string
arrTemp.add(strRule.Split(New [Char]() {"{"}))
Now i want to retrieve the strings from the arraylists to do some other operations.
How to do it..
Please help me out
|
|
|
|
|
Dim arrTemp As ArrayList = New ArrayList()
Dim strRule As String = "1{2{3{4"
arrTemp.Add(strRule.Split(New [Char]() {"{"}))
Dim resultout As String() = arrTemp.Item(0)
System.Console.WriteLine(resultout(0))
Most any loop will work to get through the arrays. Kind of an odd delimiter but it works. Can I suggest you also look at the Regex split also if you want to expand you options.
|
|
|
|
|
|
You can use for each or array notation to get objects out of an arraylist. If you're using VB.NET 2.0, do not use arraylist, use the generic versions instead.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sir/Madam,
I wanted to know something about the registry.As the executiable files of the machine resides into the registry.
Now My Question is , eg there is Yahoo Messanger installed on my machine.
What keysin the registry allows the user to open the yahoo messanger.I mean , Administrator can prevent the user to stop openning a particular exe.
Likewise what are the keys involved in the registry that prevent the user to stop openning the yahoo messenger.
Thanks and Regards
Pankaj Garg
|
|
|
|
|
Try installing Yahoo Messenger at your own computer and search the registery yourself? You can open the registery editor by using Start --> Run --> regedit
--Zaegra--
|
|
|
|
|
amaneet wrote: As the executiable files of the machine resides into the registry
I think you've asked this question before...
.EXE's are NOT stored in the registry. Indexes to COM components, which are supplied to certain .EXE's and .DLL's, are stored there.
amaneet wrote: What keysin the registry allows the user to open the yahoo messanger
There are no keys that allow this.
amaneet wrote: Administrator can prevent the user to stop openning a particular exe.
This is controlled by Group Policy. Pickup a copy of the Windows XP or Windows Server 2003 Resource Kit to learn more about it.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
how can i determine if a program is currently runing and then switch to it in VB 2005?
I am always greteful for any help!
|
|
|
|
|
if u please elaborate it more precisely.
Thanks
|
|
|
|
|
I've used the FindWindow function but this only works if I send the full window title to it. I want to find if a current program is running and if true then switch focus to this window.
I am always greteful for any help!
|
|
|
|
|
Sir,
Provide the code.This will help me in manipulating it.
Thanks
|
|
|
|
|
I use this function to find if a window is currently runing. This is declared in genearl declarations:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
This function returns a value greater than 0 if window is found. I have to send the full window title to this function to return a value greater than 0.
What I want to knowl is there someway I can find a window title that is currently runing and if ture then switch the focus to this program?
I have used the AppActive() function with the Shell function but I need to be able to switch to a running program(s) by passing only a part window title name.
I am always greteful for any help!
|
|
|
|
|
GuildfordG wrote: but I need to be able to switch to a running program(s) by passing only a part window title name.
You'll have to enumerate through all the windows and compare the window titles yourself. There is no function to do a "search" for a title.
EnumWindows[^] docs
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Sir/Madam,
I wanted to import System.Management
Will it take any reference to add system.Management in the code behind file
The problem is , if i am trying to write imports System.Management explicitly then i am not getting the management class.
Please help.
Thanks and Regards
Pankaj Garg
|
|
|
|