Topics
-
- 2 replies
- 2.6k views
this might sound weird but say you add a Panel within a panel, and you can drag controls into the inner Panel. This works great, however, i'm making a custom control where the main entire thing is inherited from Panel and there's lots of painting, then in the constructor of this inherited panel i create another panel and position it etc, and do this.Controls.Add(panel); So once compiled i add it to a project, but when i try to drag a new control say a button into this container the button will only go into the primary panel but not the inner panel i dynamically created and added in the constructor, what is the difference from dynamically doing so and allowing peo…
Last reply by Winston, -
- 1 reply
- 1.8k views
The game I'm current creating involves use of a library of tiles for the game engine. The only problem is that there is 30 000 tiles and each one is 96*64 in size. Now everytime I render the tiles, D3D stretches the texture to 128*64. Is there anyway I can get around this, maybe by creating a texture of 128*128 and then appling the original 96*64 image on-top of it? If there is a way can it be explained please? Thanks.
Last reply by TrueADM, -
- 0 replies
- 717 views
I recently had to create a mortage coupon book. Now i was able to accomplish this using a table variable in Sql 2000. Is there a way to do this without using the table variable or temp tables? I couldn't discern a way to do it without using a loop to insert the values into a table. The reason i ask is that i would really prefer to put this into a view instead of stored procedure.
Last reply by barski, -
-
- Leaders
- 4 replies
- 1.7k views
Hello all, Out of nowhere i've been asked to write a small exe to distribute to our clients that will install some template files onto there computers. (Yes i've raised the issue of client's willingness to run foreign exe's on there computers). Now back in my uni days i remember hearing someone mention that you could compile a file(s) into an exe and then access them @ run time. Now I assume(???) that when compiling in .NET you set the Build Action to embedded resource to compile a file into your exe... but how do you then access this file? Many Thanks
Last reply by Superfly1611, -
-
- 2 replies
- 1.8k views
I have a usercontrol written in C#. The usercontrol is added to a form. There are buttons inside the usercontrol and i have set the tooltip for it. But for somereason the tooltips seem to go behind the form and only show up partially. The screenshot is attached below. Is this a bug in .NET (C#) ? Any workarounds? Thanks in advance Linesh
Last reply by linesh, -
-
- Administrators
- 2 replies
- 936 views
Haven't had much of an opportunity to work with web services, so I'm venturing out and trying to get up to date. VS makes it so easy...not much of a learning curve at this point. Question though - returning primitives or class thas that can be serialized (DataSet) is simple enough, what if you want to return a file of some sort; like a picture, or a word document? I'm very curious about this part. Also - anyone who has some beginner articles on how to get things into this directory that's out there floating somewhere - or do people even use that? Seems like Amazon, Google, and Yahoo weren't in it - but you go to there respective development sites and you can find i…
Last reply by bri189a, -
-
-
- Administrators
- 6 replies
- 1k views
Interfaces are a sort of contract which states that the implementing object must implement all methods of the interface. Fine. But at the next level up you might have several related interfaces, and want to have a contract that a dll will implement all of those interfaces, and do so just once. Can this be done? Or am I better thinking of having one big interface and somehow dividing the procedures in that into categories?
Last reply by Cags, -
-
- 2 replies
- 1.1k views
If i have a combo box with the values 1,2,3 & 4 in it and i have a button, how would i get the button to when pressed turn the combobox's selected item to 2?
Last reply by VbStudent302, -
-
- Administrators
- *Experts*
- Leaders
- 22 replies
- 2.4k views
From documentation: � Implicitly typed local variables, which permit the type of local variables to be inferred from the expressions used to initialize them var i = 5; var s = "Hello"; var d = 1.0; var numbers = new int[] {1, 2, 3}; var orders = new Dictionary<int,Order>(); Is it me or does this take maintainability way down (especially when you through in a few 10's to 100's line of other code - what was s again? Now we get back to declaring objects: strUser; intID; objWorkflow decAmount; Yeah - it's a pain enough to deal with in JavaScript - I don't really want to have to support this in compiled code too! Readability goes threw the floor, …
Last reply by mskeel, -
-
- 1 reply
- 1.2k views
Hi, I'd like to create a toolbar that is hidden until I move over some specified area when It becomes visible. Something like what's in the IDE when you set windows to AutoHide. Which components from the toolbox should I use? TIA /Kejpa
Last reply by georgepatotk, -
-
- Administrators
- Leaders
- 5 replies
- 6.8k views
ok I have never messed with GetPixel before so this is my guess at how it supposed to work (I got really close i think) My code: Public Class Form1 Public Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long Private Declare Function GetForegroundWindow Lib "user32" () As Integer Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer) As Integer Public Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Integer, ByVal ByValhdc As Integer) As Integer Private Sub GetPixels(ByVal hdc As Long, ByVal x As Long, ByVal y As Long) Dim black As Color = Color.Black Di…
Last reply by Biodegradable, -
-
- 2 replies
- 1.2k views
Alright, I need to create a table (did it) that will have rows and cells (duh), and I need it to have a button in one cell that says add(did it).. this is all in an asp:table . When the button is clicked (having trouble referencing it since it is in the table, some reason VS won't recognize it, so I must be doing something wrong.. and I can't double click it to get it to recognize it itself - clicking on it highlights the entire table) have it add a new row with 7 cells and all the same controls as in the first row. Then I need to be able to get data from each of those textboxes (3), dropdownlists (1), radiobuttonlists (2), and a button that says add or I can reference …
Last reply by college_amy, -
-
- *Experts*
- Leaders
- 13 replies
- 3.6k views
http://msdn.microsoft.com/vstudio/express/support/faq/default.aspx#pricing
Last reply by joe_pool_is, -
-
- 3 replies
- 1.6k views
Hi All, I've asked around and no-one seems to be able to answer me!... Here's my question(s): All in C#: Abstract collection based on an arraylist "ab_collection.cs" Abstract entity object which stores ID and Description "ab_entity.cs" Real collection based on abstract collection "number_of_people.cs" Real object based on abstract entity "person.cs" Question 1: If I put an add method on my abstract collection public void Add(ab_entity entity) { addme(entity); } When I inherit the method within "number_of_people" will it loose any of my entity if I pass a "person" object to it. Question 2: If my "person" entity has additional storage of Firs…
Last reply by bri189a, -
-
- Leaders
- 4 replies
- 3.2k views
I have a VB6 application that writes a 2 dimensional array (40,1024) to a file using FileNum2=freefile Open FilePath For Binary As #FileNum2 Put #FileNum2, , VoltArr Close #FileNum2 Where VoltArr is a 40 x 1024 array of double type. I know need to open that file using .NET 2003. I need to load the entire array at once just like I did in VB6 using Dim FileNum As Integer FileNum = FreeFile Open FName For Binary As #FileNum Get #FileNum, , ImageArr 'Populate array Close #FileNum Can someone point me in the right direction?
Last reply by snarfblam,
-
-
-
- Leaders
- 3 replies
- 1.1k views
I have a list of button names that exist on my form in my DB, I have added the functionallity for the admin user to determine what buttons they wish to see i.e. the DB has column for the name and another column specifying true or false. What I would like to be able to do is build the VB code up form the DB. An example code (not correct just to give you an idea) Do While myReader.Read ' get button name from DB dim buttonName as string = myReader("columnName") ' get button is visible (true or false) from DB dim buttonVis as boolean = myReader("columnVis") ' This is where I want to dynamically build the vb code using the above ' values me.button…
Last reply by Cags, -
-
- 2 replies
- 2.1k views
I have a program that draws on my desktop...but I want it so after 10 seconds the line goes away. I thought ReleaseDC(hWnd, hDC) would do it but it didn't i have to put like a window ontop of it or something then it will go away. and My line drawing is on a loop and in a timer. I actually have the drawing on a hotkey...so when I press PrintScreen, it will draw, but I want it to after 10 seconds it will vanish...
Last reply by Biodegradable, -
- 7 replies
- 3.2k views
Hi all, What would be the pattern for finding the last comma in a line of text? Ex: Brown, Brown, Brown, Brown, Brown, Brown Thanks a bunch! ;)
Last reply by IngisKahn, -
-
- Leaders
- 2 replies
- 2k views
The .Net framework has a class, System.Windows.Forms.NativeWindow, which provides low-level encapsulation for a window. I would like to use the class to override a window's WndProc function. I would need to inherit the class in order to override the protected method WndProc(). The problem is that I need to use this class for a pre-existing window from another program, which means that I can not use the constructor, but instead I need to use the NativeWindow.FromHandle method, which will not return my inherited class, but rather a NativeWindow, hence my override will not be used. There is a function AssignHandle, but I used this function and my WndProc is not being called…
Last reply by snarfblam,
-
-
-
- Administrators
- 10 replies
- 1.7k views
What is the best way of getting out of a nested loop (using c#), I know that you can exit a single Loop with the break; command, for(int i = 0; i < iCount; i++) { if(RequirementMet) // situation on which I want to exit break; } but I'm unsure of the best way of exiting a nested loop, this is the way I'm currently doing it. for(int i = 0; i < iWidth; i++) for(int(j = 0; j < iHeight; j++) if(ReqruirementMet) goto BreakLoop; BreakLoop: Is this the best approach, I remember reading somewhere that the goto command isn't particularly good coding practice, but I don't know of any other obvious way to exit.
Last reply by bri189a, -
-
Who's Online 0 Members, 0 Anonymous, 114 Guests (See full list)
- There are no registered users currently online