|
Hi All!
I'm still wading into a long prepared-for project of mine. I've just hit the WYSIWYG HTML editor section and am already stuck. I'm using the following method to activate designmode in a WebBrowser control:
MyWebBrowser.Document.DesignMode = "On"
And then I load the attributes of the ActiveElement (The currently selected HTML element) into a PropertyGrid for editing. My problem is that while ActiveElement works with Buttons, TextBoxes and suchlike in which there is text to edit. It doesn't work with images and other elements that cannot be visually edited in designmode. the resize box appears around the image and drag-drop resizing works fine but the ActiveElement never shifts to the selected element. Any ideas on how to obtain the selected element regardless of it's type?
Thanks!
MrWolfy
modified on Wednesday, October 22, 2008 2:58 PM
|
|
|
|
|
I don't what you're execting with the MSHTML editor. It's not a full-fledged HTML editor. It allows you to do simple editing of the document, that's all. If there's some other editing you want to do outside of what's exposed, you'll have to implement your own editor extensions for that using the Win32 IHtmlEditDesigner[^] interface, which you'll find just about impossible to use from VB.
|
|
|
|
|
Hi and Thanks!
Ok! Thanks for the Link! I guess I'll have to do some more research!
Thanks Again!
MrWolfy
|
|
|
|
|
Hi Folks
Please excuse me if this is an incredible ingnorant question.
I've got 2 linklabels, Next and Previous. I'm using these to move through the images saved in my dataset.
However, looking up Linklabels in help you should be able to do something like LinkLabel1.Link.LinkData in order to set the Data Source. However I'm not getting this option after Link. All I'm getting is Link.Equals or Link.ReferenceEquals?
Can anyone help please?
Thanks alot
Kris MCP
|
|
|
|
|
Sounds like you're using the class instead of the instance.
The instance has Links collection and every item in that collection has LinkData property. LinkLabel.Link is a type used in Links collection.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi Mike
Sorry for the delay had one of those days!
Thanks for replying but I'm now totally confused. I've read your article and also read up on Instances withing VS 2005. However, there seems to be numerous types, ie, constructor, Property, Method etc.
Please can you offer a little more advise. Yes, I am newly qualified hence being lost.
Thanks alot
Kris
Kris MCP
|
|
|
|
|
No proble,
What I meant is that you possibly don't have an instance for the linklabel when you try to write the method call. That's why you would see only static methods. Try for example something like this:
LinkLabel linkLabel = new LinkLabel()
linkLabel.Text = "Some text"
linkLabel.Links(0).LinkData = "Some data"
linkLabel.Links.Add(0,4, "www.somewhere.xyz")
Mika
P.s. The article link is just part of my signature so it wasn't actually meant to help in your case. Just *advertising*. Glad you read it though
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi Mike
Thanks alot for getting back to me. I've managed to work it by moving through the BindingSource once the linklabel's Click event is raised.
Whilst we're advertising I'd love some comments on my website, from an expert of cause.
Thanks again for your help
www.ktechprogramming.co.uk
Kris
Kris MCP
|
|
|
|
|
No problem,
I had a look at your website and it was very nice. I must admit that I really know nothing about horses but I love to ride.
The only thing that comes in mind is that if you could have permission from your clients to add their names to your website it could have a positive effect for you and your client (add a little story about each client providing some special info they are proud of).
Mika
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Thanks alot for that! Good idea.
Kris
Kris MCP
www.ktechprogramming.co.uk
|
|
|
|
|
No problem ,
Mika
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
I have hit a wall with my application. I am having problems when dealing with a LONG column in the database. I am getting errors when using the data adapters for either ODBC or OLE (tried both) when the value in one of the LONG columns reaches over a certain threshold length. I try to use the FILL command to get the data from the data provider and into a DataSet or DataTable to then display in a window for the user. However, this causes an error as I mentioned. So I have spent too much time digging and trying to get past this but cannot find a solution.
Do I need to create my own override for the FILL command so it handles LONG columns? I would have expected this to be already handled by MS Framework - perhaps not!?
Anyone have time to help me? I would REALLY appreciate it!
I am trying to access a SQL Anywhere database file (dbf) and provide a fully functional database explorer to the users so we can perform various tasks easier.
Here is my ODBC test code that fails at the FILL line...
Dim conn As New Odbc.OdbcConnection("DSN=" & "client_x" & ";UID=" & "STT" & ";PWD=" & "NEED2CHANGE" & ";")
Dim dr As Odbc.OdbcDataReader
Dim strSQL As String = "select b.name, b.row_id, b.inactive_flg, b.script from SIEBEL.S_APPL_WEBSCRPT b where b.row_id = '1-K3E-1IYQ'"
Dim dt As New DataTable
Dim dg As New DataGrid
Dim cmd As New Odbc.OdbcCommand(strSQL, conn)
Dim vals() As String
Dim myAdaptor As New Odbc.OdbcDataAdapter(strSQL, conn)
myAdaptor.AcceptChangesDuringFill = True
myAdaptor.Fill(dt)
Here is my OLE test code that works when I query only for 1 record, but when multiple records are returned I cannot get the FILL command to work at all!
Dim ConnString As String
Dim Connect As ADODB.Connection
Dim RS As New ADODB.Recordset
Dim DataGrid1 As New DataGridEX
Dim dt As New DataTable
Dim ds As New DataSet
Dim custDA As New OleDb.OleDbDataAdapter
Dim strSQL As String = "select b.name, b.row_id, b.inactive_flg, b.script from SIEBEL.S_APPL_WEBSCRPT b"
ConnString = "DSN=" & "client_x" & ";UID=" & "SST" & ";PWD=" & "NEED2CHANGE" & ";"
Connect = New ADODB.Connection
Connect.CursorLocation = ADODB.CursorLocationEnum.adUseServer
Connect.Open(ConnString)
RS.CacheSize = 10
RS.Open(strSQL, Connect, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText)
custDA.Fill(dt, RS)
Dim f As New Form
Dim t As New TextBox
t.Multiline = True
f.Controls.Add(t)
t.Dock = DockStyle.Fill
t.Text = RS.Fields(3).GetChunk(RS.Fields(3).ActualSize)
Thanks!
John Wadleigh
Siebel Expert
|
|
|
|
|
I think that a LONG column in the database cannot fit inside the limits of the mapped column under ODBC or OLE. It's possible that the column would have to be treated like a binary object column, such as an image, where you have to get the contents of the column using a stream process. That's why I said using the database-specific provider would provide better compatibility.
|
|
|
|
|
how to edit appconfig in windows application(C#)??
i am using this code but not getting success please help me
Code:-
Properties.Settings.Default.DestinationDrives = "ppc";
Properties.Settings.Default.Save();
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Why post C# questions here? (As well as the proper forum)
Bob
Ashfield Consultants Ltd
|
|
|
|
|
if u know the answer then help me.
thanks
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Too late - you have been given the answer in the correct forum. It is a pain when people post the same question to multiple forums, and even more so when it is OBVIOUSLY the wrong forum.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Use common sense and don't cross post.
|
|
|
|
|
kissdznuts wrote: Use common sense
I ditto that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
...
Blog link to be reinstated at a later date.
|
|
|
|
|
I have to develop an server/client application like this:
-database on server
-clients connecting to server, working with that database(as many i want)
I never did something like that so any help will be appreciated, especially some code examples.
I am using vb 2008 professional edition
|
|
|
|
|
AngSoft wrote: I never did something like that
What have you done in vb.net ?
If this is an actual paying job for a customer, I warmly suggest one of the following solutions:
1. Call it off
2. Hire a programmer with the necessary experience to do it for you
3. Take the customer's money, and buy a plane ticket to a country that does not have an extradition agreement with yours.
Otherwise you are going to have to be much more specific.
AngSoft wrote: any help will be appreciated
Help with what exactly ?
AngSoft wrote: especially some code examples
Code examples of what exactly ?
Visual Studio contains help files, which contain plenty of walkthroughs and examples that can help you on your way with database - client application development.
Good luck with it.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Try here
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi All,
I am developing an Application in vb.net 2008
In my application I am using an Thread named 'ThreadSplace', that runs the Splash Screen at the start of the Project and when the MDI is Loaded the Thread is Aborted.
But the Problem is that when the the application run from my exe, at the time of Loading MDI it throws an error :
"Unhandled exception has occurred in Your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, The application will close immediately.
Thread was being abored."
But, I am never understand from where this error throws. Because when I run my application from my Project It works fine.
Please Help me.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
If you manually stop a thread using the Abort() method, this throws a ThreadAbortException. I guess the exception it thrown where you stop the splash window thread.
|
|
|
|