|
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
|
|
|
|
|
i am using vb.net 2003.i am doing my project in vb.net windows application.
how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime.
for example,
values are in datagrid like
name age rollno city
ramu 22 68 chennai
rajesh 23 70 cbe
kamal 21 52 salem
arun 25 04 trichy
here name,age,rollno,city are field name.now i want to remove selected row permanently from sql database through datagrid.In this datagrid,if i select "kamal" row(kamal,21,52,salem) means,that kamal row will remove permanently from sql database.how to do these.i want in vb.net windows application,not web application.plz help me.
|
|
|
|
|
As far as I understood from problem, the simple answer is to fire a delete query on the database with where condition.
Befroe that you can get the row items by trapping the cell clicked event.
it will give you the row number and from its items list you can build the quesry.
Hope this helps
|
|
|
|
|
Hi
my be I can imagine you database Schema !!
assume that you have a table like this
Table Name = Table1
Table Fields
Name | Age | Home
----------------------------
stark | 25 | MyHome
sonya | 21 | HerHome
if you want to delete "stark , 25 , MyHome"
then you have to write an Sql Query like this
Delete from Table1 Where Name = 'Stark' and Age = '25' And Home = 'MyHome'
P.S
the best Schema for your table should be , like this
ID | Name | Age | Home
----------------------------
1 | stark | 25 | MyHome
2 | sonya | 21 | HerHome
then your query will be like this
Delete from Table1 Where ID = '1'
hope this will help .... if my answer was going far from you Question .. Just let me know , I still have more ideas to help you
Have Good day
I know nothing , I know nothing
|
|
|
|
|
Regarding System:Windows:Forms:MenuItem
The Click event is not raised for MenuItems which contain a submenu -- see Note in the Remarks section of MSDN documentation. Has anyone found a way to override this? Does anyone have an explanation for this feature?
Rick Bidlack
www.signalsandnoises.com
|
|
|
|
|
Rick Bidlack wrote: Has anyone found a way to override this?
This is not an override, but a well documented API:
The following events may be of interest:
* DropDownOpened
* DropDownOpening
* DropDownClosed
* DropDownItemClicked
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Hi to everyone, i want to use a textbox and write in some debug message during the execution of my program.
My problem is when i use this->textbox->AppendText("text to append") i don't known how go to next line.
With old printf for c-like syntax i use "\n" but in my case if i use it, it goes to the next line but i see a little square at the end of the line.
Another thing...what is when i declare a string the letter L at the begin?
String^ v=L"Succeeded..";
Thanks for answers,regards.
|
|
|
|
|