|
Run time errors? You mean exceptions?
Can you paste the exception information here? (Log the exception using Exception.ToString in a try-catch block)
Bastard Programmer from Hell
|
|
|
|
|
It is giving AUTOMATION ERRORS AND CAN NOT CREATE OBJECT.
It is class code
Public Sub mdlShow(accesstype As String,cmd As String)
Dim frm As FormMain
Set frm = New FormMain
frm.Show vbModal
End Sub
in form
public sub form_load()
return=checking()
if return=0 then
'HERE I NEED TO STOP THE PROGRAM EXECUTION WITHOUT SHOWING FORM BUT IT IS NOT POSSIBLE WITH EXIT SUB AND FORM1.HIDE UNLOAD ME END IS NOT WOKING
End Sub
PLEASE HELP SIR
|
|
|
|
|
How about doing the check before you actually create a form?
Public Sub mdlShow(accesstype As String,cmd As String)
return=checking()
if return<>0 then
Dim frm As New FormMain
frm.Show vbModal
end if
End Sub
in form
Also note that using all-caps gives the impression of SHOUTING.
Bastard Programmer from Hell
|
|
|
|
|
Hi,
I have searched all over the internet trying to find a remote desktop app. I found one that uses an activeX control, but the screen in all sideways and wierd. any help would be greatly appreciated
|
|
|
|
|
Help with what? And what does this have to do with VB.NET??
|
|
|
|
|
I would like to make a remote desktop connection app in vb.net. Sorry for not being clear.
|
|
|
|
|
|
Thanks. What would the server, domain, username, and password be?
Thanks again.
|
|
|
|
|
"Server" would be the address of the computer you want to connect to.
"Domain" would be the domain of the user (this would be the computer you are connecting to, if you want to use a local user).
"Username" would be the username you wish to connect as.
"Password" would be the password of the user that you wish to connect as.
Hope this helps. Without knowing the exact details of your situation, I can't give you exact values, but this should be enough to get you going. If you have ever used Windows' built-in RDC client, these should be familiar.
|
|
|
|
|
Thanks Very Much. I will try it out as soon as I get time.
|
|
|
|
|
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.
|
|
|
|