the documentation on MSDN and the according samples about graphics are in my
idea very confusing. It seems that you have to do everything in the method
which handles the paint event. (I know it sounds confusing).
Be aware that you can create a graphic in a form with CreateGraphic while
there are also methods where you can create it from the handler.
If you have created a graphic (an image or a bitmap) then suddenly it
becomes suddenly less difficult.
What the newer VB more confusing are all those classes which you can use and
are in the Net framework. Net. That are not anymore only Microsoft Visual
Basic namespaces, but also many others.
Have a look a this.
http://msdn.microsoft.com/en-us/library/ms229335.aspx
(In fact most is what you called API's in VB6.)
Cor
"C" <(E-Mail Removed)> wrote in message
news:9ce0aee1-4ed4-44db-84bd-(E-Mail Removed)...
> On 30 heinä, 21:29, "Cor" <n...@none.non> wrote:
>> > What makes this worse is that logic is not always visible. I
>> > particularly have difficultes understanding Graphics objects and how
>> > they are stuck to Forms, etc.
>>
>> In my opinion much more then in VB6.
>>
>> Have a look in Solution Explorer in the top and click that little button
>> Show all files.
>> All logic becomes now visible in the YourForm.designer.vb
>>
>> In VB6 I only saw this in Source Safe as a kind of clumsy resource
>> incorporated in the code.
>>
>> Cor
>
> I was referring to something else. When trying to learn how to use the
> graphics objects, I am not able to figure out how I should Dim them
> and where to have e.Graphics.***. I think there is little sense or
> logic in that.
>
> g.DrawLine, g.DrawRectangle, etc. is easy to understand, but the rest
> does not sound very consistent to me.