|
I made simple SideBar menu like Outlook has and I want to add design time support inside of VS.Net to drag controls onto it the various menu choices.
Can someone please post a link to an article that has added design time support to a custom user control?
Thanks.
|
|
|
|
|
|
Do you know of a link that is for design time support for a regular windows control?
The methods that are overrided in that ASP.NET example don't seem to have a counterpart from to override for normal winforms programming.
Thanks,
Brad
|
|
|
|
|
I have a source file with bunch of text in it. There is a function there, called GetName("Some name"). I need to scan the file for that function and get all the names it tries to load.
So for example, GetName("Jon") should return "Jon" to me. I need to write a regex for that. The regex needs to be simple and not try to do any sort of validation. So GetName("123 lalala") is ok. I dont need to check if the name is a string and all that. I am just interested in whatever is between the quotations inside the GetName() function. Please help.
|
|
|
|
|
GetName\(\"([^\"]*)
should do it. That says match GetName(", then match everything before the closing quote into a group. I think. expresso is the tool you need to check/work with regex.
-- modified at 18:05 Wednesday 23rd August, 2006
I forgot the last ), but I've tested it now and it works fine as written above.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thank you, I tested it in expression, and it works great, but with little problem thoough.
Say I have this text: GetName("Igor")
the expression would return "Igor", which is good
but If I have GetName("Igor", the expression will also return "Igor", eventhough the last bracket is missing. I tried sticking \) in the expression in a couple of places, but produced an erronous expression.
-- modified at 18:50 Wednesday 23rd August, 2006
|
|
|
|
|
\) at the very end will add an ending bracket requirement. I didn't put it because it seemed superfluous
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
oh, that works. True, there is no real need for \) at the end, I will afterall be parsing a C# file, but just to be safe . thank you!
|
|
|
|
|
Nigor wrote: I will afterall be parsing a C# file,
In that case you may need to check for GetName( "Some name").
Paul
|
|
|
|
|
In work place of VB.net if a .vb file is selected (as .cs in VC#), the work place shows 2 lists under .vb & .vb[design] tabs (Class Name list & Method Name list)
a. Let say we have a MAIN.vb and a MAIN.frm that has a START button (sub-list) in it. If we select MAIN in Class Name list, then we will see START component in that list
b. If we select START in the list then in the Method Name list will show a list of methods (ie: Click, TextChanged ...)
* In VC# we can not see the sub-list of (a) & in (b), it only shows whatever we have already used (not showing availbale list)
Anyone know how to view (a) & (b) in VC# as in VB?
Thanks for any help
|
|
|
|
|
Are you talking about intellisense? It works fine for me.
|
|
|
|
|
I created a bound DatagridView and added an unbound DataGridViewComboBoxColumn and for each rows in the datagrid I add items to cell of the unbound column. What I find strange is that I see items count greater than zero and the values are there in each of the cells looking at the datagridview through the debugger but they don't show up for the user. I see the arrow down but no values are shown.
Not sure maybe I forgot some setting for the values to show ?
Confused but hopefull
|
|
|
|
|
i need one easy way to generate random number between two limits...
maybe some like this...
random_number=Random(maxValue,minValue)
can someone advise to me?
thanx for help
and sorry about my bad english
|
|
|
|
|
|
Hello
Use the Random.Next(MinValue, MaxValue) method
Regards
-- modified at 16:04 Wednesday 23rd August, 2006
|
|
|
|
|
May I suggest you read the documentation on the Random[^] class yourself. What you proposed is entirely unnecessary.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Forgot about Next(int32, int32). Still used to the old C++ Rnd.
Thanks for the gentle nudge
Regards
|
|
|
|
|
Now I'm curious about what you originally suggested.
|
|
|
|
|
Hello
Promise you won't fry me afterwards?
I suggested using a seed then checking the value using an if statement.
Silly, isn't it?;P
Regards
|
|
|
|
|
I want to have a delegate inside an attribute
public class MyAttribute : Attribute
{
public delegate T updater( T myVar);
}
is that possible?
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Hello
After some modification to your code it compiles. yes you can have generic delegates in attributes, yet why?
Here is your code modified:
public class MyAttribute : Attribute
{
public delegate T updater<T>(T myVar);
}
Regards
|
|
|
|
|
I have a windows application with a hosted web browser control, and need help regarding an issue:
The simple details:
Is it possible to have a hyperlink in a web browser control (within aforementioned windows application) output the hyperlink as text to the windows application it is hosted in without processing the link?
i.e. instead of http://www.microsoft.com/Any_Article.pdf opening a PDF reader, it outputs the html as a string to a messagebox, without opening the PDF reader program.
The in-depth details:
I have a tabControl with an InfoPath form control (Microsoft.Office.InfoPath.FormControl) on tabPage1 and a webBrowser control on tabPage2. I can programatically open any infopath *.xml form using C# (including not letting the form open as read-only) or fill out a new form from a *.xsn form template, and in the browser I can navigate (using custom buttons) our sharepoint site which hosts the xml forms. The problem is that IE6 opens the *.xml forms using Mircosoft Office InfoPath, and in my hosted application, I'd like the string of the link returned so I can open it within the form control, without (another) InfoPath starting outside of my app. Maybe, I should force the user environment to use a different program to open an *.xml file, a program that I'd write, that somehow redirected that link as a string back into the original windows app???
|
|
|
|
|
Hello
Well, you can get the document of the web borwser using the Webbroser.Document property. Cancel the navigation, get the URL, now either send a webRequest yourself and get the webresponse as a stream, or use the WebBorwser.Document mentioned above.
Regards
|
|
|
|
|
Thank you very much. I'll try to hack something together with your suggestions.
Josiah
|
|
|
|
|
Greetings,
I've been busy with other things, and just yesterday got around to doing what you suggested. I tried searching the statustext of the link just clicked, and stopping it immediately if it matches a desired string. I put something like this:
if (webbrowser1.statustext ends with ".doc ") /*not what I actually have, but logically similar*/
{
webBrowser1.Stop();
MessageBox.Show("This shouldn't open MS Word after you click 'OK'");
}
But after you click 'OK,' MS Word (the full windows MS Word application) opens the document listed in the link that was clicked, and not in the hosted form control within he custom application I'm developing; programatically, though, I am able to open documents (local and networked) in the hosted form control with ease:i.e. formControl1.Open("C:\test.doc"). I think I must be searching the wrong string? maybe telling the wrong thing to stop???
I did some more searching online, and the closest thing that I can find is a tutorial about using a button, an ActiveX control, and preventing the OS from opening Word, but opening it in your custom ActiveX control. This is similar to what I'm doing, but instead of the button, I'm using a hosted web page (browsing a sharepoint website hosted within our domain) and I'm not using ActiveX. (Here is that link: http://support.microsoft.com/kb/304662)
Thanks for any info you can offer.
If this is still unclear, I'll be more than glad to explain it better.
|
|
|
|