|
thank all of you for your replay
I appreciated it ...
thanks.......
dear Mark , first thanks for advice
second the 50 button I am using in my form will be use to change Icon of Treeview Node
I mean every button has an icon or an image with dimension ( 17 , 17 )
when I click one , the Treenode item must had that button icon ...
plus my form size is 170 * 250 contains those tiny button ,
but Dear SpacixOne give me a good solution
have a good day ,
Kind regards
I know nothing , I know nothing
|
|
|
|
|
Besides the poor UI and performance, you're making the coding and maintenance much more difficult.
What happens, sometime in the future, if you remove one of the icons, or want to add more? You're left with redesigning your form to accommodate.
Have you thought about using a dropdownlist, or list view to display and select these icons? You would have one button worry about, and an easy way to maintain and enhance the application.
only two letters away from being an asset
|
|
|
|
|
hai, I have question since there were many article implementing low-level hooking in C#.
i couldn't manage to find how to determine when we click the middle button or double-clicked the mouse using low-level mouse hook.
is there any way / method to do that?
i'm using unmanaged c++ dll wrapper (WilsonGlobalHook) from this site.
thx
|
|
|
|
|
|
thankz for the answer,
but I have look throughout that article before, and those article/project only cover the "left" and "right" clicks button.
any way to determine "middle" clicks?
low-level hooking problem maybe?
|
|
|
|
|
Got it,
I'm sorry before...
the class I used only handle WM_LBUTTONDOWN / WMLBUTTONUP and WM_RBUTTONDOWN / WMRBUTTONUP..
so just modify the class a little bit and add WM_MBUTTONDOWN / MBUTTONUP and maybe the double click handler to modify it.
yeah..
thankz a lot..
|
|
|
|
|
Hi,
I am currently returning an XmlDocument from a webservice using the following:
<br />
[OperationContract]<br />
[FaultContract(typeof(Anaqua.Domain.AnaquaServiceError))]<br />
[XmlSerializerFormat]<br />
public XmlDocument GetLawUpdateGenerationXML(short versionNum)<br />
{<br />
}<br />
Then in my page that consumes the webservice I did the following:
<br />
XmlDocument doc = (XmlDocument)svc.GetLawUpdateGenerationXML(internalVersionNumber);<br />
However it is saying:
Cannot convert type 'System.Xml.XmlElement' to 'System.Xml.XmlDocument'
Now I think this is because of the serialization using[XmlSerializerFormat]
So how would I go about reading the XML into and XML Document?
Regards
Paul Custance
|
|
|
|
|
This link[^] should answer your question.
Paul
|
|
|
|
|
If you wish to append a child node to the document root of an already created XML file then
be sure to have using System.Xml;
then the following will add a node:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("path to your xml file that already had a root document node");
XmlNode newXmlNode = xmlDoc.CreateElement("tagname");
newXmlNode.AppendChild(xmlDoc.CreateTextElement("The tag's text node Value"));
xmlDoc.DocumentElement.AppendChild(newXmlNode);
|
|
|
|
|
Hi All,
Will anyone help in opening a View which is having its own Interface and Presenter. I want to open this view from base presenter in ModalWindow style. I need a sample application so that i can understand better..
Thanks in advance
Umashanker.K
|
|
|
|
|
umashankergr8 wrote: I need a sample application so that i can understand better..
Sorry. I can't create or upload the sample for you but I will tell you the steps that you need to follow to open the view in popup form. (I believe that you have some ideas about CAB (Composite UI Application Block) Frameworks and terms.)
#1. First, you need to add the View in WorkItem or ModuleWorkItem.
Dim objMyView As MyView = WorkItem.SmartParts.AddNew(Of MyView)(MyNamespace.Constants.SmartPartNames.MYVIEWID)
Note: If you are using SCSF, you can write the code above in AddView() methods.
#2. Add a form to your project and put the DeckWorkSpace in this form.
#3. Write the code below in your presenter when the view raise the event of presenter.
Dim formPopUp As New Infrastructure.UI.Form()<br />
formPopUp.Title = "MyView"<br />
formPopUp.StartPosition = FormStartPosition.CenterScreen<br />
formPopUp.FormBorderStyle = FormBorderStyle.FixedDialog<br />
formPopUp.MaximizeBox = False<br />
formPopUp.MinimizeBox = False<br />
formPopUp.ShowDialog()<br />
<br />
Note: Infrastructure.UI.Form should have one more constructor like that
<br />
Public Sub New(ByVal view As Control)<br />
Public Sub New(ByVal view As Control)<br />
InitializeComponent()<br />
<br />
Me.ClientSize = New System.Drawing.Size(view.Width, view.Height)<br />
Me.SuspendLayout()<br />
view.Dock = DockStyle.Fill<br />
<br />
'Adding View to Form<br />
'---------------------------------<br />
Me._contentPanel.Controls.Add(view) '' Note: _contentPenel is deckworkspace control.<br />
Me.ResumeLayout()<br />
'---------------------------------<br />
End Sub<br />
That's all..
Hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
...you just wrote a VB sample in the C# forum. BLASPHEMER!!!
"I need build Skynet. Plz send code"
|
|
|
|
|
Alaric_ wrote: ..you just wrote a VB sample in the C# forum.
Hi Alaric_, VB.NET code and C# are very easy to change since there are a lot of auto-converters available on internet.. so, it doesn't really matter whether the code is written in C# or VB.NET.
Alaric_ wrote: BLASPHEMER
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
many thanks for your reply. If you have a sample application then it will be of more useful to me. If you have please give me, of even if you know the link from where i can download please provide me the link.
|
|
|
|
|
I have the following piece of code :
if (File.Exists(FilePath + FileName))
Where Filepath is : "E:\Images\"
and FileName is a random image file name : "03834634.tif"
However "E:\" is a mapped drive on a shared network folder eg. "\\192.168.253.12\images$\"
I write the "FilePath + FileName" to a file and use that in Windows Explorer and I can successfully open the file. So the path and file name is correct however the code returns that the file does not exists ??? If I however change the filepath to my local drive the code would return correctly when the file exists and when it does not exits. Can anybody give any assistance why "File.Exists()" does not work on a mapped network drive ???
|
|
|
|
|
Oederu,
I think it may be a permission issue. I have tried the following and received true on both accounts.
string filepath1 = @"z:\HoganBackup.rarr";
string filepath2 = @"\\monster\Shared Files\users\Hogan\HoganBackup.rar";
MessageBox.Show(File.Exists(filepath1).ToString());
MessageBox.Show(File.Exists(filepath2).ToString());
I have read that you should use the UNC name for network shares, so try that first. Most importantly is that you (your program) has permission to see the file.
Hogan
|
|
|
|
|
He said he was able to open it with Explorer, so it can't be a permission issue.
Cheers,
Vıkram.
Be yourself, no matter what they say.
- Sting, Englishman in New York.
|
|
|
|
|
are you certain that your code is referencing the resource correctly?
Oederu wrote: I write the "FilePath + FileName" to a file and use that in Windows Explorer and I can successfully open the file
That tells you that it's not a permissions issue
Here's a snippet from one of my current projects to show one way of handling this:
this.serverPath = @"\\"+serverUtility.OptimalServer.alias + serverUtility.OptimalServer.directoryPath;
Notice the '@' character. That is a special character that specifies that you are entering a verbatim string literal.
The '\' character usually triggers an escape sequence, but with the @ character in front of it, it is treated as any other character. This technique probably won't work for you though, because your '\'s are embedded inside your strings. You probably are going to want to do a string replace on the '\' to make it '\\' . That will specify that you are triggering an escape sequence and wanting to type a '\'
-- modified at 16:02 Wednesday 29th August, 2007
[Note] The "\\" included in my snippet is NOT the same "\\" that you will have to use. My "\\" indicates that I'm wanting to access an external resource(which works with the '@'). YOUR "\\" (without the @) will handle your first slash as an escape initiation and the second slash as a print
"I need build Skynet. Plz send code"
|
|
|
|
|
Are doing this in Vista?
I noticed that mapped drives in vista don't work with direct access via driver letter. I had to have the program resolve the full path
your example: @"\\192.168.253.12\images$\" you have to resolve their path that (like Alaric_ said)
-Spacix
All your skynet questions[^] belong to solved
|
|
|
|
|
Thank you for all your help. It turned out to be a permissions problem.
The user under which the application runs does not have the permission but I had. So with explorer I would be able to open the file but the programs user would not get access. Thanks for all the help.
|
|
|
|
|
I'm trying to read in and decrypt some encrypted data that is written to a file by an outside program. The program uses a form of rijndael encryption to encrypt the file. It uses a key, and I have the key, but I don't think it uses an initialization vector ..
this is what it uses:
// key - The 128/192/256-bit user-key to use.
// chain - initial chain block for CBC and CFB modes.
// keylength - 16, 24 or 32 bytes
// blockSize - The block size in bytes of this Rijndael (16, 24 or 32 bytes).
I'm not real solid on how Rijndael encryption works, obviously, so if anyone could help steer me in the right direction, that would help.
|
|
|
|
|
Rijndael is just another name for AES encryption(as it was the technique chosen for the standard). I would start by reading up on AES. ...Start with the sci.crypt newsgroup
"I need build Skynet. Plz send code"
|
|
|
|
|
|
Dear All,
The standard utility for creating Deployments.
I want my installation utility to be intelligent enough to install WebSites, Web Services and Files.
Next I need a few .exe to run during the setup.
Please Help!!
Thank you!
"Mess with the Best, Die like the rest"
|
|
|
|
|