|
Could you mark my answer as accepted so I can get credit for it? Thanks!
|
|
|
|
|
I just tried it out and put the name of the computer for server, WORKGROUP for the domain, since we are on a workgroup, me for username, and me for password. When I ran it, it didn't do anything. any suggestions greatly appreciated. also, how do I "accept" an answer? im kind of new here. Thanks
I was able to get a remote desktop app that you can control the users computer, but the screen is all sideways and messed up, is there a way to fix that? It is using the AXrdpViewer. also, is there a way to make it to where I can disable being able to control the computer? I have tried putting a form over it, but that didn't work
Here is the code for the client:
Imports RDPCOMAPILib
Imports System.Net.Sockets
Public Class Form1
Dim x As New RDPSession
Dim clientSocket As New System.Net.Sockets.TcpClient()
Dim serverStream As NetworkStream
Dim readData As String
Dim infiniteCounter As Integer
Dim a As String
Dim b As String
Dim drag As Boolean
Dim mousex As Integer
Dim mousey As Integer
Private Sub Incoming(ByVal Guest As Object)
Dim MyGuest As IRDPSRAPIAttendee = Guest
MyGuest.ControlLevel = CTRL_LEVEL.CTRL_LEVEL_INTERACTIVE
End Sub
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim strHostName As String
strHostName = System.Net.Dns.GetHostName()
a = System.Net.Dns.GetHostByName(strHostName).AddressList(0).ToString()
b =
readData = "Conected to Chat Server ..."
clientSocket.Connect("IP ADDRESS", 8888)
serverStream = clientSocket.GetStream()
Dim outStream As Byte() = _
System.Text.Encoding.ASCII.GetBytes(b + "$")
serverStream.Write(outStream, 0, outStream.Length)
serverStream.Flush()
AddHandler x.OnAttendeeConnected, AddressOf Incoming
x.Open()
Dim Invitation As IRDPSRAPIInvitation = x.Invitations.CreateInvitation("Trial", "MyGroup", "", 10)
outStream = System.Text.Encoding.ASCII.GetBytes("V" + "$")
serverStream.Write(outStream, 0, outStream.Length)
outStream = System.Text.Encoding.ASCII.GetBytes("V" + Invitation.ConnectionString + "$")
serverStream.Write(outStream, 0, outStream.Length)
End Sub
End Class
Here's is the code for the Viewer:
Imports System.Net.Sockets
Public Class Form1
Dim clientSocket As New System.Net.Sockets.TcpClient()
Dim serverStream As NetworkStream
Dim readData As String
Dim infiniteCounter As Integer
Dim a As String
Dim b As String
Dim drag As Boolean
Dim mousex As Integer
Dim mousey As Integer
Dim Invitation
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.TopMost = True
TextBox1.Text = Invitation
If TextBox1.Text.StartsWith("USERNAME says : V") Then
TextBox1.Text = TextBox1.Text.Remove(0, 12)
ElseIf TextBox1.Text.StartsWith("USERNAME says : V") Then
TextBox1.Text = TextBox1.Text.Remove(0, 13)
End If
AxRDPViewer1.Connect(TextBox1.Text, "User1", "")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
AxRDPViewer1.Disconnect()
End Sub
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Form2.Visible = True
Form2.TopMost = True
Dim strHostName As String
strHostName = System.Net.Dns.GetHostName()
a = System.Net.Dns.GetHostByName(strHostName).AddressList(0).ToString()
b =
readData = "Conected to Chat Server ..."
msg()
clientSocket.Connect("IP ADDRESS", 8888)
serverStream = clientSocket.GetStream()
Dim outStream As Byte() = _
System.Text.Encoding.ASCII.GetBytes(b + "$")
serverStream.Write(outStream, 0, outStream.Length)
serverStream.Flush()
Dim ctThread As Threading.Thread = New Threading.Thread(AddressOf getMessage)
ctThread.Start()
End Sub
Private Sub msg()
If Me.InvokeRequired Then
Me.Invoke(New MethodInvoker(AddressOf msg))
Else
invitation = readData
End If
End Sub
Private Sub getMessage()
For infiniteCounter = 1 To 2
infiniteCounter = 1
serverStream = clientSocket.GetStream()
Dim buffSize As Integer
Dim inStream(10024) As Byte
buffSize = clientSocket.ReceiveBufferSize
serverStream.Read(inStream, 0, buffSize)
Dim returndata As String = _
System.Text.Encoding.ASCII.GetString(inStream)
readData = "" + returndata
msg()
Next
End Sub
End Class
On the client side, when it is opened, it send a chat message with the "Invitation" to the chat server. The remote viewer takes that message and puts it as the invitation to connect. .
Any help appreciated. IF there is no way to change this, then I will live with it...
modified 20-Apr-12 12:31pm.
|
|
|
|
|
Hello !
i'm working on a project vb.net/sql server 2008r2.
i have a document model on .docx or pdf document.This document is formatted , has borders , logo , some grafic elements ...etc , but i want to put some information from my database in some specific position of the document.
( i try first to import this on a crystal report but the document resolution after the import is very low)
is possible from vb.net to get data from database and to populate the .doc or pdf document ?
Thank you.
|
|
|
|
|
Sounds like instead of creating a new word document, you want to insert data into your already formatted document.
The easiest method I can think of would be an automated mail merge routine drawing data from a data source such as an excel spreadsheet which could contain the insertion field data you require for the word document.
Getting the data from a database to an excel spreadsheet is also easy using vb.net. Just create your array holding what data you need, then to export to excel call a routine such as "WriteSpreadsheetFromArray(MyArrayName)"
You will find the source code for the above function (WriteSpreadsheetFromArray) at http://www.vbforums.com/showthread.php?t=455162
Hope this helps you.
|
|
|
|
|
thank you !
But i want to put data on word document not excel.
Can you explain more clearly how can i do ?
Thank you!
|
|
|
|
|
Hi Alejx,
In your initial post you suggest your word document is already formatted with borders, logo and graphics and you wanted to place certain data in specific positions on the word document.
The easiest way to do this is using a mail merge routine. Almost every business office environment uses this method to product multiple word documents. The excel spreadsheet being also a Microsoft product is the ideal platform to hold the data you wish placed on the word document.
To understand this more fully, I suggest you google microsoft mail merge routines, but basically you get your already formatted word document and creat insertion points where you wish the data to go, then run the rountine which will cycle though the data on the excel spreadsheet and create your identical word documents with the data positioned where you wanted.
Is this clearer to you?
|
|
|
|
|
You can use the Interop.Word [^] namespace to create word documents, and something like iTextSharp[^] for PDF.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
i see there is 800x480 and other resolution in WP smartphone.
in visual studio, everytime i create an WP application, i get the same size WP form.
if i create an application based on that size, am i going to have problem with other WP smartphone with different screen resolution?
Thanks before.
|
|
|
|
|
I really need to find a way like dll or somthing to have a tab control with closing option like what happening in chrome..
plz plz someone help me ...!
|
|
|
|
|
I think this Code Project article may be helpful.
A Visual Studio 2005-like Interface[^]
There is no closing option in each Tab but there is a closing button at far right to close the active Tab .
|
|
|
|
|
You could have a context menu show when you right click that has close and then use that. Or, if you were advanced you could have the program draw the x bye the last tab.
Hope this helps
|
|
|
|
|
Can it posible bmp color image convert black and white for reduce byte (500 kb convert 50 kb) which stored in sql server?
|
|
|
|
|
Yes, that's possible. You can also store it as a jpg, making it just as small and keeping all those wonderful colors.
Bastard Programmer from Hell
|
|
|
|
|
hi guys,
i've installed windows phone SDK and i don't understand why it only give me Windows Phone OS 7 and OS 7.1 since there is 7.5, is that SDK OS or WP OS?
and is it possible to write WP application using VB.NET?
which one better for WP, C# or VB.NET?
thanks before,
|
|
|
|
|
Because the current version of the SDK supports 7.1 and it supports WP 7.5.
As for language choice, neither language is better than the other. It's just a matter of preference.
|
|
|
|
|
XNA Game Studio 4.0 >> Windows Phone Game (4.0)
should i code all of the game?
i don't see any object oriented there.
if that true then writing game must be so hard.
can you give me link to learn how to create game?
thankyou for always helping me.
|
|
|
|
|
Alpherattz wrote: should i code all of the game?
Huh? How else would a game get written?
Alpherattz wrote: i don't see any object oriented there.
It's all over the place. You can't avoid it in .NET and XNA.
Alpherattz wrote: can you give me link to learn how to create game?
All kinds of tutorials[^]
|
|
|
|
|
wow, i don't even know how to put image to the display if it's not object oriented.
thank you so much, i will try first.
modify*
btw, should i pay $99 to enable me to put my application into marketplace?
i heard some people said so in forums.
modified 12-Apr-12 22:37pm.
|
|
|
|
|
Hi,
I have an Access Data table with three fields (date, tippingB, and precip). I am using dataGridView to view this table and make changes. The third field in the table (precip) is dependent on second field (tippingB). I was wondering if there is a way to use a formula in the field so that when I put a number in the second field, third field automatically gets updated. The last step of the code is updating the access table in the access database (that works so far).
So, my question is if one could use a formula for a column in a dataGridView and also bind it to the dataTable so that when update command is used, the database gets updated.
Thanks,
Amanjot
|
|
|
|
|
The DGV is not Excel. There are no formula you can put into a cell.
Your code has to handle the CellValueChanged[^] event. You can then get the row and cell that changed from the event args, do your calculation and update the appropriate cell.
|
|
|
|
|
The answer given by Dave Kreskowiak is absolutely correct.
An alternative is to use Expression property of precip DataColumn object to calculate the value based on the value of the tippingB DataColumn as explained here
DataColumn.Expression Property[^]
After binding the DataTable to the DataGridView the calculated value in the precip column will be displayed in the DataGridView.
|
|
|
|
|
Whets the best way to…
Hi all
I have been tasked with creating an application that generates a flat-file in which the content changes depending on the users input; I.e. different record lengths and other flags and headers, etc.
Now my question is what is the best way to present this to the user filling in the front end? For example, I could use a dynamic run-time generated form or create a plug-in architecture or create different exe to do each job.
This application should ideally be easy to operate and easy to generate new templates so it can be maintained if I should move on.
Example Output:
Runtime]
Date=
Time=22:00:00
AllowErrors=FALSE
[Task.1]
Server=Employee
Module=Employee
Operation=AddUpdate
;======================================================================
;NB - STS CODE: Pending = 1, Active = 2, Terminated = 3, Inactive = 4
; Suspended = 5, Deleted = 6
; TERM_DATE: Format as YYYY-MM-DD
;See NL_Employee.doc for information on field formats and descriptions.
;======================================================================
[Data.1]
Employee,[EMPLOYEE_NO],[STORE_NO],,,,,,,,[STS_CODE],,,,,,,,,,,2099-01-01,,,,,,,,,,,,,,,,,,,,,,,,,
**END EXAMPLE**
NB These files can become quite complicated with multiple [TASK.X] and [DATA.X] sections
Any help with picking the best solution would be appreciated.
In addition, I class myself as a novice / intermediate VB programmer
Language Used: VB 2011 Express
Thanks
|
|
|
|
|
Instead of a form generated at runtime, I'd suggest a simple (data)grid. You could use plugins to parse different types of files, that would indeed make it a bit more flexible.
Bastard Programmer from Hell
|
|
|
|
|
Interesting thought however, the file also contains a [Runtime] section as well as (possible multiple) [Task.1] and [Data.1] sections (which contain different data and tags depending on the job). If the file was just a CSV file then it would be easy to implement your idea however, in light of the extra data in the file; im not sure how this would work.
Thanks for your input.
|
|
|
|
|
Badg3r1977 wrote: im not sure how this would work.
You could create a plugin to parse a section; load all plugins at startup, read a section, switch to the plugin that knows how to read/parse that section, and move on to the next one (until you run out of sections).
It'll probably take some experimenting to get it right, but it would allow you to create new plugins when sections change or get added. It should also make it easier to maintain the code in the long-run; you could write even test-scripts for each plugin/section.
Bastard Programmer from Hell
|
|
|
|
|