snarfblam
Leaders-
Posts
2156 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by snarfblam
-
Don't you have to dispose it before you release the reference so that it has a reference to the resources that you are trying to dispose of?
-
In response to Engine252: of course I picked the right color, it was showing up transparent, which I did say in my post. I'm not stupid, and i'm not a newbie, but I am insulted. And thanks for the link, Hamburger1984. It is a good solution to my problem. But what I was really looking for was the answer to my question: Are there any known bugs like this, or any workaround or anything of the sort?
-
I know custom regions would work the way its supposed to, but Ive done the same in the past (using vb6 and windows api) and the results were initially ugly and it took alot of work to get what I wanted. And then what if i wanted to change the shape of the form?
-
I am trying to use the transparency key property of a borderless form with a bitmap as the background, as per the instructions in visual studio's help, to create a custom shaped form. The outcome is what it should be, visually. When I click on transparent regions within the form, however, they still receive events rather that passing them to the underlying forms (even though you can see through to the underlying windows where i am clicking). This behaivor is contrary to what should be expected according to visual studio's help. Are there any known bugs like this, or any workaround or anything of the sort? Edit: Also, when I use spy++, I can see in the outline of the window (using the find window tool) that the region includes the transparent areas.
-
Ive made my own vb6 activex controls that emulate windows xp buttons almost perfectly. I can acheive the effect i want. however I am just asking if there is any (reasonably simple) way to color the text of actual xp style buttons.
-
I don't quite understand the question "I still wonder why do we bother so much with Xp style buttons.." If your asking what I think your asking then the simple and obvious answer would be that we bother with them because they are so pretty. Anyways... are you suggesting that I use a picturebox instead of a normal button? One line of code (Application.EnableVisualStyles() ) turns all my buttons (btw my form has 49 buttons on it) into xp style buttons, without using a picturebox for each, and windows handles the drawing of the mouseover, active and pressed states. All I have to is respond to the click event. In this case, using picture boxes to get my pretty buttons would be so much more work, as well as a waste of resources.
-
give formB a property or function (or constructor parameter) that allows formA to send its reference to formB, ie: Private Dim FormToClose as Form . . . Public Sub SetFormToClose(FormA as form) FormToClose = FormA End Sub[/Code] so that anytime formb can just call [code]FormToClose.Close After FormA creates FormB, FormA should make the call FormB.SetFormToClose(Me)[/Code] to provide formB with a reference to itself
-
I know windows Xp styles supports colored text on buttons (a simple example would be the windows calculator program, which has different colored text on buttons that perform different types of operations). When you set the .flatstyle property of a button to system, however, vs.net will always use the windows default font color rather than the forecolor you specify, preventing you from having xp style buttons with colored text. Is there any workaround for this (including windows apis if necessary)?
-
As far as the graphics of tetris are concerned, you do not NEED to redraw every frame, just use a graphics object to erase where the tetris or line was, and redraw it at its new location, saving alot of cpu power and maintaining that familiar event driven program structure.
-
why does this cost another 200M? .drawimage() only blts from one image to another. it doesnt create any new objects (as far as i know)
-
As far as the .hdc property, i dont beleive that you can get handles to device contexts in vs.net. The best you can do is use the Graphics.GetHdc() function, but the device context this returns is WRITE ONLY.
-
I am making a program that uses directdraw fullscreen. The screen doesnt redraw every frame, it makes any changes to the screen on the primary surface as they are needed. When the program starts up, it draws the initial screen on the primary surface. Here is the problem: Sometimes, when the image comes back on the screen, the screen is blank, just the backcolor of my target form. I am not sure why this happens. My best guess is that I am drawing it too early. If I am right, and I don't know if I am, then the solution would be to have the program wait until the resolution has changed and all ready for drawing. Here is the question: Does anyone know how, if possible, you can detect when directx is ready for drawing?
-
I wasnt using a graphics object, but i suppose ill give that a whirl
-
Can you or how do you use different methods to resize an image (i.e. nearest neighbor, biliniar, bicubic)?
-
Back to the black and white thing... I used code along these lines: me.cursor = new cursor(filename.cur) and even though the file contained a colored cursor, it displayed in black and white. Will using any other methods on this page result in colored cursors?
-
Does the .net framework directly support colored mouse cursors?
-
I've made a fullscreen directdraw program before using page flipping. I want to make a windowed program now, though, so I was thinking the best choice would be double buffering. Am I right? And if so, could someone give me a simple description as to how exactly to do double buffering, i.e. what objects do i need and what methods should i call when? Im not really looking for code, but more of a basic idea of how double buffering should be implemented.
-
normally i would use tiles that are 2^x,2^x big, but for this game 40x40 is ideal, and using 32x32 or 16x16 would offer no advantage. Also, I had made my own clipping routine, but i didnt want to use it because it would eat up more cpu power than letting directdraw do it for me. And you also posted vb6 code for unmanaged directdraw. That doesn't do me any good. I figured out my clipping problem. The tutorial I followed set a clipper for the primary buffer, but not the backbuffer. For some reason i suppose that i assumed that they shared the clipper, and the thought that i would need to set one to the backbuffer never occured to me. And to answer my own question: no, you can not use drawfast with clipping.
-
I am using 40x40 tiles, and right now, im redrawing the entire level every frame without a problem (not that that is my final decision or solution).
-
Is there anything wrong with this? Dim clip2 As New Clipper Dim ClipRect() As Rectangle = {New Rectangle(0, 0, 640, 480)} clip2.ClipList = ClipRect ssurface.Clipper = clip2 [/Code] Does anyone know? Does anyone care?
-
I'm not planning on using this method, just considering. The screen is 640x480, so the double buffering isnt going to take up much of the video memory at all, even if there are 32 megs, so the twice as much for display is a total of 2.5 megs for 32 bit color. The reason I ask is because i'm having clipping issues and no one is offering any help, and there is essentially no documentation for managed directdraw, so this method would eliminate my clipping issues and make the programming easier.
-
I am making a scrolling game that will have scrollable areas of up to 1920,1200 (or maybe 2560,1600) at 32 bpp. That comes out to 8.8 megs (or 15.7 megs). If i were to pre-render the entire scrollable area and then blit the viewable area to the screen, would that 8.8 megs, or the 15.7 megs, be too much? (I want to avoid using system memory for my graphics.) On my computer i have 128 megs graphic memory, so its not a problem on the developping end, but I dont know what the average joe has for graphic memory, so I don't know if that would be too much for the end user.
-
I carefully checked the contents of the manifest file that is included in the msdn help file, it says nothing about the icon. The issue, I think, is the recource editor.
-
Does anyone know if you can clip with drawfast?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
-
Does clipping work for .drawfast()? 2096: Direct3D9: (ERROR) :Invalid BltFast destination dimensions I don't think thats the problem because the i got an error with .draw() too. 3176: Direct3D9: (ERROR) :width/height = 640 x 480, dest rect = (504, 466)-(520, 482) I also set the clipping rectangle to a smaller region and it still did not clip it