|
can i programatically find out the window which was last opened (just opened).
eg i opened the c:\program files then c:\windows .
then my program should tell that the freshly opened document is C:\Windows.
|
|
|
|
|
There's no API that does this directly.
You can get notifications of window creation and destruction if you implemented a Window Hook called CBT. This article[^] gives a limited view of a .NET implementation of the CBT hook.
Warning! Windows Hooks is VERY advanced topic and requires knowledge of how Windows works internally to understand it.
|
|
|
|
|
iam new to vb.net,iam posting the code i hav written please make modifications where ever neccesary
cmd.Connection = cn
cmd.CommandText = "select max(EMP_CODE)+1 as lastfrom EMP_DETAILS where EMP_PLACE='" & ComboBox1.Text & "'"
cn.Open()
While dr.Read
cmd.ExecuteScalar()
TextBox1.Text = dr.Item("last")
End While
cn.Close()
|
|
|
|
|
Hi
Check this example and apply your code .. You need not use while loop if you are executing ExecuteScalar as it returns one row only.
Example from MSDN[^]
Hope you got it..
Harini
|
|
|
|
|
iam vb6.0 programmer,this code works fine in vb6.0,how to write same code in vb.net
|
|
|
|
|
cn.Open()
cmd.Connection = cn
cmd.CommandText = "select max(EMP_CODE)+1 as last from EMP_DETAILS where PLACE='" & ComboBox1.Text & "'"
dr=cmd.executeREADER
While dr.Read
TextBox1.Text = dr.Item("last")
End While
cn.Close()
Now Check it
|
|
|
|
|
hi iqbal ,it is displaying a message "The select statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect".
|
|
|
|
|
try this:
cn.Open()<br />
cmd.Connection = cn<br />
cmd.CommandText = "select max(EMP_CODE)+1 as [last] from EMP_DETAILS where PLACE='" & ComboBox1.Text & "'"<br />
dr=cmd.executeREADER<br />
While dr.Read<br />
TextBox1.Text = dr.Item("last")<br />
End While<br />
cn.Close()
Hope this helps you.
Peace!
|
|
|
|
|
Dear All,
i am creating application in vb.net,
and using word,excel objects in that application,
as they are very heavy weight objects and they are consumed tons of memory, my application is slow down in performance is there any way to increase it....
or any coding tips that i use in my application..
please help...
Take care,Best regards
-koolprasad2003
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
try to leave the objects opened-loaded, so you can reuse them.
|
|
|
|
|
Yeah, don't use Word in your ASP.NET application.
Do your conversions ahead of time so the user isn't waiting for Word to start on your IIS Server, load a document, resave it in a conversion to HTML, and then a return response of the new HTML document.
|
|
|
|
|
Hello,
how do I greate a new instance oy my Generic Type when I have an Object of Type Type which represents my Type?
Thanks,
Nathanel
|
|
|
|
|
Could you provide an example, because your question is very confusing.
|
|
|
|
|
Something like this
<br />
<br />
Dim MyType = xyz.getType()<br />
Dim myList As new Generic.List(Of MyType)<br />
<br />
|
|
|
|
|
|
Your explaination is a bit confusing and incomplete. I'll show you whats normally done:
Public Class MyClass
Public Field1
Public Field2
End Class
.
.
Dim myCollection As New List(Of MyClass)
|
|
|
|
|
Hi, I have tried many thing about send sms to mobile phone by vb.net, but many problem found, does anyone know? Please help me.
Regard
Socheat
................
|
|
|
|
|
Obviously, what you need to do, is find a way to interface with a gateway that accepts SMS, probably online.
This[^] looks like it has 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 )
|
|
|
|
|
Yes, i want to find a code, or example.
Socheat
................
|
|
|
|
|
This[^] was the third link in the google search and one of at least four that had source code.
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 )
|
|
|
|
|
Did you test that application? I think it not work...
Socheat
................
|
|
|
|
|
Why should he be testing code that you're going to use?? Are you paying him to do so?
|
|
|
|
|
|
Hi,
I have "inherited" a VB.NET application with many child windows that each take care of different tasks. The parent application (window) gets started in the morning and gets closed in the evening, and all during the day child windows will be opened and closed. My predecessor did not always follow best practices in his coding. As a result the application does not always free up the memory it used after a certain child window gets closed. I.e. the task manager shows an ever increasing amount of memory usage for the application as the day progresses.
The question is, will adding Me.Dispose() to the closing event of each child form do the trick, or is there some other simple way to free up memory when closing a (child) window, without closing the entire application?
All (friendly) suggestions appreciated,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Dispose will do the trick. If you're reusing the same forms, the other thing is to make it a member and only ever create one.
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 )
|
|
|
|