|
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
|
|
|
|
|
Yes, you have to add a Reference to the System.Management.dll. It contains the entire System.Management namespace.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hi all,
I want to ask one question about time processing in vb.net. I have 1 button and i want to caculate the time between the first click on that button and the second.
thanks.
|
|
|
|
|
Store the time of the first click and subtract it from the time of the second. DateTime.Now is what you need.
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 )
|
|
|
|
|
try the date.subtract function
|
|
|
|
|
Hi!
I have a DataList which pulls info from the database and assigns the values into the labels. Now each row also includes a button, and I try to assign the text value to the buttons from the labels text, but I can't get it to work.
Here is the code I got:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
For i As Integer = 0 To DataList1.Items.Count - 1
Dim linktext As String
linktext = (CType(Me.DataList1.Items(i).FindControl("materialLabel"), Label).Text)
CType(Me.DataList1.Items(i).FindControl("LinkButton"), LinkButton).Text = linktext
Next
End Sub
|
|
|
|
|
What happens when you step through the code ? Does it crash, or do nothing ?
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 )
|
|
|
|