|
j_sen wrote: Although looking in the properties in the debug windows for txtBox,shows property name=ownerFields_text, but its just not printing "Why wont this work".
You are creating a new control that isn't displayed anywhere. Giving it the same name as another control doesn't automatically transform your new control into that control. They are still separate objects.
j_sen wrote: I do not want or cant cycle through controls for the right one.
If you don't have a reference to the control, you have to. You can use the Find method to do it for you.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
I want to add some visio shapes into my win form
programmatically ,i have to read some data from DB and
show the required diagram,
any body would help,
thanks
|
|
|
|
|
This might help you: http://msdn.microsoft.com/msdnmag/issues/03/12/Visio2003/default.aspx
|
|
|
|
|
Hi,
I am currently developing some application which have a lot of controls on them, especially an explorer bar which when the application window appears, is actually empty and white for a few seconds and then it is populated.
I am wanting to know if it possible and how I would implement a splash screen that is shown and updates a status label on the splash form, which stays until all the controls on my mainForm have been drawn and populated.
I am programming in C# in the MS Visual Studio 2005 (Vista) environment.
Thanks, Andrew Robinson.
|
|
|
|
|
Hi Andrew,
a splash screen is a popular topic, I suggest you search CodeProject for
some highly rated articles about it.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
In fact, NONE of the splash screen components/classes I saw for .NET were of any use to me.
And I search a lot and found a lot...
|
|
|
|
|
Really? Maybe you should write an article about the subject then...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
No chance - I have no clue either; otherwise I wouldn'T have searched
|
|
|
|
|
I thought there was a splash screen component built in, but a splash screen is just a form. Use the Show method so that it doesn't stop the rest of your app from running.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I am using a lot of controls on my main form, and require the splash screen to be shown until all the controls are drawn. I am using the AppLoader Quick n Dirty in C#. I have the splash working but don't know how to make it stay until the main form has completed loading and populating a control.
Any help is appreciated.
Thanks, Andrew.
|
|
|
|
|
Hi, maybe you should use the Activated-Event of the main form. This event occurs when the form has completed loading!
Tobias
|
|
|
|
|
i want my code to accept only numbers as the input in this calculator code.....how can i do that
class Program
{
int operand1;
int operand2;
char oper;
int result;
public void Display()
{
Console.WriteLine("Enter the value of operand1");
if (operand1 < 48 && operand2 > 57)
{
Console.WriteLine("");
}
operand1 = Int32.Parse(Console.ReadLine());
Console.WriteLine("Enter the value for operand2");
operand2 = Int32.Parse(Console.ReadLine());
Console.WriteLine("Enter the oper");
oper = Convert.ToChar(Console.ReadLine());
}
public void Result()
{
switch (oper)
{
case '+':
result = operand1 + operand2;
break;
case '-':
result = operand1 - operand2;
break;
}
}
public void Displayresult()
{
Console.WriteLine("{0} ", result);
Console.ReadLine();
}
public static void Main()
{
Program obj = new Program();
obj.Display();
obj.Result();
obj.Displayresult();
}
}
}
thanks
C#
|
|
|
|
|
Use Int.TryParse() in order to check if the string is an integer
|
|
|
|
|
hi ,
thanks but can you be bit more specific ie wer should i use this
thanks
C#
|
|
|
|
|
You should use it instead of Int.Parse() Have a look at documentatio in MSDN, it shows how to use Int.TryParse()
|
|
|
|
|
Hello,
I wrote the following code to get a list of available drives letters:
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.IO;<br />
<br />
namespace drives<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
int intFirstDrive = Convert.ToInt32('A');<br />
int intLastDrive = Convert.ToInt32('Z');<br />
List<int> intAvailableDrives = new List<int>();<br />
for (int i = intFirstDrive; i <= intLastDrive; i++)<br />
{<br />
intAvailableDrives.Add(i);<br />
}<br />
<br />
DriveInfo[] usedDrives = DriveInfo.GetDrives();<br />
int x = usedDrives.Length;<br />
<br />
foreach (DriveInfo usedDrive in usedDrives)<br />
{<br />
int intUsedDrive;<br />
string strUsedDrive;<br />
char chrUsedDrive;<br />
strUsedDrive = usedDrive.Name.Substring(0, 1);<br />
chrUsedDrive = Convert.ToChar(strUsedDrive);<br />
intUsedDrive = Convert.ToInt32(chrUsedDrive);<br />
intAvailableDrives.Remove(intUsedDrive);<br />
}<br />
<br />
List<string> strAvailableDrives = intAvailableDrives.ConvertAll<string>(delegate<br />
(int intDrive)<br />
{<br />
return Convert.ToChar(intDrive).ToString();<br />
});<br />
}<br />
}<br />
}<br />
but it seems that in windows vista DriveInfo.GetDrives() doesn't get network drives, is there something I can do about it?
|
|
|
|
|
|
Hello, everyone.
I was working on a windows program with C#, and wanted to associate my PictureBox component with a ContextMenu.
I searched into the Properties Windows, only to find a ContextMenuStrip property there instead of a ContextMenu.
Then I was unable to set the property using the Properties Window which would otherwise save me a lot of troubles.
So here comes my question. Since not all the properties of a component are displayed on the Properies Window, can I manually put the ContextMenu or some other property onto the Properties window? Or there's just no way for me to customize the Properties Window like that?
-- modified at 6:25 Saturday 20th October, 2007
|
|
|
|
|
ContextMenuStrip, is just a context menu, 'they' just changed the name a little.
Make yourself a ContextMenu(Strip) then set your Picture boxes ContextMenu(Strip) to it.
And in a situation where a property is not listed in the designer, and you KNOW its there, you can just add the line of code yourself, like:
this.Thing.Attribute = Whatever;
I don't think you can just add stuff tou the properties window like that. You'd have to inherit the base class, and add in the support for the designer.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Thanks for your advice!
|
|
|
|
|
Hello,
In my application the date is stored in the table in dd/MM/YYYY. I want this date to convert based on the culture.
I have seen lot of example but they all start with current date time.
Please suggest.
Regards,
Pavas
-----------------------
[http://longjump.com/]
Dynamic business applications that manage and coordinate teams and information
-----------------------
|
|
|
|
|
whatever works for the current date time should also work for an arbitrary date time,
the conversion is independent of the actual value of the variable at hand.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
mpavas wrote: In my application the date is stored in the table in dd/MM/YYYY.
First of all, you should store the date as a date in the database, not text.
If you do store it as a date, it's not stored in any format at all. A date value never has a format, it's only when you render it as a string that it gets a format.
When you render the date as a string, you can specify a CultureInfo or DateTimeFormatInfo object to use, which specifies the culture or format. You can also specify an exact format string to use.
mpavas wrote: I have seen lot of example but they all start with current date time.
Yes, that's how most examples are written. They demonstrate how a method works, you just have to apply the same method to the data that you have.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
He Gufa,
Thanks for the reply. I just got the solution and it follows the same guidelines as u provided
Thanks a lot
Regards,
Pavas
-----------------------
[http://longjump.com/]
Dynamic business applications that manage and coordinate teams and information
-----------------------
|
|
|
|
|
I Want To Load CrystalDecisions.CrystalReports.Engine To Make The Report Load Fast
ENG.M.Yahia
|
|
|
|