|
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.
|
|
|
|
|
hi,
I try new projects, usb sim card editor.
I want to do with the visual basic editor in 2008. net
I have a usbsimcard adapter.
I want to do this; read the sim card phoonebook
Where should I start?
tahnks.
|
|
|
|
|
Reading most if not all of the documentation on an API's you wish to use that came with(or are available for) that usb reader.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
maybe I need a ocx, did you not?
|
|
|
|
|
Maybe you need to contact the vendor who makes the hardware in question ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Hi all,
i made classlibrary project and I checked "Register for COM interop", its run correctly but when i'm trying to close the form the following error happend
"Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
I want to know why?
Thanks for help
|
|
|
|
|
Well, the error can be caused by a variety of things. Since you didn't describe anything about your .DLL, what it does, or any other references it uses, it's pretty much impossible to tell you what's wrong. About the best we can do is show you a list of articles and discussions to read so you can see what might match up to your situation, here[^].
|
|
|
|
|
Thanks for your help
i think the problem here is in the ProgId attribute, so??
Thanks
|
|
|
|
|
Somehow I doubt it.
But, how am I supposed to know that?? I know nothing about your code, other than it generates this error message. I also told you that this message could be caused by any number of things. So, how am I supposed to know if that (very vauge) description you gave is the cause?? I can't test it, so you have to come up with a test of whatever you suspect might be the cause and try a solution.
|
|
|
|
|
Hi. got a project which have been developing, where you have a login form, and you login as a user or admin. and then the login form hides, once the okay button is clicked. then you see a database and two menus, one for navigation and the other for file menu, and one of the options, is close. you click the yes button, this database form hides, then another form comes up with three controls, an about button, a data button, which then supposed to show a data grid and a exit button. well the about button, is doing nothing. put the code in here, and getting errors, saying that the table adaptor, is not being accepted and do have a table adaptor, so how to fix this problem. any ideas, or how to add atatchments on the forum, is allowed, but not sure if it is allowed. let me know if any one can help. cheers Marvin.
|
|
|
|
|