|
Marking the post as urgent and requesting urgent help is very rude around here.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hai...sory sory...im new for thees messages ......i dono how 2 write...forgive me yar...
|
|
|
|
|
If you are new here then you should have read this[^] correct?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi sir,
i am work in c#. my problem user defined color change one form to another form
then help me,
pls reply me
|
|
|
|
|
Not sure what you are asking. Do you want to let user change the color of your forms?
You can use a ColorDialog and then set the choosen color as the Backcolor of the form using BackColor property.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Hello
I have a question or two and maybe someone here can help, i thank you in advance , i am kinda new with C# language
I need to modify a number in a text and then repeat that block of text several times , and i have an exemple
POSX (10,23,11,19)
POSY (19,14,12,19)
L43,xf-rt0001,18
POSX (10,23,11,19)
POSY (19,14,12,19)
L43,xf-rt0002,18
POSX (10,23,11,19)
POSY (19,14,12,19)
L43,xf-rt0003,18
I want to make something like this with the underline number , number of times been given from a textbox , i mean if i write in the textbox 34 for exemple the block of text will repeat 34 times and the underline number will increas for 0001 to 0034 .
Thanks a lot again
|
|
|
|
|
Things to read up on
Loops, while and for loops will help
string.format for formatting your numeric into a string with the padded 0
You should get hold of a book[^], read through it and work the examples.
|
|
|
|
|
It's unclear exactly what you want to do - but pseudo code you want something like:
int startNumber = 1;
string firstLine = "POSX (10,23,11,19)\n";
string secondLine = "POSY (19,14,12,19)\n"
string thirdStart = "L43,xf-rt";
string thirdEnd = ",18\n\n";
theNumberOftimesIWantToRepeatIt 34;
for (int i = 0;i < theNumberOftimesIWantToRepeatIt; i++)
{
PRINT(firstLine);
PRINT(secondLine);
PRINT(thirdStart + (startnumber + i).ToString(D4) + thirdEnd);
}
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Hi All,
I want to design a custom window control which can be derived from textbox and to which i can add another control like month calendar or keyboard panel. I have tried user control for this but then i can't derive this from textbox and if i design a custom control that derives from textbox class then how i can add keyboard panel/ month calendar to it?
If i have to design a web control instead of window control then i can add controls to inherited textbox control via rendering the required html. but how this task can be done in window control?
[Addition]The idea in my mind is design it like user control and then expose the required properties/ event through the custom control. Is it a right solution? or is there a better solution for this problem?[/Addition]
|
|
|
|
|
Why are placing all that inside a TextBox? Maybe if you can tell the purpose of having such control, one can respons in a better way.
You can create a user control that will have a TextBox, and a Keyboard panel and a month calendar.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
It is posible to add extra control to a textbox by inheritance, but it is not simple. A drop down control can be added by dynamically displaying the dropdown control positioned relative to the textbox in it's parent at runtime in appripriate event eg. the right mouse click.
However most often you would want a User control to do this. It is much easier.
Out of interest, why would you want a keyboard drop down on a windows app? Or are you developing for Windows mobile? Sorry, even then it does not make sense to me. And a calendar drop down only makes sense on a date picker which already has one. What is it that you really want to add to the textbox?
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Create a UserControl and add the constituent controls in it, for example, text box, month calendar, etc. Expose the properties, events and methods of the constituent controls by creating properties, events and methods for the UserControl and mapping them to the constituent controls. For example:
class MyTextBox {
TextBox textBox1 = new TextBox();
EventHandler TextChanged;
public MyTextBox() {
textBox1.TextChanged += EventHandler(textBox1_TextChanged);
}
public string Text {
get { return textBox1.Text; }
set { textBox1.Text = value; }
}
private void textBox1_TextChanged(object sender, EventArgs e) {
if (TextChanged != null)
TextChanged();
}
public void Clear() {
textBox1.Clear();
}
}
Custom controls can only be used to extend the functionality of an existing control. You cannot add additional controls to it.
|
|
|
|
|
Thanks to all for taking intrest in my problem. Now i just understood that i am making some mistake. When i searched CP more, i got this article A Touch Screen Keyboard Control in WPF[^]. It was my exact requirement but i have to design a window control not WPF.
Now i got the idea from this article that i should display the keyboard panel as another window not to include panel in the control itself.
|
|
|
|
|
If you really need a new window for the keyboard, fine. Or else you can create a user control with SplitPanel where one panel will have the textbox and other would have the keyboard.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
but then my problem remains same that i won't be able to inherit this control with TextBox so that all it's properties and events are avialable to the Control User. So now if there is any idea for this problem then i'll be really thankful to you.
|
|
|
|
|
If you have a user control containing (say) a TextBox, you can make the required properties of the textbox visible by implementing them in the UserControl.
Usually you wouldn't want the user of your control to have complete access to the textbox's properties - but certain properties can be exposed as you need...
public TxtBoxText
{
get {return textBox1.Text;}
set {textBox1.Text = value;)
}
and so on.
So users of your control can use
myUserControl1.TxtBoxText = "WhateverIWantToSetItTo";
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Thats what i am thinking from starting but i was not sure that this is the only solution or it's a good approach. Thanks to you all.
|
|
|
|
|
Touch screen. now it all makes more sense.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
hey all
with the help of eduard's response for my previuos message "windows service installation" i have installed my application and service both, but when i start my service it is giving following message and stops
"the service on local computer started and stopped. Some services stop automatically if they have no work to do for example the performance logs and alert services"
can u help me with this
thanks for responses
regards
narendra singh
|
|
|
|
|
The message is self explanatory, your service is starting, finishing processing whatever you told it to, and then stopping.
What is the service supposed to be doing that would keep it running?
|
|
|
|
|
yes scott i m agree with u but it is not performing the actions defined within onstart(), service have to send a message and then it should be stop
|
|
|
|
|
Where is it sending a message? Is it connecting to a server socket and sending a message or what?
|
|
|
|
|
actually it is sending a e-mail message to wish happy birthday
by taking the dob from the database
|
|
|
|
|
Then it is probably sending the e-mail and failing but it is not notifying you that it failed.
Try running the code in a normal application and see if the e-mail is sent.
What account are you running the service under?
|
|
|
|
|
actually i m using single database in both application as well as service. but sql server is not allowing to access the database which is already in use, it is generating a error which says .mdf file is already in use, i m running service under local system
thanks for ur response
|
|
|
|