|
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.
|
|
|
|
|
I had another idea. Why not store the ID as a subitem in the listview. Here is an example.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListView1.View = View.Details
ListView1.Columns.Add("Process", 150)
ListView1.Columns.Add("ID", 75)
'---Popullate listview1 with running processes
For Each proc As System.Diagnostics.Process In System.Diagnostics.Process.GetProcesses
'Add ProcessName with a subitem as the ID
ListView1.Items.Add(proc.ProcessName).SubItems.Add(proc.Id)
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For Each item As ListViewItem In ListView1.SelectedItems
MsgBox(item.SubItems(1).text)
Next
End Sub
End Class
|
|
|
|
|
Could anyone supply me a code in VB.net to read the data of a barcode scanner via a serial port.
Thanks for helping!
|
|
|
|
|
VB.NET 2005 does have a class for reading the serial port, I think, but the most likely solution will be a driver that comes with the barcode scanner.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
It is the same as any serial device typically the drivers are only for a USB serial that emulates a keyboard wedge or rs232. The microsoft sample code will work. Just read bytes on the datarecieved event and look for the end of string; it is typically setup in the reader as CR. Good luck!
|
|
|
|
|
how can i read the header file in vb.net2005
i need to read the avi header file
|
|
|
|
|
|
Thank you very much but is it in vb.net?
how can i import it's dll into vb.net?
|
|
|
|
|
I have sample form with 2 buttons one is Play Movie and other is Exit when i click on button Play Movie it starts up windows media player and plays a movie and when i press exit it exits a application. So what i need is that it can be run without Framework is this possible or i have to install Visual Basic 6 again? Please answer... Thanks
|
|
|
|