|
Hi,
you must add a reference to the system.design.dll file in your project.
|
|
|
|
|
how can i get the numbers of days of a month dynamically by giving the month number and the year(not required)
thanks
etretyertyery
|
|
|
|
|
use the static DateTime Member functions
int daysinMonth = DateTime.DaysInMonth(2007, 1)
|
|
|
|
|
Hey
I created one windows service and created the set and deployment project for that
I installed this service successfully at the client machine
now I want to see each step of the installation process on the client machine
Is byy default windows installer creating the install.log file or we have to create it?
if it is by default whats the location of the file?
or if we have to create how can it be?
please guide me...
Thanks in advance
|
|
|
|
|
If installutil is used it is located where the exe for the window service is located.
Ben
|
|
|
|
|
Hello,
I haven't tried to install a windows service with a setup project yet. I always install them manually since there can be issues. Perhaps you should try to use the installutil manaully and see if the log files show up. I guess another option for the install logs would be where the setup.exe was run. The log files should have an extension of *.INstalllog or *.InstallState So you could do a search for those extension. The * is replaced with your exe name for your windows service.
Hope that helps.
Ben
|
|
|
|
|
I use get_selection to get the source code selected by mouse,and then I try to match it in whole html text source code,and now I hope to let the matched html block to be translated into corresponding IHTMLELEMENT,how can I do next step?
For example,there is the following code:
help
I selected "" and want to use red line to surround the table,who can give me some advices?thks.
|
|
|
|
|
hi,
please post you question in the right forum. that way you will get you answers quickly and with more accuracy.
regards
|
|
|
|
|
|
Dear All,
I am making a Windows Control Library(user control) using VS.NET & C#.NET. Now, i am
facing 3 problems:
1.In this control, i wants to remove some of the properties which are available by
default to the controls. These properties must be removed from the 'Properties window'
of the usercontrol. Also the user must not be able to set these properties using code.
I am able to remove the properties from the 'Properties window' by inheriting a class
from the System.Windows.Forms.Design.ScrollableControlDesigner & removing the properties
by overriding the PreFilterProperties function as show below:
protected override void PreFilterProperties(System.Collections.IDictionary
properties)
{
properties.Remove("BackColor");
}
But, doing so, this property is available to be set from the code. How can i remove this
property fully?
2.I wants to create a property for the control which has sub properties, like the
'Location' property of a button, which has sub properties as 'X, Y & Locked'.
My new property for the control must have some subproperties like this. How can i
achieve this?
3.I wants to add a property to the user control which allows the user to select a color.
When the user selects this property, it must display the same options which are
displayed for selecting the color for the satndard properties like 'BackColor'. Then the
user must be able to select the required color from these options & the value must be
stored in that specific property.
Kindly help me to acheieve the above scenarios
Best Regards,
Abhilash Chandran
|
|
|
|
|
hi,
well it seems that you have partly solved question 1.
you could also use the attribute: [Browsable(false)] on the properties that you don't wan't to show.
i don't know how to remove the property completely, but you could override the existing property and disable the set part.
question 2 : don't know
question3: you can add new properties that you want with the right data type
if you wanted to set the 'BackColor' property you could do:
[Browsable(true)]
public override Color BackColor
{
get{return this.bkColor;/*or base.BackColor; or any color*/}
set{this.bkColor=value;/*or base.BackColor=value; or what ever ...*/}
}
hope this helps
regards
|
|
|
|
|
Hi.
thank you for the information.
i will try that..
But the 3rd requirement is slightly different than wht u have mentioned.
I will make it more clear.
For eg: i am making a user control.
I adds a property called MyColor to it, which accepts a color as the value.
Now, when i uses this control in allications, the properties window for the control displays the MyColor property
When the user clicks to select the value for the myColor prperty, the color pallate must be prompted to the user from where he can select the color, like the color pallates displayed to select the color for BackColor property.
is there any method to achieve it.
Kindly help me
Best Regards,
Abhilash Chandran
|
|
|
|
|
hi,
so, it seems that you want to create your own property. it isn't that hard.
try this:
private Color _myColor;<br />
<br />
[Browsable(true),Description("This property will set myColor")]<br />
public Color MyColor<br />
{<br />
get{return _myColor;}<br />
set<br />
{<br />
_myColor=value;<br />
this.Invalidate();<br />
}<br />
}
if you do this, you will have access to _myColor and when used in VS, the property tab will display the color that the user can select from.
hope this helps
regards
|
|
|
|
|
|
Dear All,
I am making a Windows Control Library(user control) using VS.NET & C#.NET. Now, i am
facing 3 problems:
1.In this control, i wants to remove some of the properties which are available by
default to the controls. These properties must be removed from the 'Properties window'
of the usercontrol. Also the user must not be able to set these properties using code.
I am able to remove the properties from the 'Properties window' by inheriting a class
from the System.Windows.Forms.Design.ScrollableControlDesigner & removing the properties
by overriding the PreFilterProperties function as show below:
protected override void PreFilterProperties(System.Collections.IDictionary
properties)
{
properties.Remove("BackColor");
}
But, doing so, this property is available to be set from the code. How can i remove this
property fully?
2.I wants to create a property for the control which has sub properties, like the
'Location' property of a button, which has sub properties as 'X, Y & Locked'.
My new property for the control must have some subproperties like this. How can i
achieve this?
3.I wants to add a property to the user control which allows the user to select a color.
When the user selects this property, it must display the same options which are
displayed for selecting the color for the satndard properties like 'BackColor'. Then the
user must be able to select the required color from these options & the value must be
stored in that specific property.
Kindly help me to acheieve the above scenarios
Best Regards,
Abhilash Chandran
|
|
|
|
|
I'm trying to simulating a button containing in a form.By reading some reference articles,I'd seen that most of them suggested to use webbrowser control,and then acquire htmldocument2 dispatch to get IHTMLInputButtonElement interface.But I'm now doing real time system,it demanded to get infos as soon as possibly,so I must use multiple threads to solve it.From some articles,I heard that webbrowser control cannot be used in multiple threads environment.So what's the better way?
|
|
|
|
|
In MS Excel, how can I get 1st & last date & 1st Date of next month of a particular month, just by entering the Month or Month & year?
|
|
|
|
|
Are you programming Excel, or entering stuff into it ? Windows Forms means the .NET Framework windowing classes, it doesn't relate to Office.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
A Tooltip with TTF_TRANSPARENT and TTF_TRACK tool gets the focus, if I used
under Windows XP the
manifest-style and click with the mouse on the tooltip. But I want, that the
tooltip dispaths
the messages to the window, that is under the tooltip. I have searched in
the world wide web about
this problem, but did not found other persons with the same problem. I have
tested other
example-applications from www.codeproject.com, with a litle modification
(the tooltip was only
shown, but not hidden) and the tested applications have the same problem. I
don't know, how Microsoft
use in the VC6.0 in the Workarea-Window also an tooltip-window, because they
haven't the same problem.
The following source-code is from my test-application. The program is a
simple MFC-dialog-program,
the dialog includes an OK- and Cancel-button. m_wndToolTip is from
CToolTipCtrl.
void CTooltiptestDlg::OnOK()
{
TOOLINFO TI;
char caText[1024];
static long nIndex = 0;
CRect rectTemp;
CFont* pfont;
CWnd* pwndOK;
memset(&TI, 0, sizeof(TI));
TI.cbSize = sizeof(TI);
sprintf(caText, "nIndex=%d", nIndex);
TI.lpszText = caText;
if(IsWindow(m_wndToolTip) == FALSE)
{
m_wndToolTip.Create(this, TTS_ALWAYSTIP | TTS_NOPREFIX);
m_wndToolTip.SetMaxTipWidth(SHRT_MAX);
//Add tool
TI.uFlags = TTF_TRACK | TTF_TRANSPARENT;
m_wndToolTip.SendMessage(TTM_ADDTOOL, 0, (LPARAM)&TI);
}
else
{
//Modify the text of the tooltip.
m_wndToolTip.SendMessage(TTM_UPDATETIPTEXT, 0, (LPARAM)&TI);
}
//Take over the font from the dialog.
pfont = GetFont();
if(pfont != NULL)
{
m_wndToolTip.SetFont(pfont);
}
//Set the position of the tooltip.
pwndOK = GetDlgItem(IDOK);
pwndOK->GetWindowRect(&rectTemp);
m_wndToolTip.SendMessage(TTM_TRACKPOSITION,
0, (LPARAM)MAKELONG(rectTemp.left, rectTemp.top));
//Show tooltip
memset(&TI, 0, sizeof(TI));
TI.cbSize = sizeof(TI);
m_wndToolTip.SendMessage(TTM_TRACKACTIVATE, TRUE, (LPARAM)&TI);
//Increment the static index
nIndex++;
}
I haven't called the CToolTipCtrl::RelayEvent-function in
CWnd::PreTranslateMessage, because the tool
is added with TTF_TRANSPARENT and TTF_TRACK, position with TTM_TRACKPOSITION
and showed with
TTM_TRACKACTIVATE.
Can anybody help me???
Johannes Ody
|
|
|
|
|
i want to display the name starting with any letter(A-Z,a-z) in textbox from sqldatabase through datagrid using vb.net windows application.
for example,
values are in datagrid like
companyid companyname contactperson city
1 IBM rajesh Bangalore
2 Wipro kannan Chennai
here companyid, companyname, contactperson,city are field name.
companyid is primarykey.
in my form there are 4 label and 4 textbox.
1st label name as Findlabel
2nd label name as companynamelabel
3rd label name as contactpersonlabel
4th label name as citylabel
1st textbox name as findtextbox
2nd textbox name as companytextbox
3rd textbox name as contactpersontextbox
4th textbox name as citytextbox
i want to display company name starting with any letter.if i type wipro in findtextbox,then i click findbutton means the values will automatically diplay in other 3 textbox(ie..wipro in companytextbox,Kannan in contactpersontextbox,chennai in citytextbox).
if i type IBM in findtextbox,then i click findbutton means the values will automatically diplay in other 3 textbox(ie..IBM in companytextbox, rajesh in contactpersontextbox,Bangalore in citytextbox).
so i want to display starting with any letter.i am doing these project in windows application using vb.net.plz help me.
|
|
|
|
|
Are there any good tools for distributing a small c# app which would set up the .NET framework on a clientPC if needed?
Also, so much of Visual Studio seems focused on web development. Are writing desktop apps with c# a thriving concern, or would there be better tools out there?
Thanks!
John Held
|
|
|
|
|
In the past I have added a new project to my window app's, from the Other Project Types & Choose 'set up & deployment' type. This will create an .msi file & in here you can select pre-requisites like - checking for the .net framework.
Hope this helps,
Janet
|
|
|
|
|
|
Thanks so much Janet and Ben! Your info really helps!
John Held
|
|
|
|
|
John Held wrote: Are writing desktop apps with c# a thriving concern
Well, there seem to be quite a few jobs out there which ask for this. But I suspect that most of these are for corporate applications rather than the mass market. However, Microsoft have a number of such apps. floating around, e.g., XML Notepad, Paint .NET; and much of the UI parts of recent apps. are Win Forms based.
Kevin
|
|
|
|
|