|
Been trying, haven't had any luck. Any other suggestions? I want to fill but preserve a 6 pixel distance from the parent control (from the left).
|
|
|
|
|
anchor will def do it for that.
make sure the control has dock set to 'none'
then...
myControl.Anchor = AnchorStyles.Right | AnchorStyles.Left| AnchorStyles.Top| AnchorStyles.Bottom;
this will keep the control to fill but with the same distance from each side of its parent control as it was when first created.
if it don't work then you have some other issue stopping it working but i'm afraid i must leave the net for the time being. good luck
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Got it, anchors where set already causing my dock to act weird, but i got it.
Thanks for the help
|
|
|
|
|
I'm lookin for a design-pattern that match what I need: I have class A which should hold a collection of class B or its inehrited classes. class B should be able to run functions and access properties on A and A should be able to run functions and access properties on B.
I've been suggested to pass reference of As properties to B opon construction, but I'm lookin for the design-pattern...
anyone know of any design-pattern similar to this?
Thanks alot
NaNg.
|
|
|
|
|
It's called the Charlie Foxtrot design pattern.
|
|
|
|
|
are you sure? (or are you just teasing me?) :x
I can't find in google some info about it.
Can you maybe give me a link for more info about it?
|
|
|
|
|
The word gullible is written on your ceiling. Check it out.
|
|
|
|
|
well excuse me for not having English as my native language and my day-to-day language
|
|
|
|
|
If they're that closely related they should implement a common interface that has the methods and properties that need to be shared in it.
public class A : C
{
}
public class B : C
{
}
public interface C
{
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
i have a Winform application. I have a textbox in which as a user types in, I make calls to my server app to display the results in another box.
As the user types in quickly i am making a lot of calls in a short period of time. I would like to put a throttle like 2 secs for every time I hit the server. In this way if the user types in quickly i will be hitting the server with the latest input every 2 secs rather than for every keyword..
Any suggestions would be appriciated..
|
|
|
|
|
Queue the users input into a Queue, read the queue from a separate thread or a timer.
|
|
|
|
|
Hi,
you need a single timer for that; it will be used as a one-shot with 2 second interval.
1.
When the user enters something, start the timer (if not already running) and set its interval to 2000 msec. Don't call the server yet.
When the interval elapses, call the server and stop the timer (prevent it from firing periodically).
With this set-up you are getting something resembling a user-idle detector, with the disadvantage that a user typing 1 character a second won't get anything until he stops typing for at least 2 seconds.
2.
If you want intermediate server calls as well, on top of tbe above, note the DateTime.Now value of every user action and compare them with the time of the last server call.
3.
If you want no delay on first input, on top of the above, check for timer running; if not, call server.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
This is the error:
{"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)"}
What is the solution?
|
|
|
|
|
SQL Server 2005 isn't configured to accept remote connections by default - you'll need to setup the server configuration correctly.
|
|
|
|
|
I have had this error on several occasions, all of them could be traced to my having incorrect parameters in the connection string. Not always the same parameter though.
So check the connection string for correctness.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Something to check before trying other things, open the Sql Server Configuration Manager, go to Protocols and ensure TCP/IP is enabled. It isn't by default...
Regards,
Rob Philpott.
|
|
|
|
|
are u trying to connect to a web database such as MySql on wwww.example.com?
|
|
|
|
|
Hello,
How i can search for a particular gif file (and open it) in a particular directory. I need the search to be recusive, i mean there are many folders in this directory and in each directory other folder and so on. I need the program to search in all those directories for this file.
How can i do it?
|
|
|
|
|
string[] filePaths = Directory.GetFiles(@"c:\MyDir\", "*.gif",
SearchOption.AllDirectories);
I know nothing , I know nothing ...
|
|
|
|
|
lol... bit too easy for my liking
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Stark DaFixzer wrote: SearchOption.AllDirectories
Not seen that before and have always written a recursive procedure for this sort of thing. Does this work?
Regards,
Rob Philpott.
|
|
|
|
|
I agree with musefan LOL... but yep, it does work
|
|
|
|
|
Yes it works.
There are some disadvantages: it will search all before it returns anything. (And the results may be huge).
.NET 4.0 will offer some new methods, enumerating while searching, rather than building an array.
And a limitation: it only works well as long as a single filter is all you need.
Finding all BMP, GIF, PNG, JPEG would need many of those (resulting in a different order), or another tactic.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc Pattyn wrote: Yes it works.There are some disadvantages: it will search all before it returns anything.
Yes that is right !!
I know nothing , I know nothing ...
|
|
|
|
|
Yep. I use it in a homebaked app to catalog my <ahem> picture collection.
Mike Devenney
|
|
|
|