|
Can anyone help me, how to flatten scroll bar of a combo box in vb.net
|
|
|
|
|
Flatten the scrollbar??? That is somewhat ambiguous...do you mean flatten it's visual style or make it tak up less space?
Posted by The ANZAC
|
|
|
|
|
I like to flatten the visual style of the scroll bar
|
|
|
|
|
I'm not sure that this is possible without creating a custom control (which i can't help with). Setting flat style to flat doesn't do it, so i don't think there would be another way.
Posted by The ANZAC
|
|
|
|
|
Is there any code to create custom combo box with flat scroll bar?
|
|
|
|
|
That presents another issue, i don't believe that the scrollbar supports a flatstyle, this would probably mean the creation of a custom scrolbar to incorporate into your custom combobox.
If you don't mind me asking, what is this for? There may be alternatives. Does it need to be a combobox? and if so how many items does it need?
Posted by The ANZAC
|
|
|
|
|
Actually i am developing an application in VB.net where each control in my forms are flat except Combo box. So i searched for flattening combo box where i could found only the text area and arrow button of a combo box are repainted in WndProc function of an inherited class of a combo box but not the scroll. So,Is there any solution for it?
|
|
|
|
|
As far as i know, scrollbars don't support flat look, that does not mean there is no solution, but i do not know of it. I've told you all i know.
Posted by The ANZAC
|
|
|
|
|
Thank u ANZAC! Thank u for ur graceful efforts
|
|
|
|
|
Your welcome. Sorry i couldn't be of more assistance, One more thing, have you noticed that not even office 2003 uses flat scroll bars, yet i hadn't noticed this until today, i really don't think iot will be noticed too much.
Posted by The ANZAC
|
|
|
|
|
Hello,
I have a function that returns a dataset which is in my data layer.
I now have to change this as I want to fill a sqlDataReader then return that.
The compiler does allow me to do this. Is there another method.
Thanks in advance,
Steve
|
|
|
|
|
steve_rm wrote: The compiler does allow me to do this.
I guess you need to post your code and explain what error you're getting then.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
steve_rm wrote: The compiler does allow me to do this. Is there another method.
So what is the problem?
|
|
|
|
|
Does anybody know of a simple way to make a shallow clone of an object in vb.net? If anybody has a code example that would also be usefull.
thanks,
Mike
|
|
|
|
|
|
Thank you for that link Keith. But I'm getting an error when I try to do the same thing with my object that says this:
Object.Protected Function MemberwiseClone() As Object' is not accessible in this context because it is 'Protected'
Here is the line in my code based on the msdn example that's causing the error:
newobj.PartAtom = CType(oldobj.PartAtom.memberwiseclone,PartAtomCLS)
If anybody has any ideas on what is causing an error please let me know.
thanks,
Mike
|
|
|
|
|
Hi MikeMarq,
Perhaps its because you are not calling the MemberwiseClone() method within its class or by a derived class. Remember that a protected member is accessible within its class and by a derived classes.
Andre Luiz de Alcântara Chaves Bittencourt
|
|
|
|
|
Your suggestions fixed it. Thank you guys for your help.
|
|
|
|
|
The previous poster is dead-on.
You will need to write a function in your class that implements the ICloneable.Clone.
For example:
Public Class MyClass
Public Function Clone() as Object Implements ICloneable.Clone
Return Me.MemberwiseClone()
End Function
End Class
You can then call the Clone function from outside the class to create a shallow copy of your type.
|
|
|
|
|
I have a 3 page Word doc containing VB text boxes on every page.
I would like to automate filling these text boxes thru a VB.net program.
How do I go about it?
Thanks
Rey
|
|
|
|
|
Hi,
I used to do VB 6 programming at college, and now I have to do a project for uni in VB.NET2005. The program is going to be a typing tuition program, with a few tests such as entering the write letter, all very simple kid oriented stuff.
I was just wondering, am I going to struggle with VB.NET 2005 as I have not used it before, or should I be ok picking it up, what are the major differences?
Any tips on programming this, as I have not got that much of an idea at the moment!
Cheeky, but has anyone got any source code or anything like that for a similar program???
Many thanks
|
|
|
|
|
There are quite a few differences, but i doubt you struggle if you've got previous experience. It's not like learning a new language, it's more like moving house, things are just different. Not in a complicated way though.
e.g. instead of setting listbox style to have checked items, you have a checked list box now.
I guarantee you will pick it up in no time.
My tip for your program:
Start studying up on keypress, keydown, keyup and how to use them.
Don't start a new thread on this site, just keep this one running and ask different questions.
Short Keydown Intro:
Say you want to know if they pressed f then do something if they did:
if e.keycode = keys.f then
'do something
end if
Posted by The ANZAC
|
|
|
|
|
I used vb5 before I switched to vb.net 2005. I'd say that vb.net is more powerfull but slightly harder to use but not dramatically harder. I wouldn't expect that you would have any problems picking it up. I'd say vb.net is better if you are doing any somewhat complicated program especialy if it is object oriented. Here would be my list of pluses and negatives.
Plus:
1 better at object oriented stuff
2 an extensive library that I think is identical to the one in c# and c++. It lets you do a some things that were hard or impossible to do in earlier vbs.
3 The intellisense is better than the one in vb5 (I never used vb6 so I can't speek for that).
Negative:
1 have to declare ALL variables
2 arrays have to start at zero (no base 1)
3 theres no simple built in one word functions. Instead you use the class library and create an object from a class then use it. This is more capable generally but its not quite as simple use.
They also changed a few other things like some of the data types. For instance int is now 32 bit instead of 16.
|
|
|
|
|
MikeMarq wrote: 1 have to declare ALL variables
2 arrays have to start at zero (no base 1)
3 theres no simple built in one word functions. Instead you use the class library and create an object from a class then use it. This is more capable generally but its not quite as simple use.
I wouldn't say these are all negative...
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
1 & 2 are. They used to be optional and you could do things either way. Now you can only do it one way. 3 is a tradeoff. The new way is more powerfull but slightly more complicated so in some cases its better and some cases its worse.
|
|
|
|