epic69 Posted February 9, 2005 Posted February 9, 2005 I need to put a Picture Box control from VB6 onto a VB.net form. I right click the toolbar in VB.net and click add/remove and then select com components. But no where in that list of com components do i see a picture box. Image, text box, list box, etc.. etc.... No picture box. How do i do that? Quote
techmanbd Posted February 9, 2005 Posted February 9, 2005 Why would you need the picture box from VB6? there is one for .NET. Also I am sure you can't bring over VB6 components to the .NET. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
epic69 Posted February 9, 2005 Author Posted February 9, 2005 I need a VB6 picture box control, because the .net application is calling a .dll file that takes a picturebox object as an arguement, and the .dll is a VB6 .dll file. also you can take all kinds of VB6 controls and use them in .net, .net can use com components easily. I just cant find the picturebox control, i can find many others but not picturebox. Quote
Administrators PlausiblyDamp Posted February 9, 2005 Administrators Posted February 9, 2005 IIRC the picture box control from VB6 is part of the VB6 runtime and not a seperate control. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Diesel Posted February 9, 2005 Posted February 9, 2005 How about importing the VB6 DLL? And using the class from there. Quote
Jay1b Posted February 11, 2005 Posted February 11, 2005 VB6 will not be supported by the next version of Windows*, so you really should avoid using anything to do with it! *as of year old information, i presume it hasnt changed. Quote
Administrators PlausiblyDamp Posted February 11, 2005 Administrators Posted February 11, 2005 VB6 will not be supported by the next version of Windows Do you have a source for that quote? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Jay1b Posted February 11, 2005 Posted February 11, 2005 Do you have a source for that quote? Unfortunately not, as i said before, i read it about a year, 18 month ago. As a guess I would say it was more of a case of, you will need to download the VB6 framework and install it - just like you did with .NET when it first came out. Alternatively it may have something to do with the API's (guess again). Edit: Spelling Quote
stustarz Posted February 11, 2005 Posted February 11, 2005 VB6 will not be supported by the next version of Windows Why and how would microsoft stop applications written in VB6 from working on the next version of windows? I think maybe u mean that Microsoft are going to stop supporting VB6 - in terms of, no longer creating bug fixes or offering technical support, and this will occur by the time the next version of windows is released. I cant see why they would even bother 'blocking' the use of apps that have been written in VB6, it would be illogical, and only see them in court again! Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
Jay1b Posted February 11, 2005 Posted February 11, 2005 Hey thats just what i read, as i say i cant remember the source. I dont think it would be been a case of blocking it, more of a case of not providing something that VB6 needs as a matter of default. For example changing the APIs would render 90% of VB programs useless (ok this would also render most other programs useless as well, but its an example!). Quote
*Experts* Nerseus Posted February 11, 2005 *Experts* Posted February 11, 2005 MS won't make a version of Windows that doesn't support VB6 for a very long time. As for the API calls, most of the common ones will be supported even though there may be newer alternatives. I would say that most applications written in VB6 have a VERY small percentage of code that relies on an API. API calls to set tabs in listboxes, get domain names, etc. will surely be supported for a long time. MS's "mainstream support" for VB6 ends on March 1, 2005 - less than a month. I'm just now having to go back and give estimates and fix some code I wrote in VB6 almost 6 years ago. The company that now owns the application we wrote LOVES the application, sells it and has no plans to upgrade to .NET in the forseeable future. It's one of many large, stable, easy-to-maintain apps written in VB6. Why am I saying this? My point is that MS may stop mainstream support for VB6, but it's still in use and will be for a long time. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
coldfusion244 Posted February 11, 2005 Posted February 11, 2005 Hmm, most of my VB6 code was API, I guess that is a bad thing? I really didn't know of any other way to add icons to menu items without subclassing everything, or when working with bitmaps or metafiles, lots of good api for that... Also enumerating windows... Must just be me :( Quote -Sean
Leaders snarfblam Posted February 13, 2005 Leaders Posted February 13, 2005 Nothing wrong with windows apis... do the vb6 and .net runtimes, mfc, as well as most programs not eventually come down to windows apis (not an assertion, i honestly dont know)? Quote [sIGPIC]e[/sIGPIC]
Wile Posted February 13, 2005 Posted February 13, 2005 LOL, I can still run VB 3 applications on win 2 k 3 server. And vb3 was from before win95 -> over 10 years old. So they might not support the development environment, but the run-time will still be working. Quote Nothing is as illusive as 'the last bug'.
thenerd Posted February 13, 2005 Posted February 13, 2005 Just to add to this off-topic argument: You can still run QBASIC on XP! and that's REALLY old. Ok. now to add my question: You still havn't really explained why you can't just use the .net picturebox. Quote
Mike_R Posted February 13, 2005 Posted February 13, 2005 Ok. now to add my question: You still havn't really explained why you can't just use the .net picturebox. I really don't think that the COM Interop is going to convert a .Net Windows.Forms.PictureBox into a VB6 PictureBox. The Interop has backward-compatibility in mind, but I really don't think it will go that far. It's unusual to have a function or sub of any sort that takes a PictureBox as an input though, and in this case, unfortunate. Epic, I think you might have to create a wrapper function using VB6 that can take, say, a Bitmap, which is then placed onto a VB6 PictureBox and then passed into the routine you are interested in. Your new COM wrapper would then expose a Bitmap as it's input. I don't know a thing about graphics in .Net, not even really how to manipulate a Bitmap (sad, I know :(), but i would think that a .Net Bitmap could be passed to COM, but I'd have to leave this step to someone else to figure out... Quote Posting Guidelines Avatar by Lebb
thenerd Posted February 14, 2005 Posted February 14, 2005 If the reason is because of a function that needs to take the picturebox as input: What parts of it do you need? Why not just put in the parts of the picturebox seperately? private function thing(image as bitmap, x as integer, y as integer, otherstuff as somethingelse, otherstuff as anotherthing) as boolean ? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.