|
I am trying to get the owner/parent form of my CollectionEditor. I have tried looking in:
CreateCollectionForm()
And checking the return values properties such as Owner/Parent, but they are set to null.
Does anyone know how to do this?, and if its not possible via the CollectionEditor, how would i do this via P/Invoke as i am guessing this would be possible...
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Hello,
I want to interact with the website which is having Java Applet using C#.net or VB or VBA. That is send the command to Java Applet Application and after that copy the data from Java Applet Application.
Please suggest me about it.
Thanks in Advance,
Vanitha
|
|
|
|
|
Check out my article. hope this is you want.
JAVA.NET [^]
|
|
|
|
|
hi!
there is a path of log files present in system, lets say "E\Perl Logs\EDD\ex080318.log".
there will be two user entry by the user "Month" and "Year" , lets say "02" and"08".
I must get all the log files present by this date. log file present itself been names as 02 and 08 as i have shown in the path above.
Wht i have done, i have stored this path in a variable by the name "filename" .Right now i am getting all the files present in the folder.
any logic tht can be helpful to carry out this work
thnx
Shriya
|
|
|
|
|
|
Thnx for reply, but i wanted little more explanation, if u culd. coz i have taken out the files. wht culd be the best logic so that i can take out the files based on two parameters that is month and year. as of now i m getting all files. i m not geeting , from where to start
"2" and "8" respectively
|
|
|
|
|
You could use a regular expression to extract the year, month and day of the logfile using this regex:
[^\d]+(?<year>\d\d)(?<month>\d\d)(?<day>\d\d)\.log
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Hi all,
I am developing some custom windows controls and I want every control to be resized when used on the windows form. For example if there is a text box the user can extend the length by just extendeing the legnth of the control. I cannot do this succesfully at then moment I have tried to set AutoSize to true and the AutoSizeMode to GrowAndShrink but it doesn't work.
Do you have any examples?
Thanks in Advance
Tony
Here is my code for the control
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace UserControls.UIControls
{
public partial class LabelledText : UserControl
{
public delegate void EventHandler(Object sender, EventArgs e);
public event EventHandler onGetFocus;
public event EventHandler onLostFocus;
public LabelledText()
{
InitializeComponent();
}
public string LabelText
{
get
{
return lbl.Text;
}
set
{
lbl.Text = value;
}
}
public ContentAlignment LabelAlign
{
get
{
return lbl.TextAlign;
}
set
{
lbl.TextAlign = value;
}
}
public string TextBoxText
{
get
{
return txt.Text;
}
set
{
txt.Text = value;
}
}
public HorizontalAlignment TextBoxAlign
{
get
{
return txt.TextAlign;
}
set
{
txt.TextAlign = value;
}
}
private void LabelledText_Load(object sender, EventArgs e)
{
txt.BackColor = System.Drawing.SystemColors.Control;
}
private void txt_Leave(object sender, EventArgs e)
{
txt.BackColor = System.Drawing.SystemColors.Control;
}
private void txt_Enter(object sender, EventArgs e)
{
txt.BackColor = System.Drawing.Color.White;
}
}
}
|
|
|
|
|
Hi Tony,
Just Use Following Code in you Control.
private void UserControl1_Load(object sender, EventArgs e)<br />
{<br />
textBox1.Width = this.Width;<br />
}<br />
<br />
<br />
private void UserControl1_Resize(object sender, EventArgs e)<br />
{<br />
textBox1.Width = this.Width; <br />
}
Note : Change Control Name According to your control
Let me know when done !!!
Thanks
|
|
|
|
|
Thanks Abhijit that works fine.
However I have a label on the left of the textbox which I want the user to extend it. Also I want the label to get extended automatically when typing long text into it. For example if the text on the label is long like 'International Accounts:' the label should be extended to the size of the text in order to display the whole text.
Thanks in advance
Tony
|
|
|
|
|
Set the anchors for the text box.
|
|
|
|
|
How do I set the anchors for the textbox?
Sorry I am new to it
Thanks
Tony
|
|
|
|
|
In the designer if you select the text box and look in the properties grid there is one called Anchor in the Layout section. You can set which sides to anchor and when the form is resized the control will try to stay the same distance from the edge. However, I don't think a TextBox will stretch up and down unless you have Multiline set to true.
|
|
|
|
|
I am going to try it.
But how can I make the label extensible as well?
Thanks for your help
Tony
|
|
|
|
|
Hi all,
i make an application in which i use .Net Fontdialog box, but i want to customize it and want to hide the "Script" combobox from FontDialog Box. So i have a confusion from where i have to start ?
Any suggesion is welcome..
Rana Krishnraj
|
|
|
|
|
I don't know if it can be hidden - but the AllowScriptChange property will not allow it to be changed if set to false.
Dave
|
|
|
|
|
Hi Kjetil Svendsen,
Thanks for replying ...
But do u have any idea abt how to add label control in fontdialog box to displaying selected font name.
Rana Krishnraj
|
|
|
|
|
Krishnraj wrote: add label control in fontdialog box to displaying selected font name.
Its not possible. you have create own control for that.
|
|
|
|
|
FontDialog.AllowScriptChange = false;
Kjetil
|
|
|
|
|
Hi Kjetil Svendsen,
Thanks for replying ...
FontDialog.AllowScriptChange = false; - Its not work.
Have u read my question ? i want to hide(or say not visible to client) script combobox.
i also want to hide "StrikeOut" and "Underline" checkbox
Rana Krishnraj
|
|
|
|
|
I dont think it is possible to hide. its default windows Font dialog.
For that you have create your own custom Control
Thanks
|
|
|
|
|
hi people,
i have a problem, i'm having a screen , in that there are 6 text boxes are there, when the form load the cursor defaultly points outs the 1st text box, and for the next sequence of tab key pressing it should focus the next text booxes(2,3,4,5,6). i did assiginig numbers(tab index numbers) to every text box, but while running the screen i cant get it by order, at form load it focus some other control then at tab key pressing it goes ramdemly,
could you help?
self confidence+hard work=SUCCESS
|
|
|
|
|
Have you started tabindices from '0'?
|
|
|
|
|
yeah started from "0" and asigned all other controls as in the correct order of number, but even when i try to get CurrentFocusTabId = CurrentFocusTabId.ToString(); i couldn't get the current control's tab index id
self confidence+hard work=SUCCESS
|
|
|
|