|
i use follow functions for loadind my html pages,there are some pictures in my source code of html page , that have relative src ,
when the browser navigate , the pictures didn't show!!!
what can i do??
private void Form2_Load(object sender, System.EventArgs e)<br />
{<br />
<br />
object empty = System.Reflection.Missing.Value;<br />
axWebBrowser1.Navigate("about:blank", ref empty, ref empty, ref empty, ref empty);<br />
}<br />
<br />
<br />
public void html_load(string context,string title)<br />
{<br />
string SourceCode="";<br />
SourceCode="<html><head><title>" + title + "</title></head><body>" + context+ "</body></html>";<br />
mshtml.IHTMLDocument2 doc = axWebBrowser1.Document as mshtml.IHTMLDocument2;<br />
<br />
doc.clear();<br />
doc.writeln(SourceCode); <br />
doc.close();<br />
}
|
|
|
|
|
I'm not sure but this might help:
object path = [[your relative paht]] + "test.htm";
object missing = System.Reflection.Missing.Value;
this.axWebBrowser1.Navigate2(ref path, ref missing, ref missing, ref missing, ref missing);
instead of opening the HTML document as a text file, "navigate2" it.
yours,
pAyAm AssAdi
|
|
|
|
|
hi all,
is it possible to restrict access to some of tabpages of a tabcontrol ?
tabcontrols have attributes like Visible or Enable, whereas tabpages dont have such properties ;(
there is one property IsAccessible. i set this to false but its only not accessible when form loads. if a click on a different tabpage then click back to the previous one i can again see its content.
all i want is to hide or restrict a tabpage not just for a moment but during form is open.
thanks in advance,
bye.
|
|
|
|
|
Use the event "Click" from TabControl.
private void tabControl1_SelectedIndexChanged(object sender, System.EventArgs e)
{
tabControl1.SelectedIndex = 0;
}
This code will select only tabPage0.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: all i want is to hide
TabPage has a Hide method
|
|
|
|
|
I'm using VS.NET 2005, now I try to use the webbrowser control to view the XML file, but this control just show the text value not show the tree format as IE!
How can I make it same as IE ?
Thanks for your help!
Hung
|
|
|
|
|
Hi all,
I need to encryct a configuration XML file. can any one suggest me how to do that.
I thought of doing this one by File.Encrypt(filename) method but it throws the execption "Recovery policy configured for this system contains invalid recovery certificate."
I dont know what it is.
Please tell me how you guys will encrypt the configuration XML
Thanks and Regards,
Srini
|
|
|
|
|
See the example from VS2003 :
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\QuickStart\howto\samples\cryptography\fileencrypt
|
|
|
|
|
Try this:
http://support.microsoft.com/?id=307010
I believe the error being thrown is because the File.Encrypt(filename) method is using the global encryption scheme for your user account on your installation/set up of windows. For e.g. if you decide to encrypt a physical harddrive or parition on yoru computer a key is generated based on yoru user account. So no-one else can plug your HD into their computer and promptly decrypt its contents. If you do encrypt your HD or folders/files this way it is suggested that you enable the recovery manager in case you lose your login details of which as i understand it is like another user login.
So since you either do not have Encryption enabled or the certificate has expired you are recieving that error. I could well be way off track but i think it has to do with this.
Try that article by MS detailed above. If not just decide what level of security you need and generate your own encryption scheme based on some key you think up.
Darren
|
|
|
|
|
I have problem in C# windows development. For successfull exection of my program I need to refer few DLLs that we have developed. I am able to refer the DLLs in my system and I am able to run the code. But If I copy this DLL to some other systems the reference not exists, even the DLLs are existing in the same directory Hierarchy. I have opened my project file in notepad and checked and I observed that <hint path=""> is missing in those files. Can any body help me to point out what is the problem.
Dinesh Kumar P
|
|
|
|
|
Try to set the all reference properties of "Copy Local" to true. Then you can just copy your DLL to other system.
The problem is probably : your codes are using some DLL from Global Assembly Cache not directly from directory.
|
|
|
|
|
Hi,
I have a image on a MemoryStream and a WebBrowser Control. How can I load this image to the webbrowser control without saving it to hard disk!
Thanks,
Hung
|
|
|
|
|
Hi,
Does anyone now hot to get the name of the network group that I'm curretnly in. "Environment.UserDomainName" works only if the network is with a domain.
Thanks in advance
Plamen
|
|
|
|
|
See this : http://www.codeproject.com/csharp/host_info_within_network.asp?df=100&forumid=146669&exp=0&select=1349731
|
|
|
|
|
I would like to read the content of DataGrid after being updated particular or all rows. But I can read current row only. How to read all rows?.
The code i am using to read current row... DataGrid name - DGField
BindingManagerBase BMB = DGField.BindingContextDGField.DataSource,DGField.DataMember];
DataRow Dr = ((DataRowView) BMB.Current).Row;
MessageBox.show(Dr[0].ToString());
Jey
|
|
|
|
|
You can access one cell of the grid as :
DGField[rowIndex,ColumnIndex]
bye
|
|
|
|
|
hi..
In my application im taking input as a string from user, which is acutually a color name..now is there any way to validate that string wheather it is a valid color or not ?
For ex.
"RED" its a valid color
"REDD" its not a valid color
any help..
Thanks
|
|
|
|
|
You need something to validate it against, what colors are valid? The C# Color class contained ones? or the names of Colors in English?
|
|
|
|
|
Use the Color.FromName method to convert the string to a color. If the name is invalid, the ToArgb property of the color returns zero.
---
b { font-weight: normal; }
|
|
|
|
|
If treelist have open node, and i add new node to treelist - new node not can have focus.
treelist.AllNodesCount = all nodes in treelist - 1 ???
But if all node is close, and i add new node - !!! my new node can have focus!!!
treelist.AllNodesCount = all nodes in treelist !
My code:
using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Nodes;
namespace video
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void simpleButton1_Click(object sender, EventArgs e)
{
TLNode tln1 = new TLNode(1, treeList1.Nodes, "dfhdfhgdf", "234523");
treeList1.Nodes.Add(tln1);
treeList1.FocusedNode = tln1;
}
private void simpleButton2_Click(object sender, EventArgs e)
{
TLNode tln1 = new TLNode(1, treeList1.Nodes, "4567rtyu4567", "ertye3456ertye");
tln1.HasChildren = true;
TLNode tln_children = new TLNode(2, tln1.Nodes, "trtr3636yryr", "6868cncn2525");
tln1.Nodes.Add(tln_children);
treeList1.Nodes.Add(tln1);
}
}
public class TLNode: TreeListNode
{
string name;
string url;
public TLNode(int id, TreeListNodes owner, string name_, string url_) : base(id, owner)
{
name = name_;
url = url_;
}
public override void SetValue(object columnID, object val)
{
}
public override object GetValue(object columnID)
{
return "text";
}
}
}
How to do this problem?
Help me please.
|
|
|
|
|
Dima Filipiuk wrote: using DevExpress.XtraTreeList
Ask them 1st! Then if you have no luck, tell us about your pain, and then repaste the original question.
|
|
|
|
|
Hi!
In my project I have a server creating a singleton that answers requests from various clients. Sometimes I need the singleton to delay requests from specific clients while not blocking requests from the others.
Currently Im using a 'while' loop checking for a flag that tells me if the request should wait or be answered but this has the side effect of not allowing any other request to go through until the current one completes.
SingleCall won't work since I need to store status between calls. Using a singleCall object to call the singleton could work but seems ugly.
Any ideas are welcome! Thx!
|
|
|
|
|
Depending on the amount of client queries and also the timeout. Cant you buffer valid client requests in a queue?. Possibly have two threads, one to constantly listen for client queries and validate if the request should go through... then passing this to the Syncronized Queue while the Singleton deals with the current request?
Or do you need the Singleton object to validate the request itself? Again depending on the amount of queries just queue them up in a buffer ready to pass to the singeton. As long as you can clear the buffer before the clients timeout and send a new request it should be fine.
Or what if you notify the client you have recieved the respone and it is in a queue, possibly have a thread periodically reply to the client with ist position.
Darren
|
|
|
|
|
Hum... wouldn't the listening thread block on the first request it should delay?
The idea is that some requests should wait for a flag/event/something before the remote call returns, the problem is that until the current remote call returns the Singleton won't process any others effectively blocking the server on the current call.
As I said, it can probably be done with two objects, a Singleton and a SingleCall (if the SingleCall creates a new instance for each request) where the SingleCall would block (until it got a signal to continue) and not the Singleton. This would imply twice the remote calls and since the SingleCall has no status, a way to read the flag to continue (if only I could send an object reference to the SingleCall...)
There must be an easier way to do this...
|
|
|
|
|
Who can tell me aboat retrieving the H.D.D serial number in C#?
|
|
|
|