|
How can i take screen shots of client from server using .net
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
You'll have to have a client application running, obviously on the client machine, that takes the screen shot and sends it to the server. You can't grab a screen shot using only server-side code.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
dear friends
I have 6 to 7 windows froms and all the forms have their connection string. I want that all the form should use single connection. so i created a public connection but when i assign the connection to the in the automatically generated code
Me.OleDbDeleteCommand3.Connection = public_connection
it shows an error
what should i do to solve the error
please help
Taher
|
|
|
|
|
could you provide how you create the (public_connection) ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Public connect As New OleDbConnection()
connect.ConnectionString="connection String"
this i have created in the module
|
|
|
|
|
did you call the method that call the above code in the module!!
then are you sure that your connection String is valid one ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
In the module
Public connect As New OleDbConnection<br />
<br />
Public Sub connection_string()<br />
connect.Connectionstring="Provider=SQLOLEDB.1;Password=xyz;User ID=sa;Initial Catalog=inventory;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False"<br />
End Sub
then on the startup form
Public Sub New()<br />
MyBase.New()<br />
connection_string()<br />
'This call is required by the Windows Form Designer.<br />
InitializeComponent()<br />
<br />
'Add any initialization after the InitializeComponent() call<br />
<br />
End Sub
this way the string is assigned to the connection
Taher
|
|
|
|
|
Dear,
Its better to create a common connection class with Connection defined
along with Dateset , Adapter,
So that its better managed .
Thuogh i didn't understood your connection and forms layout and requirement
I thing to remenber In .NET that ADO.NET uses Dissconnected Architecture.
Hope to help,Though this may not be exact , but you can getback to me for any help related
Regard,
Navneet Hegde
navneethegde@yahoo.co.in
navneethegde@gmail.com
navneet.hegde@procit.com
Thanks,
Develop2Program & Program2Develop
|
|
|
|
|
TIP: Share the connection STRING, but not the connection object. The connection will be pooled so opening and closing a connection has no performance impact.
When running a query the following is generally regarded as best practice: Aquire connection, perform query, release connection. Keeping the bit between aquiring the connection and releasing it again as short as possible.
|
|
|
|
|
Having initially a diseabled main menu,
how can i enable this menu when the user loggon?
and diseable it when the user logout?
other then using
me.item1.enable=true
me.item2.enable=true
is there a way like :
for each item in menu
item.enable=true??
regards?
Regards
Ramy
|
|
|
|
|
I assume you've added a MenuStrip to your form? You can disable the whole menu by setting it's enabled property to false and enable it by setting that property to true. You don't need to do on an item by item basis, unless I'm not understanding you correctly.
|
|
|
|
|
yes i have used a menustrip
what i want when theu user Log enable the menu
when he logout ,disbale the menu
Regards
Ramy
|
|
|
|
|
Then my previous advice should work. Just use MenuStrip1.Enabled = False and MenuStrip1.Enabled = True.
|
|
|
|
|
but what u suggest
MenuStrip1.Enabled = False
enable and diseable all the menu ,means enables the login menu also//
so how the user will logon
Regards
Ramy
|
|
|
|
|
You stated you wanted to disable/enable the main menu. This to me meant the whole menu. To individually set items you can create a loop that iterates through each item and disable/enables it.
'Option #1
With MenuStrip1
'Disable each menu item
For i As Integer = 0 To .Items.Count - 1
.Items(i).Enabled = False
Next
'Enable the one(s) we want by index
.Items(0).Enabled = True
End With
'Option #2
'Disable each menu item
For Each item As ToolStripItem In MenuStrip1.Items
item.Enabled = False
Next
'Enable by using it's name
MenuStrip1.Items("FileToolStripMenuItem").Enabled = True
Enabling the items would just be a simple change
|
|
|
|
|
dear friends
when create a sql connection this code is automatically generated
Me.OleDbConnection1.ConnectionString="Provider=SQLOLEDB.1;Password=xyz;Persist Security Info=True;User ID=sa;Initial Catalog=try;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False"
but my application gets the code from the external file, reads the string n generates the connectionstring. So I want to use my custom connection string in the application. so when i assign as
Me.OleDbConnection1.ConnectionString=customstring
it gives me an initialization error.what should i do please help me.
Taher
|
|
|
|
|
hi
i've got my app that i now need to consider making multiuser environment. i guess my question is what exactly do i need to look at when working this out.. is it as simple as just setting mode type to for example :SHARE DENY NONE etc.
any advice and material would be appreciated. My DB is Access 2003..
thanks
Robbo
|
|
|
|
|
Try searching on "optimistic locking" and "concurrency". .NET provides a bunch of support for this.
Regards
Andy
|
|
|
|
|
Hello all,
I have heard rumors that there is logic or an algorithm that will analyze a live video stream through software and will give a numeric value for the focus. I am looking for a way to calibrate/focus CCTV cameras through a custom piece of software. If this type of algorithm exists, it would allow me to get the tighest focus possible (by using the software and numeric value) rather than trusting what looks good to my eyes.
If you know of something or find something, let me know also if it work with either BNC video out or with the IP based cameras. Most of the cameras I use are IP based (which also happen to be motion jpeg or mjpeg instead of true video stream) so I am sure that will affect things.
All I have found is people talking about this for thier telescopes/astronomy.
Thanks for your help!!!
Mike
|
|
|
|
|
"Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"
Do you know why this is hapenning? And also is there any other way to read the Word Doc Files....Pls some one help me
Private Sub ListBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox3.SelectedIndexChanged
Dim Nothingobj As Object = System.Reflection.Missing.Value
'Dim wordApp As WordApplicationClass = New Word.ApplicationClass
'Dim Nothingobj As Object
'Dim stream As StreamReader
Dim myFile As System.IO.FileInfo
'Dim i As String
'Dim fs As FileStream
'Dim filepath As String
' Dim doc As Microsoft.Office.Interop.Word.Document
myFileName = ListBox3.SelectedItem.ToString
myFile = New System.IO.FileInfo(fileName:=myFileName) 'fileInfo
Dim WordApp As Microsoft.Office.Interop.Word.ApplicationClass = New Microsoft.Office.Interop.Word.ApplicationClass
Dim file As Object = myFile
Dim nullobj As Object = System.Reflection.Missing.Value
Dim doc As Microsoft.Office.Interop.Word.Document = WordApp.Documents.Open(file, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj)
doc.ActiveWindow.Selection.WholeStory()
doc.ActiveWindow.Selection.Copy()
Dim data As IDataObject = Clipboard.GetDataObject
Dim text As String = data.GetData(DataFormats.Text).ToString
doc.Close(nullobj, nullobj, nullobj)
WordApp.Quit(nullobj, nullobj, nullobj)
text = RichTextBox1.Text
Thanks
|
|
|
|
|
If this is using COM, Microsoft do have a .NET framework for working with Office in .NET.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yes i've used the Com component.so pls how do solve this problems..pls....pls....
somasundaram G
Thanks
|
|
|
|
|
Start with what I said. There's a .NET Office library from MS, you can try to use that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I've used MSoffice library also. But displaying the Error is :
But fileName path is Perfectly correct.....
Error is follow...
ComException Not handled....
"This file could not be found.
Try one or more of the following:
* Check the spelling of the name of the document.
* Try a different file name.
(Prem-Java-Chennai-3-Prem@pnbsoftware.com.doc)"
Thanks
|
|
|
|
|
I have a rich text box and I would like to replace a line of text e.g. "4443334" with ("SSS"+ RTB.text + "people") how would you do that?
Also, I have a button save called "SaveRTF" how would you get it to save the contents of the Rich text box "WebRTF" as a HTML file?
In the end we're all just the same
|
|
|
|