
bpayne111
Avatar/Signature-
Posts
335 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by bpayne111
-
Making parts of a UserControl transparent...
bpayne111 replied to Kieron's topic in Graphics and Multimedia
hey thanks for that one.. i'm considering rounding the edges of a control i've written and that will save me a bit headache i'm sure (is it me or did this post work out kinda backwards) -
If I attempt to draw a bitmap with the overloaded Drawing.Grahpics.DrawImage(image as Bitmap,rect as Rectangle) Must the rectangle parameter correspond to the size of the image? If not what happens to it when the rectangle is larger? Smaller? Just wondering i'm getting an error and i wonder if that could be the issue.
-
thanks, i'm working on it as we speak... by the end of the night i should have put it together and found my problems (i'm hoping i don't have any lol but when does that ever happen)
-
would clipping regions make the drawing faster and more accurate?
-
that's a tough one i've never worked with that before... have you looked into resources at all? you can change languages using a resource file are the characters in ascii table? i guess not if you can't read... i'm just kinda brainstorming... i'd look into Resource Files if i were good luck
-
anytime
-
being that my board will be pure graphics and not a bunch of windows... will this make the painting quicker? i'm gonna get started on it soon thanks for all your help i would have started already but this site is so cool i can pull myself away
-
you could pass the form as a parameter to the class if you plan on changing these values use ByRef instead of ByVal for your form parameter just a suggestion
-
Binding as far as i know it refers to the binding of data from a database onto a control. In laymans terms... when you change records all the textboxes and labels generate text automatically from the database (only if you bind all the controls first) As far as accomplishing what you wish to do... you could inherit from the UserContrl class. you do not want to just type this in below the class declaration!!!! go to Project on the menu click Add User Control Your new control will contain properties of a regular control plus whatever you add... To display these properties during design time when the form is drawn you should use the system.component.componentmodel namespace (the syntax for this is strange i can send an example if you wish) Add it before the delclaratoin of a property i hope that helps
-
depends on what kind of attributes you are talking about File attributes are one thing (hidden, archive, readonly) Attributes can also be considered the properties of an object but normally should be called properties for clarifaction. In a textbook your author may just prefer attributes over properites Attributes could be metadata for an object ' you'll have to look that one up Attributes can be used to display Categories and Descriptions for Properties in Custom User Controls and Components hope that will clarify it a little might have made it worse lol
-
OH by the way if you are subtracting dates by chance the DateDiff function may be of use to use to you
-
Not that this is totally relevant to your question but... you should try the OrElse statement instead of Or The OrElse statement will return true with the first expression that is true. The Or statement on the other hand will evaluate all of the expressions regaurdless of thier value taking more time than the previous example. Sometimes Or is the correct logic operator to use if you for instance wanted to evaluate a function reguardless of it's return value. In this case the OrElse statement may terminate before the Function is evaluated. I taught my teacher that one... hehehehe I can type you up some sample code if you like
-
yes i agree now, i was at work thinking about it at work today and decided it would be very easy to draw the board and add the events with all graphics objects... However this brings a new questions to mind due to the fact i'm fairly inexperienced in graphics... Assuming i've drawn the board and the pieces inside each square. The user clicks and holds the mouse on a piece (mouse down pickup, mouse up drop the piece). once the piece is 'grabbed' i would hide the cursor. When i redraw the piece moving on the board will i have to redraw over the area where the piece previously was to hide it? Will this be a difficult task if so? Will the graphics be jumpy? Sorry to throw so many questions in at once, i would just like to get this part over with so i may get to the parts i'm truly interested in. thanks for the help
-
search help for this one at msdn they are fairly easy to do but i think good documentation will be better (if microsofts documentation is considered good lol) these two will get you started WithEvents statement AddHandler statement
-
I've had problems with my forms too (i have a non upgradable edition from school) Usually when it happens to me it's when i've deleted controls and played with alot of properties... i'll all kinds of wierd things. When things like this happen i usually just copy all of my important code. Exclude the form from the project. and make a new one. This usually works for me... give it a shot and see if it helps good luck
-
there is almost never a need to do that just Dim it once... and then make new objects like so... Dim myThing as Object Dim myArray as ArrayList mything = new object(parameters) myArray.Add(mything) mything = new object(paramenters) (in reality you'd probably use a Sub and use the parameters from that Sub to instantiate your new object, that way you'd only have one statement..... 'x = new x(a,b,c setting abc when you call the sub) (obviously this is just a sample, so your needs will vary, but it's a shot) always tryin to help
-
well i considered that but it doesn't gain me anything, in the fact that i still have my transparency issue and my grahpics are still on the bottom (if i draw them that way) also... do you know how to change z-order in a .NET form? i've been lookign for ways to do this but it doesn't seem as easy as the old days (pre .NET :( ) a true gem would be converting a .cur file to a .bmp during runtime... i'd be glad to see that one day thanks for the help
-
what do you mean by start the item at boot? Start/All Programs/ Start menu? doyou mean adding a file to the startup in code? you could add it to the start up directory in code very easy i'm not completely sure as to what you are trying to do though so it may be wrong
-
yes i was aware of that... i've tried using a graphic object but i cannot get it to be on top of other controls on the form. is thier a way to control what 'layer' the graphic is drawn? thanks for the reply
-
forgot this: by Microsoft Publishing sorry about that
-
OOP in VB.NET and C# was good in my opinion. Doesn't cover it all but can give you a concept of what things are supposed to look like. Although you need some general knowledge before hand. If you are a fast learner you could probably handle it either way.
-
Have you looked at the NotifyIcon component? it should be listed in the toolbox in the forms designer view. I'm not totally sure that's what it does but it sounded like it in the overview give it a shot
-
this is probably not going to work but.. could you make the form always on top? using either the property provided by windows.forms.form or in the API (i don't know the statement i'd have to look it up, i'll try if you like) the add-in you are using may provide some sort of method or parameter in a method to do that for you. have you checked all the functions it provides? just running off ideas.. maybe they will at least give you some direction. good luck
-
I would try creating a class and use the two indexes as parameters in a default Item property. ie: public class WidgetArray private myWidgets(iCol*iRow) as widget inherits ArrayList 'override the methods you wish to use public default property Items (Byval x as Integer, ByVal y as Integer) as Widget get return mywidgets(x,y) end get set (byval value as widget) mywidgets(x,y) = value end set 'override add, remove and whatever else you need
-
i'm writing a chess program. when a user grabs a piece, i'd like to clear that picturebox and draw the piece on the cursors location with transparent borders (so it's not a big square) there are many options here 1. Convert bitmap to cursor or vice-versa 2. Draw Drawing.Graphics object on the form *i've done this but i can not get the image on TOP!!! 3. make the background of a picturebox actually transparent *even setting it in code like so doesn't work picturebox1.backcolor = Form1.TransparencyKey if anyone could help me accomplish any ONE of these 3 please help. i can't believe this is so difficult reply in email if possible bpayne113@aol.com