Hi Thanks for all your replies. I have found my error. I used InitializeComponent(); both in the constructor Form1() and in Form1_Load(object sender, EventArgs e) I am so sorry for my misstake, but know it's working as it should :-D Many thanks Fia
fiaolle
Posts
-
Can't change a button't text at runtime anymore?????? -
Can't change a button't text at runtime anymore??????Hi I am changing the folder to visible or not visible. But nothing is helping me. Thanks Fia
-
Can't change a button't text at runtime anymore??????Hi It changes to "WTF" in the code, but after the event. The buttons text is "Test"????? Thanks Fia
-
Can't change a button't text at runtime anymore??????Hi I tried that and the text is "Test". I tried also to remove all Alva controls, but I still can't change the text on the button. :( Thanks Fia
-
Can't change a button't text at runtime anymore??????Hi I can't see any difference. Here is my code.
private void btn_Click(object sender, EventArgs e)
{
if (folder.Visible==true )
{
btn.Text = "Hi";
}
else
{
btn.Text = "By";
}
}The variable folder is just a bool variable. When I debug my code I can see that it runs as it should, but still the button's Text doesn't change. I don't know if it has anything to do with the problem, but I have a FileLListbox and a FolderListBox from Alva on the form. Should that be the problem. Many Thanks Fia
-
Can't change a button't text at runtime anymore??????Hi Thanks for your answers. I have already stepped through the code and it's running as it should, but the button's Text still doesn't change. I don't understand what to do????. Many Thanks Fia
-
Can't change a button't text at runtime anymore??????Hi again What I mean with "nothing happens" is that the button btn's text is still By.Even if the bool folder's property Visible is changed to true. I have tried I have the code in the buttons click event.
private void btn_Click(object sender, EventArgs e)
{
if (folder.Visible==true )
{
btn.Text = "Hi";
}
else
{
btn.Text = "By";
}}
I have tried btn.Invalidate(); and Form1.Invalidate(); it didn't help. And I also tried with Refresh() and Update() on both btn and Form1. Dear KP Lee I don't understand how to or what you mean I should do "I fixed that by assigning a delegate in the winapp, running the calculations on another thread and calling the delegate." Many Thanks Fia
-
Can't change a button't text at runtime anymore??????Hi When I could change the text at runtime, I think the property was called Capture. How do you do in Visual Studio 2010? If I set the button btn's property Text to "By" and try the below
btn.Text="Hi"
nothing happens. How do I do it nowadays :confused: Many Thanks Fia
-
Can anybody explain how this Regex works.Hi What do you meen by something? I can write any characters I want in a word or a string. For example the text can contain 'hello by "to much" 10'. Thanks Fia
-
Can anybody explain how this Regex works.Hi Thanks for all replies. I'm trying to get words and if there are strings between quotes get that too that users have entered in a textbox. But I still don't understand how the string regexSplitter works. And I still don't understand why it has to be a space last in that string. Because when I remove it, it doesn't work as I want. Thanks Fia
-
Can anybody explain how this Regex works.Hi I'm using C# and I have the regex below to split words and not split a string ".. .." instead take the whole string as on item to a List. Example: text="all "1 dl"" after split all[0]="all" all[1]="1 dl" I found it in Google and it works, but I don't understand how it works.
string regexSpliter = @"(?<=^(?:[^""]*""[^""]*"")*[^""]*) ";
List all =new List_ (System.Text.RegularExpressions.Regex.Split(text, regexSpliter));And if I remove the space before the last " in the string it doesn't work as I want. It seems like it splits all the characters in to elements written in the string text. Can anybody please explain the string regexSplitter and why it has to be a space last in the string. Many thanks Fia
-
Can anyone explain how this Regex works?Hi I have the regex below to split words and not split a string ".. .." instead take the whole string as on item to a List. Example: text="all "1 dl"" after split all[0]="all" all[1]="1 dl" I found it in Google and it works, but I don't understand how it works.
string regexSpliter = @"(?<=^(?:[^""]*""[^""]*"")*[^""]*) ";
List all =new List_ (System.Text.RegularExpressions.Regex.Split(text, regexSpliter));And if I remove the space before the last " in the string it doesn't work as I want. It seems like it splits all the characters written in the string text. Can anybody please explain the string regexSplitter and why it has to be a space last in the string. Many thanks Fia
-
Is there a way to detect a mouse click in a Word document in my form?Hi :-D Thanks for all the replies. I have found a solution. Microsoft.Office.Interop.Word.Application ap; Microsoft.Office.Interop.Word.Document doc;
ap = new Word.Application();
ap.WindowSelectionChange +=new ApplicationEvents4_WindowSelectionChangeEventHandler(ap_WindowSelectionChange);
doc = ap.Documents.Open(path, ReadOnly: false, Visible: true);private void ap_WindowSelectionChange(Microsoft.Office.Interop.Word.Selection Sel)
{
}When I click in the doc I have opened the event ap_WindowSelectionChange runs. Fia
-
Is there a way to detect a mouse click in a Word document in my form?Hi I'm sorry I haven't found anything that helps me or I'm not understanding the examples. Is there anybody who can help with some code how to do this. Please Thanks Fia
-
Is there a way to detect a mouse click in a Word document in my form?Hi Thank you for the answer. Can you give me a code example. The only thing I want to know if the users click on the word document. I'm using these objects
ap = new Word.Application();
doc = ap.Documents.Open(path, ReadOnly: false, Visible: true);Many Thanks Fia
-
Is there a way to detect a mouse click in a Word document in my form?Hi I'm woundering if there is a way to detect a mouse click in a Word document that I have opened in my Form. Many thanks Fia
-
How to highlight all occurrences of a word in a Word document??Hi I have already tried that but it doesn't work. I have no idea how to solve this. If anyone knows please help. Thanks Fia
-
How to highlight all occurrences of a word in a Word document??Hi Thank you, that was smart. But when I record a macro that does what I want and later tries to run the macro nothing happens. I don't understand why? Do you have anymore suggestions. Many thanks Fia
-
How to highlight all occurrences of a word in a Word document??Hi Thanks for your reply, but I have already tried that, but nothing changes. It just selects the last occurrence of the word. I really don't want to use a macro. Aren't there another way to accomplish this. Many thanks Fia
-
How to highlight all occurrences of a word in a Word document??Hi I want to highlight or more like select all the occurrences of a word. But I have googled a lot and haven't found anything about that. When I have tried, it just selects one appearance of the word, the last.
Word.Application ap = new Word.Application();
doc = ap.Documents.Open(path, ReadOnly: false, Visible: true);
ap.Selection.Find.ClearFormatting();
ap.Selection.Find.Text = txtFind.Text;
ap.Selection.Find.Execute();
while (ap.Selection.Find.Found)
{
ap.Selection.Select();
ap.Selection.Find.Execute();
}
doc.Activate();
ap.Visible = true;
ap.ActiveWindow.SetFocus();I have tried so many different approaches, but haven't been able to solve it. I don't want to highlight the words, I just want them to be selected as they are when you choose find all in Microft Word. Hope somebody can help me. Many thanks Fia