|
i want to convert hexadecimal value to string...
can anybody give me a solution for it....using C#
|
|
|
|
|
i want to convert hexadecimal value to string...
can anybody give me a solution for it....
|
|
|
|
|
|
0x00BABE.ToString("X")
-- modified at 8:08 Wednesday 31st May, 2006
|
|
|
|
|
hi
i was opened a exe file binary and save it as Byte[] on disk.
i want to create blank process and inject byte[] to this process and restart process.
how to do that ??
|
|
|
|
|
Hackety hacketing?
-Larantz-
|
|
|
|
|
Let's see, this is C#, I assume you want to load a .NET assembly, if not please disregard the rest of the answer and go ask in the C++ forum.
Assembly ass = Assembly.Load(byte[]);
ass.EntryPoint.Invoke(null, null);
|
|
|
|
|
leppie wrote: ass.EntryPoint
|
|
|
|
|
|
hehe
|
|
|
|
|
haha!
-Larantz-
|
|
|
|
|
I have written the code like for ShowNewFolderButton = false
DialogResult result = folderBrowserDialog1.ShowDialog();
folderBrowserDialog1.ShowNewFolderButton = false;
if( result == DialogResult.OK )
{
txtFileName.Text = folderBrowserDialog1.SelectedPath;
}
//folderBrowserDialog1.ShowNewFolderButton = false;//
This line of code is not working
|
|
|
|
|
try out
folderBrowserDialog1.ShowNewFolderButton = false;
DialogResult result = folderBrowserDialog1.ShowDialog();
if( result == DialogResult.OK )
{
txtFileName.Text = folderBrowserDialog1.SelectedPath;
}
rahul
|
|
|
|
|
MSDN :Setting ShowNewFolderButton to false does not work on Windows 2000.
|
|
|
|
|
FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog();
DialogResult result = folderBrowserDialog1.ShowDialog();
folderBrowserDialog1.ShowNewFolderButton = false;
if( result == DialogResult.OK )
{
txtFileName.Text = folderBrowserDialog1.SelectedPath;
}
|
|
|
|
|
Just repasting the question isnt a sufficient answer...
|
|
|
|
|
Shiv5 wrote: DialogResult result = folderBrowserDialog1.ShowDialog();
folderBrowserDialog1.ShowNewFolderButton = false;
ShowDialog halts the running of the current code until the user closes the opened dialog form. Therefore, setting ShowNewFolderButton = false after this line will definately not affect that property when the window is shown! It will set that property AFTER the window is closed.
Swap those two lines around.
folderBrowserDialog1.ShowNewFolderButton = false;<br />
DialogResult result = folderBrowserDialog1.ShowDialog();
That said, I also remember reading somewhere that this property does not have any affect on Windows 2000.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
J4amieC wrote: That said, I also remember reading somewhere that this property does not have any affect on Windows 2000.
Probably in the documentation. They tend to hide information in there.
|
|
|
|
|
hello all i want to know the various ways of analysing text in C# and thank you all
abdelhameed81
|
|
|
|
|
abdelhameed81 wrote: i want to know the various ways of analysing text in C#
Refine your question. Analyzing text is theory and not language-bound.
|
|
|
|
|
hi
im currently workin on a windows applicatin in c#.net........
my requirement is tat iv got a windows form with a simple text box and a OK button on it.....
wen some text is entered into the text box and the OK button is clicked... a new .cs file has to be added to the project's solution...
and this text from the text box has to be inserted into the file.....
tat's it...
could u pls help me out with it...
thanks n regards,
Pavithra..
|
|
|
|
|
There is no direct way of doing this.
IMO it is not possible to add any file to the current solution at runtime, simply because, VS IDE wont allow you add any file even at the Design mode, when you run a project.
You may try adding a .cs file to any other project which is not open. Try opening a .csproj or .vbproj through a Notepad which will give you some idea.
|
|
|
|
|
Hi everyone.
Still working on my CustomGridColumnStyle class.
So far I'm traversing the registry correctly, and I retrieve the correct
exe-file or dll-file that contains icons for a specific filetype.
Only problem is that for instance the icons for .txt files is located in shell32.dll
at index -152, or atleast I believe it's index -152 due to registryvalue: "%SystemRoot%\system32\shell32.dll,-152"
in subkey: "DefaultIcon", and I'm not pointing to that index so I just get the icon for dll-files when I display the txt-files...
For extracting the icon I use Win32.SHGetFileInfo(..), and I'm wondering:
Is there any way of specifying which icon you want extraced? By index perhaps?
hImgSmall = Win32.SHGetFileInfo(filePath, 0, ref shinfo,
(uint)Marshal.SizeOf(shinfo),
Win32.SHGFI_ICON |
Win32.SHGFI_SMALLICON);
I think the Win32.SHGFI_ICON | Win32.SHGFI_SMALLICON points to some kind of index though.
If anyone has any knowledge of Win32.SHGetFileInfo I'd really appreciate some feedback.
-Larantz-
|
|
|
|
|
Found another solution, though I'm still interested in an answer on the above question.
The other solution is to pass other constants to the SHGetFileInfo(..) method so that the
method retrieves icons corresponding to fileextension, and not from the file itself.
I'll just post it incase someone else is having the same problems:
In Win32
public const uint SHGFI_ICON = 0x100;
public const uint SHGFI_LARGEICON = 0x0;
public const uint SHGFI_SMALLICON = 0x1;
public const uint SHGFI_USEFILEATTRIBUTES = 0x10;
public const uint FILE_ATTRIBUTE_NORMAL = 0x80;
public const uint SHGFI_TYPENAME = 0x400;
In myClass
hImgSmall = Win32.SHGetFileInfo(
strAnyfilename,
Win32.FILE_ATTRIBUTE_NORMAL,
ref shinfo,
(uint)Marshal.SizeOf(shinfo),
Win32.SHGFI_USEFILEATTRIBUTES |
Win32.SHGFI_TYPENAME |
Win32.SHGFI_ICON |
Win32.SHGFI_SMALLICON);
-Larantz-
-- modified at 6:55 Wednesday 31st May, 2006
|
|
|
|
|
Hi
I need some help plz.
I want to add controls to my CustomTabPage.
How can I add controls programmatically and adjust the location & size of them within my CustomTabPage class? which is inheriting from TabPage class.
I want to add a bunch of labels.
|
|
|
|