|
How do I capture a form's minimize or maximize event? I want to use these to minimize the form to the system tray instead of the taskbar. Will I have to override something?
"you can't forget something you never knew..." M. Du Toit
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
I use:
Private Sub fraMain_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
for the same purpose.
However when I activate my form again, it triggers the form's load event. (still working on that one)
My advice is free, and you may get what you paid for.
|
|
|
|
|
The Grids are a great way to display data, but I just noticed that sorting text columns poses a hiccup. Specifically, if I have three rows with IDs:
BB1, BB2 & BB10
Then the Grids sort them in the order
BB1
BB10
BB2.
This is particularly problematic in my case as I use the data in Grids to generate printed reports, & I want the data to be sorted in true alphanumeric sense. So, is there a way to achieve the desired affect???
|
|
|
|
|
what is the difference between shared ,public and public shared variables.if i declare a class as shared what is the advanvantage?
can anyone help me?.........
|
|
|
|
|
shared means it's visible to other classes within an assembly, but not outside it. If you have no code in dlls, this won't matter to you at all.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
saravanaks wrote: what is the difference between shared ,public and public shared variables
Shared is when the field, property or method is available to all instances of the class. (Equivalent of static in C#)
Public is when the field, property or method is available to code outside the class in which it is declared. In this case the item operates only on a single instance of the class.
Public Shared is a combination of Public and Shared.
saravanaks wrote: if i declare a class as shared what is the advanvantage?
It means you cannot have any instances of the class and all members must also be declared as Shared.
|
|
|
|
|
what is dll hell problem in .net
|
|
|
|
|
|
If you have these sort of broad questions, try google first.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to change the column type of datagridview in run time.
Textbox column type to Link column type.
Thiwa
|
|
|
|
|
U can write following code It may help you.
LinkCol = New DataGridViewLinkColumn
dg.Columns.Insert(ColumnNumber, LinkCol)
where ColumnNumber is column where u wnt link columntype.
priya
|
|
|
|
|
Hello everybody, i'm new to VB and i need to write a macro for Execl with VBA . I'm trying to save a part of table to a text file. I know alreay how to makr this part with the range function, unfortunately there's nothing like range.save() . Can you tell me how to write it to a text file?
Thank you very much in advance
|
|
|
|
|
I'm no expert in the Excel object model, but it looks like you'll have to iterate over the cell values in your range, one by one, and write them out to a text file yourself. There's nothing that's going to do it for you. But, I could be wrong. I don't do any Office coding but maybe once every couple of years...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I developing a window application using vb.net, i need to do a write log function to keep track the client trasaction, how do i get the client pc's IP Address ?
Best regards,
Chee ken
|
|
|
|
|
hi by using ipconfig you can get that
try to use that as console application.....
c:\ ipconfig
you can get that
regards
srichand
|
|
|
|
|
That depends on your server. Either the client gets its own IP address and sends it in the log message or your server code will have to determine it, but how that's done depends on what type of server your writing. Is this a Remoting component, Web Service, TCP/IP sockets-based server, ...?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
what is is the method use for opening a file in vb.net?
madu
|
|
|
|
|
Open which file?
for text files ....
imports system.IO
file.open(.......)
KP
|
|
|
|
|
plz i want run file like winamp or mp3 file when action start
thnx
Ahmed El-Badry
|
|
|
|
|
Shell("C:\Program Files\Windows Media Player\wmplayer.exe e:\MSAJAX-ToDoList.wmv", AppWinStyle.MaximizedFocus, False)
|
|
|
|
|
thnx
Ahmed El-Badry
|
|
|
|
|
Hi,
I am new to vb dot net remoting i have some problem in that. The problem is i couldnt activate client exe over lan and its spitting some error(unhandled excpetion) while invoking that application. The activity of the client is to get some data (as dataset) from the database. But it work smoothly when there is not database connectivity.
But its working perfectly in the developed machine, which means both client and server are in the same machine. Can anyone guide me to rectify my problem? If i could get some sample code that will be usefull for me too.
Thanks
Karthi
sadsadfsasdfasdfadsfasdfasdfadsfasdf
|
|
|
|
|
I have created a program that lists all the processes running on the computer by using getprocesses then i have used a loop to list them all
For each process
Next
Then i have made it so that each process is listed in a listview object.
The problem i am having though is that i need to be able to use the process.kill method to exit the process that has been selected.
How would i do this?
If it is possible can you provide an example?
Could i use the process.mainmodule.filename(This just provides the filename/command line for the mainmodule of the program which is the process itself) then give the filename(From the process.mainmodule.filename) to process.startinfo.filename.
Then use the process.kill method, to exit the process?
Any help would be much appreciated
Thankyou!
A*****
|
|
|
|
|
you can use this API function:
Private Declare Function TerminateProcess Lib "kernel32" Alias "TerminateProcess" (ByVal hProcess As Integer, ByVal uExitCode As Integer) As Integer
for an example of what you want you can see this link:
Terminate a process immediately in VB.NET[^]
|
|
|
|
|
This should help. I'm using VS2005 so I hope this will be the same for you.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Get the processes with the name 'qryspree'
'You probably stored the process name in the listview so whatever item is selected
'will tell you the process name to get
Dim proc() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName("qryspree")
'Loop through processes found
'Note: Finding a process by name returns an array so the loop just
'ensures you kill each one with that name
For Each instance As System.Diagnostics.Process In proc
instance.Kill()
Next
End Sub
As another option you could store the process id's when you add them to the listview. The process object will tell you the ID. You could store the name with the id in a hashtable.
|
|
|
|