|
Hey thanks Frank.
Got it. I knew a long procedure, to have a default value. This thing is the most efficient one that I found till date for the purpose.
Thanks once again.
Keshav Kamat
India
|
|
|
|
|
Hi,
I have a weird problem. You can color a button by button.BackColor = ....;
In the design window I see the colored button, but when I will simulate the program, the buttons are just gray (default). Is it cause of WindowsCE?
I can color the form or change the font of the text in a button, but I can't color a button.
Thanks in advance
|
|
|
|
|
check the appearance property of button it might be set on System
|
|
|
|
|
At the properties window, I don't see something is set on System. The following things are there:
-Appearance
+Font
Text
-Behavior
...
...
...
but nothing else what is set on System
|
|
|
|
|
Hi guys,
I needs some help with this challenge I'm facing please.
This is my challenge:
I have a string with "parent object" and item in the format of pipe delimited between "parent objects" and comma delimited between items. Like this
string sample = "Object1,Item1,Item2-Object2,Item1,Item2-Object3,Item1,Item2";
How will I go about manipulating the string to use the "objects" and items in this format.
I basically need to get the "object" and the items and in some cases I will need to work with one entire entry at a time, lets say Object1,Item1,Item2 .
I am not to familiar with the System.String functions yet and would love if anybody around here could show me how this could be done or possibly some references.
Thanks.
R
|
|
|
|
|
Hi
I have added comments for each line. Hope it helps you.
string StrObjectItems = "";
StrObjectItems = "Object1,Item1,Item2-Object2,Item1,Item2-Object3,Item1,Item2";
string[] StrObjectsArray = StrObjectItems.Split(new char[] { '-' });
for (int i = 0; i <= StrObjectsArray.GetUpperBound(0); i++)
{
string StrObjects = StrObjectsArray[i].ToString();
string[] StrItemsArray = StrObjects.Split(new char[] { ',' });
for (int j = 0; j <= StrItemsArray.GetUpperBound(0); j++)
{
string StrItems = StrItemsArray[j].ToString();
}
}
-- modified at 5:23 Tuesday 6th March, 2007
Rate this message. Thank you. Harini
|
|
|
|
|
I don't see any pipe (|) characters in the string. I suppose that you mean that the parent strings are delimited by a dash (-).
To get the parent string in an array, split on a dash:
string[] parents = sample.Split('-');
The property parents.Length will give you the number of strings.
To get the child strings of a parent, split it on a comma:
string[] children = parents[0].Split(',');
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks to both of you that replied.
It all makes sense now.
Thank you once again!
R
|
|
|
|
|
Hi.
the following line looks for the character '-' in the string.
the flag checks whether it is true or not.
then it checks where the character is found, and the substrings are taken into other strings.
bool flag=false;
flag=sample.Contains("-");
if(flag==true)
{
int m=sample.IndexOf("-");
string s1 = sample.Substring(0, m); // s1 will contain Object1,Item1,Item2
sample = sample.Remove(0, m+1); // now the sample will contain
//Object2,Item1,Item2-Object3,Item1,Item2
}
Hence you can repeat the procedure to store the other substrings, maybe in a string arraylist.
i hope this helps.
keshav kamat
siemens india
|
|
|
|
|
Alternatively,
one can use the Split funtion depending upon a special character.
string[] string1=sample.Split("-");
the number of members are identified by the string1.Length property, which will give you the count of the members in the new string after the split.
Keshav Kamat
India.
|
|
|
|
|
Hi all !
Tell me please if anybody use Add-in technology for Ribbon in MS Word 2007
How I can create a new button in ribbon using Add-in in document-level (not in application level).
|
|
|
|
|
I'm trying to connect to an access DB remotely. I'm using a web server to access this DB. Is it possible to connect to an access DB in this way??
Or I must use someting else like SQL server for doing that?
|
|
|
|
|
You need write permission on the webserver, which leaves you with a pretty unsafe situation. I'd recommend something like SQL Server or creating a webservice which manipulates your acces database server side...
|
|
|
|
|
i am using a web service which manage this connection string:
EncoderData.DataManager.Constants.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=\\\\" + host + "\\data\\BroadcastingData.mdb";
where "host" is the computer name of the remote server.
is that a right connection string ??
thanks in advance !
|
|
|
|
|
That is i have set access rights for windows login users but i need do to the code for login windows users please send me some idea about this concept if u have send me the code
|
|
|
|
|
|
This doesn't make any sense at all. We have no idea what you're trying to do.
wrote: i need do to the code for login windows users
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
dears i want to create setup project that would make a setup file to be installed on windows system. so i created the project by reading the help but it finally did not work. it creates a .msm file .how can i get setup file that should run by double click. and do the task which is assigned to it...
thanks in advance
|
|
|
|
|
Hy
I have a problem.
How can I do if I have a textbox on a form and I need to put on front a panel who is transparent.
I don't know how can I make the Panel transparent.
Any suggestion?
10x
|
|
|
|
|
sets it's(panel's) back color to the color of parent.
|
|
|
|
|
I put that but I have access to the textbox component and I don't want that
|
|
|
|
|
okey!..
according to desired behaviour or your code hide either TextBox or Panel
myTextBox.Visible=false; or myPanel.Visible=false;
|
|
|
|
|
It's not OK.
I need a panel to front of textbox.
I need to see the textbox when the panel is steel there (invisible) on front of textbox.
|
|
|
|
|
i am unable to understand scenario.what's you need and what do you want.
rest for your information.
a child control can not be seen if its parent is invisible.you can do one thing.when your parent control is getting hide remove your child from there and add it on parent of parent control.
|
|
|
|
|
You have a big problem. A control that has it's BackColor set to Transparent is NOT really transparent. It mearly tells the control to take on the background settings of it's parent container.
If you set the BackColor of the Panel to Transparent, only the background of the form will show through. Controls sitting behind the Panel will NOT show up!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|