|
This may seem silly, but instead of trying to jump through these hoops (good luck solving this problem!! )
... why not just call the ISP and see if they can arrange a permanent IP for you? If not, I'd seriously begin looking for a more stable ISP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Okay so CollectionBase has a built in ArrayList. So collection creation is quick and easy
an IList doesn't, becuase well its an interface.
But, it's much lighter and IList can easily contain a ArrayList
Which would be recommended. CollectionBase is bulky but has all the housing.
Which do you use and why.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Ista wrote: Okay so CollectionBase has a built in ArrayList. So collection creation is quick and easy
an IList doesn't, because well its an interface.
But, it's much lighter and IList can easily contain a ArrayList
Which would be recommended. CollectionBase is bulky but has all the housing.
The main advantage to inheriting from IList or one of the other collection interfaces (I prefer IEnumerable myself) is that your object can take its proper place in your object hierarchy. Since you can't do multiple inheritance, if your class extends CollectionBase you get a lot of "free" functionality, but you can't extend any other base class.
It's not that much extra code to implement the interface, you can throw in an indexer property to get your ArrayList -like accessor behaviour, and you get a lot more flexibility in the long run.
Just my 2 cents. Share and enjoy.
Sean
|
|
|
|
|
Hello Everyone. I was wondering is there a way to make a CONTROL static like this:
<br />
public static System.Web.UI.WebControls.Label errorlabel = new Label();<br />
<br />
I tried that but I got an error message when the program ran. My problem is that label, errorlabel should contain an error message on it, but if I click a certain button, and then I click back, the errorLabel does not get set back to "" because it does not go to the Page_Load when you click back. So instead the error message again pops back up when you click back and I dont want that to happen. What I was trying to do was when I go to the next page, since it would be accessable to the that page since it's static, to change it there to the empty string.
So if anyone can help, I would really appreciate it.
Thanks,
TheMajorRager
|
|
|
|
|
TheMajorRager wrote: My problem is that label, errorlabel should contain an error message on it, but if I click a certain button, and then I click back, the errorLabel does not get set back to "" because it does not go to the Page_Load when you click back
This is ASP.NET ? It won't work. Your control is recreated on every post back, no matter what. You need to store the text in viewstate, and restore it, assuming the control is incapable of doing this for you.
TheMajorRager wrote: What I was trying to do was when I go to the next page, since it would be accessable to the that page since it's static, to change it there to the empty string.
When you move to another page, all contact with the class instance that was running the last page is lost. You have to remember in ASP.NET, you don't get one class instance for the page, you get one every time the page is rendered, which is brand new, unless it's a postback, and then it is still brand new, but can repopulate some fields from viewstate.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How does one get the little grabber at the extreme left of a ToolBar to show? I'm designing dockable toolbars that can also be moved by the user and that visual clue would be a nice touch.
Thanks!
-- modified at 19:53 Wednesday 30th November, 2005
|
|
|
|
|
You have to draw this yourself. Here is some sample code to do this:
<br />
Win32Lib.RECT rc = new Win32Lib.Rect();<br />
<br />
rc.left = this.Left;<br />
rc.right = this.Left + this.Width;<br />
rc.bottom = this.Top + this.Height;<br />
rc.top = this.Top;<br />
<br />
if(DockStyle != DockStyle.Right && DockStyle != DockStyle.Left) <br />
{<br />
rc.left = 1;<br />
rc.right = 1 + 3;<br />
} <br />
else <br />
{<br />
rc.top = 1;<br />
rc.bottom = 1 + 3;<br />
}<br />
<br />
Win32Lib.DrawEdge( hDC, ref rc, Win32Lib.BDR_RAISEDINNER, Win32Lib.BF_RECT );<br />
Note that this calls the Windows API using Interop to do this. This gives you the gripper that you see in VC++ 6.0, There are other ways to do this, this is just an example.
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
|
|
|
|
|
Thanks for your reply, Andy.
Does this require additional references? I don't see the Win32Lib in Visual C#.
I'm using VS 2003, FYI.
What other ways would you suggest to get the gripper?
|
|
|
|
|
This is a wrapper library around the Win32 API that I created. I am using interop to make calls to the native API. This like on MSDN tells you about this function. You have to use DllImport and define the appropriate constants in your own code. If you are not sure how to interop with native libraries there are lots of articles here that explain this.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_6aat.asp[^]
I hope this helps.
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
|
|
|
|
|
I am looking for ways to write text along a bezier curve but I haven't found any, is there anyone who has done this and possibly give me some ideas on how to achieve this or point me in the right direction.
I have so far figured out how to get the points along the curve (I know how to calculate the pts using a formula, could not find an API in GDI+ that could give me this) but writing text along the curve involves more since the text itself must be rotated to get the right effect.
Thanks
Bhanu
|
|
|
|
|
I need to incorporate a Query By Example Grid in my application, something along the lines of those used in MS Access where the user can enter the criteria in a grid and an SQL statement is generated depending upon that grid.
Before I start on the process does anyone know if such aleady exists - seaching Codeproject for "QBE" found no results
Thanks
|
|
|
|
|
I'm working on a dockable forms/controls project. How does one get that "pin"-like icon to be displayed on a dockable MDI form / control? I'm talking about the icon immendiately to the left of the "X", in the top right corner of, say, the Soultion Explorer window, Properties window, etc.
|
|
|
|
|
|
|
Probably easy answer but here goes.
How do I go about returning a variable name versus the value of the variable?
<br />
public struct Test {<br />
<br />
public string member;<br />
<br />
}<br />
<br />
Test obj = new Test();<br />
string member = "hello";<br />
<br />
obj.(member); <- obviously this is illegal but bare with me<br />
<br />
How could I have the variable name "member" (not the value "hello") be interpreted as if I manually wrote obj.member
|
|
|
|
|
I think you can get what you want using typeof.
|
|
|
|
|
No, typeof returns the System.Type of the specified type. For example, if you have a class named Foo,
class Foo { .. }
Type theFooType = typeof(Foo);
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
|
Plese help me to display a small dialog box(combobox ) wherein the user can specify the name of a dial-up connection from his system.
Vlada Nesic
|
|
|
|
|
For some reason ResxResourceWriter class is not availble for me in System.Resources namespace. However, I do see ResourceWriter and IResourceWriter. I'm using .Net 2003 on 2003 Server which has both .Net 1.0 and 1.1 installed. My primary framework is 1.1 . I dont think 1.0/1.1 should make difference since the class was available since v1.0.
Any suggestions?
Thanks,
- Malhar
|
|
|
|
|
This may sound like a stupid question, but is your project something other than a Windows Forms app?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No such thing as a stupid qstn. But you're correct. My application is a Library (DLL) project which will be used by an used as a reference by UI (Windows Forms) project.
|
|
|
|
|
OK. You're probably missing the reference to System.Windows.Forms.dll.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You know I said "there is no such thing as a stupid question". I was wrong. My initial question was really stupid!! .
I added "using System.Resources" but overlooked that it belongs in the System.Windows.Forms.Dll assembly. I was expecting that the Resources related stuff should be common and not be part of Win forms!!
Anyways, thanks much for your help.
- Malhar
|
|
|
|
|
Hi everybody!
I'm currently working on a class that has some public properties of type double . For some of them i have to restrict the set accessor, so that only values greater 0 can be assigned. Currently I'm ignoring an assigned value that is smaller 0
public double Alpha
{
set
{
if (value > 0)
this.alpha = value;
}
}
but I'm not really happy with this solution, cause the user has no feedback if the value specified by him is really assigned. Is it good practice to add an else-block and throw an ArgumentOutOfRangeException there? If so, should i offer some method to check if a double value would be valid for alpha or some static min and max fields?
Thanks in advance!
www.troschuetz.de
|
|
|
|