Hello everyone, I have the following problem, it happens that I have a form with a panel where I execute with a button, an external application and it opens inside the panel, but it happens when it is executed, it stays on one side and I want this to run in the center of the panel without using maximize, or being able to move it use this SetWindowPos(hwnd2, 0, 260, 92, 0, 0, 1) but it does not move when inside the panel but if it is outside it moves without problem
Benjamindh
Posts
-
move window in panel -
help edit config filehello everyone I have the following format of a configuration file so I want to edit these values, the file has the following extension data.config format Image — Postimages[^] Form Image — Postimages[^]
-
search for specific word in a text filehello everyone how are you, as always asking for your great help that you have given me, it happens that I have a text document, where I can look for information in a text file, if it finds it, assign that value found in a variable to me format of the text that I have is this, the text document contains several names Example Text file aof.zip:Art Of Fighting / Ryuuko no Ken Search: aof.zip once finder save in a variable the name that is after the : Show: Art Of Fighting / Ryuuko no Ken
-
close app without having form in foregroundThank you for the time you dedicated, but I already solved the problem that it presented
-
close app without having form in foregroundI tell you I have a program for online connection, it runs the MAME emulator online, 3 instances open, one the main menu, the second the KAILLERA and the third the game window already executed, then when you press the ESC key the game window will close but it remains it still activates the MAME main menu window but if I go to the main form and press the ESC key it completely closes the emulator
-
close app without having form in foregroundhello, I see your message I was a bit sick, it happens that the code I have works but as long as I don't have the form in the foreground it doesn't close the program that I want to close, to close the program I always have to have the form in the foreground and that's it I don't want
-
close app without having form in foregroundNotepad is an example, the name of the application is called Inventory, the one I want to close
-
close app without having form in foregroundhello everyone, I have the following problem, it happens that I want to close an example application: Notepad, but the code only works for me if I have the form in the foreground if it is minized, do not close the application, I want to close the application no matter what window I am using , this is my code.
If e.KeyCode = Keys.Escape Then
KilleInventory()
End IfPrivate Sub KilleInventory()
Dim processesByName() As Process = Process.GetProcessesByName("Inventory")
Dim array() As Process = processesByName
For Each process As Process In array
process.Kill()
Next process
End Sub -
remove item without being selected only with the nameHello everyone, I comment I have the following problem. It happens that I have this code where the information sent from a TCP is added, but I can't find a way to make it so that if a user leaves the application, it is removed from the listviem without having to be selected. only with the username that is in column 1
Protected Sub ActualizarTextoMensaje(ByVal sender As Object, ByVal e As System.EventArgs)
Dim HHusuario As String = "config\usuario.txt"
Dim Usuario As String
Usuario = System.IO.File.ReadAllText(HHusuario)
Dim line As String = ContenidoMensaje
Dim parts() As String = line.Split("|"c)
'ahora decodifico los bytes y los paso a el ListView
Dim item As New ListViewItem()
item.Text = parts(0)
If item.Text = Usuario Then
LNetgames.Items.Remove(item)
Else
For i As Integer = 1 To parts.Length - 1
item.SubItems.Add(parts(i))
Next
LNetgames.Items.Add(item)
End IfEnd Sub
-
help send data to new connected userHello everyone, I have the following code that works perfectly without problems When sending the data throughout the network, but I have a problem that I cannot solve And it happens that When a client executes the program, it does Not receive the data from the other clients that are are connected only receives the data When New data Is sent.
Example someone connects And In the listview the information that the other users sent Is loaded because they are online, but If another connects they cannot see that information, what I want To Do Is To wait If a client connects again this I send you the information that Is In the listview
#Region "Variables"
'Object variable containing the socket
Dim ElSocket As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)'Variable that contains the thread in charge of receiving the data Dim HiloRecibir As Thread 'Variable that indicates whether the program is closing Dim Saliendo As Boolean = False 'Temporary variables to store received data Dim DireccIP As String, ContenidoMensaje As String
#End Region
'WE RECEIVE THE SUBMITTED DATA Private Sub RecibirDatos() 'As long as the output indicator is not true Do Until Saliendo 'Variable to get the IP of the sender machine Dim LaIPRemota As New IPEndPoint(IPAddress.Any, 0) 'Variable to store ip temporarily Dim IPRecibida As EndPoint = CType(LaIPRemota, EndPoint) Dim RecibirBytes(255) As Byte 'Buffer Dim Datos As String = "" 'Text a Show Try 'Receive the data ElSocket.ReceiveFrom(RecibirBytes, RecibirBytes.Length, SocketFlags.None, IPRecibida) 'converts them and saves it in the data variable Datos = Encoding.Default.GetString(RecibirBytes) Catch ex As SocketException If ex.ErrorCode = 10040 Then ' data too long Datos &= "\[truncado\]" 'add the string "\[truncated\]" to the received text Else 'displays the error message
MsgBox("Error '" & ex.ErrorCode.ToString & "' " & ex.Message, MsgBoxStyle.Critical, " Error receiving data ")
End If
End Try'converts the endpoint type to ipendpoint with its respective variables LaIPRemota = CType(IPRecibida, IPEndP
-
Help add data received from a TCP in each Columnsthank you very much it helped me thank you for your help
-
Help add data received from a TCP in each ColumnsHello everyone, I have the following problem. It happens that I sent some data through TCP and I receive it, but it happens that this data is all added in a single column.
Public Function Rutina()
Do
If Ejecuto = True Then
Exit Do
End If
'check if tcp has pending connections
If TCP.Pending = True Then
'If it has Pending, I assign it to the client of the server that will listen
TCPSERVERCLI.Client = TCP.AcceptSocket
End If
If TCPSERVERCLI.Connected = True Then
'Indicates that there is data pending collection
If TCPSERVERCLI.Available > 0 Then
Dim DataBytes(1000) As Byte
'Now the decoder
Dim decode As New ASCIIEncoding
TCPSERVERCLI.Client.Receive(DataBytes)
'now I decode the bytes and pass them to the ListView
Me.LNetgames.Items.Add(decode.GetString(DataBytes))
End If
End If
Loop
End Function