|
I don't think this[^] is the complete answer, but it may point you in the right direction.
|
|
|
|
|
Disclaimer: I'm asking on behalf of a client, and have not witnessed this issue first hand. He has a third party app that produces training media, which his training application presents in a WinForms app through the WebBrowser control.
The interfaces he has been able to access on the WebBrowser control, on the surface of things, don't expose all the information required by the host form to fully integrate with the web application, which is a bit more advanced than basic HTML. He would like to e.g. detect a button click, and information on the state of the web app when that click takes place.
If more is possible that we know with the WebBrowser, please suggest some areas to explore. Otherwise, is there any alternative to the WebBrowser control? Anything from Mozilla that can be hammered into looking like a windows form control but without being so proprietary?
|
|
|
|
|
when you click any hyper link or button it generally navigate to new page or refresh this page.
This event can be got by the navigating event of webbrowser control of .net.
see example. suppose webBrowser1 is added in a windows application.
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
MessageBox.Show(e.Url.PathAndQuery.ToString());
}
|
|
|
|
|
hi
The default behavior of the DataGridView is that : when the user click on a cell the focus will move to the clicked cell .
I want to modify this behavior , so if the user click on a cell the focus will not move to the clicked cell how can i do that
thanks
|
|
|
|
|
You can make the column read only, it then won't accept the click.
I think you can make the cell read only but you need to do that on the cell paint event (not sure if thats the correct event), then you can evaluate the cell content and change the properties.
If you make the underlying collection (datatable of BindingSource) read only (cannot add/edit/delete) then I believe this will be reflected in the DGV.
There are many ways to kill a cat other than drowning it in milk.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi Mycroft Holmes
I don't want the value In my underlying Collection to be read only ?
thanks
|
|
|
|
|
If you have some other control you want to keep focus on, you might just have to manually reset it.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
You can disable the full datagridview as you don't want to make it readonly.
dataGridView1.Enabled = false;
|
|
|
|
|
hi every one
I have made an custom DataGridView column which inherits from DataGridViewTextBoxCell ,In have written a custom textBox too which has some properties I had this code so the type is changed to my custom TextBox:
Public Overrides Sub InitializeEditingControl(ByVal rowIndex As Integer, _
ByVal initialFormattedValue As Object, _
ByVal dataGridViewCellStyle As DataGridViewCellStyle)
' Set the value of the editing control to the current cell value.
MyBase.InitializeEditingControl(rowIndex, initialFormattedValue, _
dataGridViewCellStyle)
Dim ctl As CurrencyTextBoxEditingControl = CType(DataGridView.EditingControl, CurrencyTextBoxEditingControl)
ctl.Text = Me.Value.ToString
End Sub
now I want to be able to change some of this custom TextBox via Column properties via designer. I mean that I want to see the cell's Custom TextBox's properties in the Column properties in design time.
how can I do it?
thanks in advanced
|
|
|
|
|
I developed vb.net application it is windows based, my need is in that application worked in LAN, I run the exe file in client desktop computer it is coming error:
A connection was successfully established with the server, but then an error occurred during the per-login handshake. When connecting to SQL server 2005, this failure may be caused by the fact that under the default setting SQL Server does not allow remote connections. (Provider: Named Pipes Provider, error: 0 - No process is the other end of the pipe.)
Franics K Antony
|
|
|
|
|
|
i have two windows form, in one form i have a textbox, in another form,i have a gridview, all i want is how to transfer the data from textbox to gridview after i click the button?
|
|
|
|
|
ganesh kumarrr wrote: all i want is how to transfer the data from textbox to gridview after i click the button?
In the event handler for the button. Take the text from the text box and put it in the gridview.
Or do I misunderstand your question?
|
|
|
|
|
s u are correct, but how to code it?
|
|
|
|
|
ganesh kumarrr wrote: how to code it?
Read the documentation on TextBox and GridView classes. In there you will discover all the properties and methods that will allow you to accomplish this task, plus you will learn all sorts of good things that will help you in the future.
|
|
|
|
|
You're translator is broken
Richard MacCutchan wrote: ganesh kumarrr wrote:
how to code it?
This = snd codz plz
I did like you response though.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
add a string variable int the form that has the grid view.
overload the constructor that take a string argument. You have to initialize the string variable by the given parameter.Then call the constructor from the form that has the texbox as follows:
gridviewform f = new gridviewform(texbox1.text);
f.Show();
write this code in the formload event of form that has the grid view.
int p = dataGridView1.Rows.Add();
dataGridView1.Rows[p].Cells[0].Value = your string variable
|
|
|
|
|
Hi,
When I use the code below to open the form 'MainForm', the text position on buttons and labels differs slightly from the position in the designer. For some labels the text is displayed on two lines, while the text fits exactly on one line in the form designer. If I do not define a Sub Main, but set the MainForm as Startup form, the form shows correctly. Has anyone an idea what could be the cause of this strange behaviour?
Shared Sub main()
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(MainForm)
End Sub
Thanks,
Marc
|
|
|
|
|
Its the EnableVisualStyles line that may be causing it. This tell the app to use the systems theme styles render instead of the standard one. This changes stuff like font rendering.
What version of Visual Studio are you using?
|
|
|
|
|
I'm using Visual Studio 2008 Professional Edition.
Is there a way how I can make sure that the style renderer that is used on runtime is the same as the one used in the form designer?
|
|
|
|
|
When Dave said EnableVisualStyles is what triggers the theme-based renderer, doesn't that suggest you to try and run your code without that statement, and see what gives?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? 59.24% waren verstandig genoeg om NEEN te stemmen; bye bye viaduct.
|
|
|
|
|
Ok, sorry, should have mentioned that I tried that already. But when I remove the EnableVisualStyles statement, the whole XP-style disappears (of course ). It seems to me that the EnableVisualStyles statement is correct, as I want to use the systems theme.
The form is during run-time and in the form designer almost identical (i.e. using XP style), the only little difference is that the text on labels and buttons is moved about 1 or 2 pixels, which results in some cases in two lines of text in stead of one, as the text doesn't fit on one line anymore. Of course I could make the labels and buttons a few pixels larger. It's just that I don't like the fact that there is a differce between the form in the designer and in run-time. Someting must cause the difference...
Furthermore, when I start the form by setting the MainForm as Startup form in the project properties, and enabling XP visual styles, the form shows correctly.
So any help / suggenstions are welcome!
|
|
|
|
|
OK, I don't know the solution; I tend to make my controls slightly wider to avoid such issues.
BTW: what will happen if you ever need to internationalize your Form?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? 59.24% waren verstandig genoeg om NEEN te stemmen; bye bye viaduct.
|
|
|
|
|
Ok, thanks anyway!
Someone else any suggestions???
|
|
|
|
|
There is a relatively well known problem in this context, caused by the differences in the way that GDI and GDI+ do their rendering which may explain your problem.
This[^] explains it and has a demo project.
There is a better explanation that I cannot locate at the moment. Some time ago I posted it on CP for another member. At that time I found it by Googling gdi v gdi+, which is where I got the link above. If you have more patience than I, give it a try.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|