|
No, it is not. BTW: I'm developing a usual c# windows application.
|
|
|
|
|
|
That is already the default. Setting it to false also doesn't solve.
|
|
|
|
|
There is a chance that the AutoGK application is looking for some support file and cannot find it when started from a .NET app.
When started from explorer or from the command-line, it is able to find support files automatically. Explorer knows where to look for support files as an app is always configured with a startup directory.
Starting from a .NET app it may not know where it's home directory is (i.e., there maybe some Field that needs to be set to tell it where it's home directory is).
Just a thought.
|
|
|
|
|
Thank you all guys.
@Mike Bluett: You're right, that really helped me out. Setting the working directory for the process tells it where to look for the additional files. Thanks.
|
|
|
|
|
Does anyone know a way to list the components of a COM+ Application using C#? Specifically, I would like to be able to determine how many components in a specific COM+ package are active, how many are pooled, how many are in call, their call time, their ProgID and their CLSID.
I need to basically be able to programatically get at the information that is available in Component Services.
Thanks.
Jack
|
|
|
|
|
I have a program that I have written that saves encrypted files and text to an Access database. Everything is converted to a byte array and saved as an OLE object.
Number 1: Is there a maximum file size that can be saved to access using this method?
If not, is there a known issue with using Update statements to this kind of field? i can insert just fine, and even update works to a point, but after a while, i try updating a file and it doesnt work any more. Let me know if you need more details or code snippets.
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
Vodstok wrote: Number 1: Is there a maximum file size that can be saved to access using this method?
Yes, indirectly. An Access database can not be larger than 2 Gibibyte.
Vodstok wrote: i try updating a file and it doesnt work any more
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
Hi everyone.
I just need to know what the dos command is to send a file directly to a printer.
I can send a HTML file to the printer but this only prints out the tags and i want it to print out the whole look not just <?xml version"1.0" encoding "utf-8"?> and so on....
and the same with a pdf file, if i try to send it to the printer through cmd prompt it prints out the encoding not the actual look of the file...
How would i solve this. Cause i need to be able to send files directly to the printer. If any one has another idea please let me know. if there is a way to do it in C#, GREAT but if you know the way to do it through cmd prompt that would also help.
thank you in advance.
Oh ja... i use: "print Filename>LPT" to send the html file mentioned earlier directly to the printer. but as i mentioned it doesn't print i correctly.
I also need to know how to send a file to a certain printer on the network not allway the one connected to the users computer...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
-- modified at 10:46 Thursday 17th August, 2006
|
|
|
|
|
The DOS-level print command doesn't know anything about formatting codes such as the ones that exist in HTML (i.e., it treats every character as a printable character).
What you need is a console application that could be written in C# (or some other language) that interprets the formatting codes and uses them to format the document before it gets printed.
If you check through the Code Project tutorials or maybe sourceforge.net you might find that someone has already coded a command-line utility that does what you want.
|
|
|
|
|
Hi,
I need some help for my last year project which is a pan and tilt webcam controlled over internet using client/server application (csharp). Can someone tell me what do I need to interface 2 stepper
motors with the PC using a USB port? I searched on the internet and I found that I will require a microcontroller, right? Does C# has it's own USB library or do I need a DLL? I've already managed to control the motors through the parallel port, but since the parallel port is out of fashion I thought it might be more interesting using a USB connection. Any help is appreciated.
Thanks,
Clayton
|
|
|
|
|
PhidgetsUsa.com[^] has a USB version of what you're looking for, plus the USB interfacing and libraries to control it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
I want to connect to the multi-instanced sql server using C# which is on remote machine. Can anyone help me in this?
Thanks & Regrads
Abhijeet
|
|
|
|
|
In your connection string, specify the instance as part of the Data Source:
Data Source = \\pathToTheDatabase\mySqlServerInstance
For more information, see the SqlConnectionString docs[^]
|
|
|
|
|
If i have a string
[name]MyName[/name]
How do i extract just the MyName part?
|
|
|
|
|
You could transform the string by doing a Replace('[', '<') and Replace(']', '>') and use XML.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
string theString = "[name]MyName[/name]";
int indexOfStart = theString.IndexOf(']');
int indexOfEnding = theString.LastIndexOf('[');
string name = theString.SubString(indexOfStart, indexOfEnding-indexOfStart);
|
|
|
|
|
string s = "[name]MyName[/name]";
Regex re = new Regex(@"\[\w+\](\w+)\[\/\w+\]");
Match m = re.Match(s);
Console.WriteLine(m.Groups[1]);
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Hi all.
Does anyone know how I can refresh a folder (like App_References) in solution explorer using a macro?
This because I'd wrote a macro that refresh automatically all web references. But after this, the solution explorer don't show web service related files (.dico, .discomap, etc).
The macro:
[code]
Option Explicit On
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports System.Diagnostics
Imports System.IO
Imports VSLangProj
Imports System.net
Public Module Macros
Sub UpdateWebReferences()
Dim vswebsite As VsWebSite.VSWebSite
Dim vswebsiteRefs As New System.Collections.ArrayList
For i As Integer = 1 To DTE.Solution.Projects.Count
'MsgBox(Microsoft.VisualBasic.Information.TypeName(DTE.Solution.Projects.Item(i).Object))
'Change this with full web project path
If "C:\Projetos\Internos\SmartSeguro\Code\Seguro.Web\" = DTE.Solution.Projects.Item(i).Name Then
vswebsite = CType(DTE.Solution.Projects.Item(i).Object, VsWebSite.VSWebSite)
'vswebsite.p()
For j As Integer = 1 To vswebsite.WebReferences.Count
Dim webRef As VsWebSite.WebReference = vswebsite.WebReferences.Item(j)
Dim wsPath As String = Path.GetDirectoryName(webRef.ProjectItem.FileNames(0))
Dim item As New WebServiceItem
item.url = webRef.ServiceLocationUrl
item.nNameSpace = webRef.Namespace
item.dirPath = wsPath
item.serviceName = webRef.ServiceName
item.ReadWsdl()
Dim fs As New FileStream(wsPath + "\" & webRef.ServiceName & ".disco", FileMode.Open)
Dim teste() As Byte
ReDim teste(fs.Length - 1)
fs.Read(teste, 0, fs.Length)
fs.Close()
item.disco = New MemoryStream(teste)
fs = New FileStream(wsPath + "\" & webRef.ServiceName & ".discomap", FileMode.Open)
Dim teste2() As Byte
ReDim teste2(fs.Length - 1)
fs.Read(teste2, 0, fs.Length)
fs.Close()
item.discoMap = New MemoryStream(teste2)
vswebsiteRefs.Add(item)
webRef.Remove()
Directory.Delete(wsPath)
If vswebsite.WebReferences.Count = 0 Then
Exit For
End If
j = 0
Next
For j As Integer = 0 To vswebsiteRefs.Count - 1
Dim webRef As WebServiceItem = vswebsiteRefs(j)
Directory.CreateDirectory(webRef.dirPath)
Dim fs As New FileStream(webRef.dirPath + "\" + webRef.serviceName + ".disco", FileMode.Create)
fs.Write(webRef.disco.ToArray(), 0, webRef.disco.Length)
fs.Close()
fs = New FileStream(webRef.dirPath + "\" + webRef.serviceName + ".discomap", FileMode.Create)
fs.Write(webRef.discoMap.ToArray(), 0, webRef.discoMap.Length)
fs.Close()
fs = New FileStream(webRef.dirPath + "\" + webRef.serviceName + ".wsdl", FileMode.Create)
fs.Write(webRef.wsdl.ToArray(), 0, webRef.wsdl.Length)
fs.Close()
vswebsite.WebReferences.Add(webRef.url, webRef.nNameSpace)
Next
'Implementar: Refresh na pasta.
For j As Integer = 1 To vswebsite.Project.ProjectItems.Count
If vswebsite.Project.ProjectItems.Item(3).Name = "App_WebReferences" Then
End If
Next
Exit For
End If
Next
End Sub
End Module
Class WebServiceItem
Public url As String
Public nNameSpace As String
Public dirPath As String
Public serviceName As String
Public disco As New MemoryStream
Public discoMap As New MemoryStream
Public wsdl As New MemoryStream
Public Sub ReadWsdl()
Dim wr As HttpWebRequest = WebRequest.Create(url & "?WSDL")
Dim sr As New StreamReader(wr.GetResponse().GetResponseStream(), System.Text.Encoding.GetEncoding(1252))
Dim teste2 As String = sr.ReadToEnd()
sr.Close()
Dim teste() As Byte = System.Text.Encoding.ASCII.GetBytes(teste2)
wsdl.Write(teste, 0, teste.Length)
End Sub
End Class
[/code]
|
|
|
|
|
A cold start of my application takes about 15 seconds. Further startup takes only 1 seconds.
After a reboot other cold start takes less than 15 seconds, perhaps 3~4s.
I tried to improve cold start by NGEN everything in the installer.
Now I don't know if I make an error or something in the installer but my cold first start time didn't imporve (after I tested it).
Any ideas on what I could do to improve my 1st cold start?
|
|
|
|
|
If there are a lot of things loading in the constructor, you could try to postpone those to when the user actually needs them. Furthermore there are tricks like this.SuspendLayout(); and this.ResumeLayout(); that can help improve loading time a little.
Our app has the same problem and we 'solved' it with NGen and postponing loading the comboboxes. Still on older machines loading time takes some time.
hope this helps...
I've found a living worth working for, but I haven't found work worth living for.
<marquee>
|
|
|
|
|
Thanks the SuspsendLayout() trick.
Thanks to a link on the microsoft newsgroup (where I also asked the question) I realized that... I should take some time to read NGEN documentation....
Some one else, still on MS newsgoup, suggested that just like Office or Adobe, I could have a "QuickStart" application, clever hey!
|
|
|
|
|
Super Lloyd wrote: Some one else, still on MS newsgoup, suggested that just like Office or Adobe, I could have a "QuickStart" application, clever hey!
If you do, give the user a choice about it at install time, and an easy way to change thier mind. I despise having to remove unwanted crap that starts itself everytime I boot my PC.
|
|
|
|
|
Of course!
|
|
|
|
|
how can use COM interop to communicate with Word
i want example to make search in word file ....
Palestine
|
|
|
|