|
How do I communicate with a USB device.... in my C# code to read data.
Its a USB Radio Receiver WiNRADiO WR-G303e ...
It gives digitized RF signal.. which i have to read and display as a graph.
All this is to be done in Real time. I mean it will be continuous streaming
|
|
|
|
|
|
Does anyone have an example of how to read the Height and Width of a JPG file using .NET and c# BUT without loading the image into memory?
I have seen examples in C++ but have failed to translate the code. I know I need to read the binary file stream and look for the headers but have still got problems doing this.
Any help would be much appreciated.
Regards
Richard
|
|
|
|
|
Hi all, i have to put all my assemblyes into a subdirectory of my projects, it is possible for my program to call the assemblyes that i use into a different location than the root of my project?
Thanks all
|
|
|
|
|
peppepinna wrote: it is possible for my program to call the assemblyes that i use into a different location than the root of my project?
Yes. it's possible.
Try this code:
<br />
Assembly asm = Assembly.LoadFrom(filename);<br />
Type[] types = new Type[0];<br />
types = asm.GetTypes();<br />
<br />
foreach (Type t in types)<br />
{<br />
if (t.FullName == "SomeType")<br />
{<br />
object obj = Activator.CreateInstance(t);<br />
}<br />
}<br />
|
|
|
|
|
Hi there.
I am wondering how does one use another application in an application that one is writing.
Let´s say I am writing a program, A, and when a button is clicked it needs the functionality of another program, B. How does one go about making program A use program B when needed.
Any help is greatly appreciated and short examples even more appreciated.
Thanks,
F
|
|
|
|
|
It really depends on what you are trying to do. Here are two possible solutions:
- Break the needed features into a component library that both applications can share. If this is possible, this is preferable.
- Another approach might be to spawn a new process to run the application, but communication between the two applications is some what limited.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsProcessClassTopic.asp
Beyond those general (and very different) approaches I'd need more information about what your trying todo.
Hope this helps
Marc L
|
|
|
|
|
Thanks for your answer.
When the user presses a button several things need to happen one of which is using a program (I have that one) that converts a .tiff file to a .pdf file and stores it in a folder of the users choosing (I had a TreeView in mind to let the user select a directory).
Also, can you elaborate a little on the two solutions you suggested?
Many thanks,
F
|
|
|
|
|
Sure, the different approaches are based on whether the .tiff to .pdf converter program can be used inside your application or do you need to 'run' the other application.
1)Ideally what you want is the .tiff to .pdf conversion to be done by an object in your application.
So if you can create/add a reference in your project to the converter program, what do you get? If the reference is created you can browse the exposed objects. Right click on the reference (in the solution explorer) to bring up the object browser (Visual Studio 2003). Then you have the task of understanding what objects to use and what they'll do for you. (Hopefully there's documentation)
2) If the other application can't be used as a reference then you will need to 'run' it outside your application. Use the link from the previous post to review how you can write code to run the application in a new process.
Hopefully the converter program takes commandline input that can be set in the StartInfo.Arguements property.
Hope that helps
Marc L
|
|
|
|
|
Hi,
I have a question about config files. I have the following in my application..
1. ASP.NET web application with a web.config
2. C# class library (BL and DAL) with an App.config
3. Two windows Console Applications with their own App.Config.
Now I try to retrieve a value in the DAL using this code.
<pre>
string str = ConfigurationSettings.AppSettings.Get("Value");
</pre>
This code works fine when the windows applications are running. But when the Webapplication is running and invokes an method in the Data Access layer, the piece of code tries to refer to the Web.Config instead of its own app.config even though it is in the DAL. Is there any code that will tell DAL to refer to its own config file?
Can anyone tell me if I can do what i trying to do and if yes what changes do I need to make to my code for it to work?.
I do need the app.config at the DAL level as there are some settings common to both the windows as well as web application and that is the best place to put it.
Help Please,
Thanks Kalyan
|
|
|
|
|
You need to add everything to the web.config, unless the DAL perhaps looks in some other place, like Gentle.NET does.
|
|
|
|
|
Hi I am not quite sure what you mean by Gentle.net. I will be more specific if that helps.
Example: The sql server path is stored in the app.config of the DAL. It needs to be there because both the webapplication and the windows console application needs access to the DB. But when the webapplication runs the DAL ignores its own app.config and looks in the web.config thus breaking my code.
I am assuming the web.config overrides anyother config files in the projects or assemblies the webapplication references. I need to know how to configure that or where do i put my common stuff.
Thanks.
|
|
|
|
|
How to determine have AxWebBrowser current selection or no?
I need in this for popup menu.
|
|
|
|
|
I have created a c# project using microsoft visual .net. I am trying to change an image on a page, so when the user clicks a button the image changes depending on the outcome and the same happens when the user types in a textbox. What code can I use to do this????
Thanks
|
|
|
|
|
With the button is the Click event and with the textbox use the OnTextChanged event.
|
|
|
|
|
Hi All
This is probably a really easy question!!
I have a C# web service, when its up and running either in debug mode or it has been released.
Is there any way to set the order of the web methods. My methods seem to be randomly ordered
In my code i have something like
...
[WebMethod]
public DataSet WebA(int MyInt)
{
etc
}
[WebMethod]
public DataSet WebB(int MyInt)
{
etc
}
[WebMethod]
public DataSet WebC(int MyInt)
{
etc
}
however when it is hosted and running all the hyperlinks seem in a random order
Like
WebC
WebA
WebB
Any ideas
Si
|
|
|
|
|
|
thanks
|
|
|
|
|
I am working on a Data Grid View control that stores values of a matrix. The values can only be integers or floating point values. I have two problems:
1. How can I retrieve values from the DataGridView Control and store it in a double 2D array. Please tell me the approperiate method.
2. Can I bind the DataGridView Control to a specific data type, e.g. double, so that automatic validation can be done on the values entered.
Thanks
Naveed
-- modified at 15:40 Tuesday 4th April, 2006
|
|
|
|
|
Is there any way to get the ip address of my router programatically, either in a windows application or web application? If any one have ideas please help me.Thanks in advance.
|
|
|
|
|
Routers and switches generally respond to a local broadcast. Send a local broadcast and listen for the responses.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Please don't write everyting using bold. When using it too much it only gets annoying.
If you can get any network settings, look for the gateway address. That is the address of your router.
---
b { font-weight: normal; }
|
|
|
|
|
Hi ALL,
I'm using C# application which has compiled help file .chm. i want to display this when Help Button is clicked. It's working fine when I run the application, but once the project is deployed and Installed using installer it's unable to find the .chm file. It seems to be the path problem.
Does anyone have any idea how to do this?
Warm Regards
Abhijeet Ballal
|
|
|
|
|
Hello Abhijeet
Your description of the problem is perhaps not complete. Are you devleoping a Web or a Windows Application, what method are you using to display and load the .chm file? Assuming that you are working on a Windows application and you are using the Helpprovider extender provider to load the display the .chm file, in the design mode, you have to specify then name of the chm file which you want to load when the user presses the F1 button in the 'HelpNamespce' property of the extender provider. There is a browse button against that property which allows you to specify the path of your chm file. If you use the browse button, it hard codes the physical file of the path in that property, so that when you run the application from the VS IDE, it works fine, but if you build and deploy the project, it would search for the chm file at the same physical path as that on your development machine, and hence doesnt find it.
The Solution:
In development environment/machine, remove the physical path of the chm file from the HelpNamespace property of the help provider and leave only the name of the file along with the .chm extension. Now copy the .chm file in the folder [ProjectName]\Bin\Debug (The same folder where the .exe file of your project is). Run and verify that the chm file is still being located. When deploying, make sure that the exe file of your project and the chm file are in the same folder. This should solve the problem.
|
|
|
|
|
Hi
your correct I'm using Windows application. The Solution you've mentioned above works fine. Can .chm file be the part of Deployment project so that whenever i build and install it will be there? at present i'm not able to add .chm to deployment.
I'm using System.Diagnostics.Process to display the Help.
Thanks for ur quick reply..
Warm Regards
Abhijeet Ballal
|
|
|
|