|
Lowlevel reading/writing from/to a USB-port is a very advanced topic. Is there any particular apparatus that you are connecting to that port that you want to interact with?
You can read/write files on an USB-stick/drive by using the System.IO classes. Anything beyond that will probably require an SDK of the apparatus-manufacturer
I are troll
|
|
|
|
|
You don't read/write to a USB port. You talk directly to the devices on it.
USB is not a port, but a bus, like the expansion slots inside the machine. You don't talk to the slots, you talk to the devices in them.
|
|
|
|
|
how to convert images of types gif to jpeg using vb.net code ?
|
|
|
|
|
Hi,
load the image with Image.FromFile() or Image.FromStream(), then save the image with Image.Save();
use an overload that lets you specify both the filename and the ImageFormat.
i.e. read the documentation!
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
hi,
matrix shifting its column posion while copy & pesting on ppt, how to fix this ?
also is there any way to copy rdlc graph directly to power point ?
|
|
|
|
|
Hello friends,
This is naga , I am a beginner of dot net. Now i am doing project. I can generate the report all records to show in reportviewer using report.rdlc file.
But now I dont know how to pass the parameter to show the seleted records to generate the reports in reportviewer using report.rdlc file.
Now i was take too long for this problem.Can anybody help me for this Plz.
I need example code for this in vb.net. Please kindly help me for this problem.
Thanks in advance for ur helps.
Naga
<div class="ForumMod">modified on Tuesday, March 17, 2009 4:48 AM</div>
|
|
|
|
|
Hi,
I have an odd problem in my project.
With the following imported namespaces in my project :
Imports System.Windows.Forms
Imports System.Reflection
.. I cannot add..
Imports System.Windows.Media.Imaging
If I remove the Forms and Reflection namespaces, I CAN add add the Media.Imaging namespace.
Whats going on here then ?
|
|
|
|
|
andycee wrote: I cannot add
great statement. Care to give detailed facts?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
umm...I think you have something wrong at your end ?
I can see the entire post!
|
|
|
|
|
I see a message, it fails to explain what is going on. "I cannot add" is as meaningless as "it does not work" or "it hurts".
Do you have no keyboard, is your display defective, do you get an error message (if so which one), don't you know how it should be done, have the necessary menu items disappeared or grayed out, what?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
OK,
This works fine on its own...
Imports System.Windows.Forms
Imports System.Reflection
and this works fine on its own...
Imports System.Windows.Media.Imaging
But have them in the project at the same time, and I get the following warning :
Warning 1 Namespace or type specified in the Imports 'System.Windows.Media.Imaging' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
With the Forms and Reflection namespaces added, VS does not allow me to add Imports System.Windows.Media.Imaging without errors.
Any clearer ?
|
|
|
|
|
The Media.Imaging namespace only works in WPF apps, not Windows Forms. Also, I think all of the classes in that namespace require Vista. XP is not supported.
|
|
|
|
|
Yup, its becoming clear that WPF and the Forms namespace won't co-exist. However, WPF only apps do work fine under XP.
"The latest version of the .NET Framework, i.e. .NET 3.0, has a much better approach to properties, but it too has its problems. If you download the .NET 3.0 runtime and/or the SDK, you can make use of the new .NET 3.0 classes, but it also introduces a completely new graphics environment – Windows Presentation Foundation (WPF) – and a new set of forms and controls which aren’t compatible with the old .NET 2.0 Windows Forms classes. Of course you could just opt to create a WPF application and forget about Windows Forms, but what about existing applications?"
(from http://www.vsj.co.uk/articles/display.asp?id=649)
cheers
|
|
|
|
|
andycee wrote: However, WPF only apps do work fine under XP.
I didn't say WPF apps wouldn't work under XP. The is a WPF extension available, though not with the greatest of performance. I just said the classes under the Media namespace are not supported under XP. There's a big difference between the classes being supported by Microsoft on XP and whether or not they actually work!
|
|
|
|
|
Hi.
well here's the project description below.
so how to do this project.
did start the project, but a bit stuck, so how to do this?
cheers Marvin.
8.1 Array of a structure. Create a project to analyze an income survey. Thestatistics for each home include an identification code, the number ofmembers in the household, the yearly income, and the state of residence.
A menu will contain File, Reports, and Help. The File menu will contain
Enter Data and Exit. As the data are entered, they should be assigned fromthe text boxes to the elements of a structure.
The reports for the project will be sent to the printer and include thefollowing:(a) A four-column report displaying the input data.(b) A listing of the identification number and income for each householdthat exceeds the average income.(c) The percentage of households having incomes below the poverty level.
|
|
|
|
|
I did explain a lot of this to you the other day. Which bit have you done as a result of my previous advice ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi. well, had done the text boxes, and tried doing the array.
and would be handy if you had some sample, how to then show me how the elements of a array in text boxes, and then print the four collumn report. cheers Marvin.
|
|
|
|
|
My answer has not changed. Putting the elements of the textbox into an array is stupid. Assuming you want to do that, then read up on arrays, it's very simple, you access objects by index, starting from 0.
I can't give you an example, b/c you're not far enough along to decode my example. I don't use VB.NET, because I despise it. I just help b/c the questions are easier in VB land, and they all relate to the .NET framework, or programming basics, both of which I know.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
HI. well stupid. then the book says about doing an array of an element, for each text box, then have a four collumn report. okay, give me some links i can go and find and read up about it. and maybe some examples as well.
|
|
|
|
|
These threads are very annoying to follow, because you keep replying to yourself instead of to me.
StarTrekCafe wrote: then the book says about doing an array of an element, for each text box, then have a four collumn report.
OK, I see. So, it wants you to do an array for each textbox. That's a terrible solution, but I guess they are doing it to teach you about arrays. So you'd need an array of strings for each textbox, and then you would keep an index, so that you have to make sure that all the strings for record one, go in index # 1 for each array. This is the reason that a single array of structs is better, in the real world.
I would assume that any examples you find online will be similar to the one in your book, the best I can do is try to explain it. If you have four textboxes ( b/c you have four columns ), then you'd have four arrays, and a variable to keep the current index. Then you'd increment the index until it gets to your array size, and then print your report. This would be done in a loop, I guess. Then you'd create a new loop, and inside that loop, you'd print each line of your report. You'd just print a tab between the strings to get your four columns, I would expect.
I'd suggest your next step is to make a start, and if you need to post again, post some code and tell us where you're stuck.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi. so how do i reference an element of an array from a text box and then print it out using a four collumn report in the print collection? cheers Marvin.
|
|
|
|
|
A textbox contains a string, not an array. Your question makes no sense, try posting more detail, such as the data in question and the format you want
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
As has been already stated, you can't treat a string like an array like you could in C++. However, you can get a character of the TextBox's text by using TextBox1.Text.Chars(n). As for the report printing, good luck. You'll need to be thoroughly familiar with the System.Drawing and System.Printing namespaces
|
|
|
|
|
|
Code project has a job board. Please post your job ad there. Even people in China surely know better than to work for someone who can't afford to advertise the position ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|