|
What is the way to convert hex data to a ascii string?
|
|
|
|
|
Ref : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=206450&SiteID=1[^]
private string HexAsciiConvert(string hex)<br />
{<br />
StringBuilder sb = new StringBuilder();<br />
for (int i = 0; i <= hex.Length - 2; i += 2)<br />
{<br />
sb.Append(Convert.ToString(Convert.ToChar(Int32.Parse(hex.Substring(i, 2),<br />
System.Globalization.NumberStyles.HexNumber))));<br />
}<br />
return sb.ToString();<br />
}
|
|
|
|
|
Thank you.
I thought I had searched the MSDN forums good before posting But as always I was wrong..\
Thank you
Danzar
|
|
|
|
|
MyProgExe.exe requires to call methods in dll files dll1.dll, dll2.dll, dll3.dll.
Currenty my exe and dlls all are in the same directory as
c:\MyProgFolder\Dll1.dll
c:\MyProgFolder\Dll2.dll
c:\MyProgFolder\Dll3.dll
c:\MyProgFolder\MyProgExe.exe
I'd like to put my dlls in separate directory as follows
c:\MyProgFolder\Data
c:\MyProgFolder\Libs\Dll1.dll
c:\MyProgFolder\Libs\Dll2.dll
c:\MyProgFolder\Libs\Dll3.dll
c:\MyProgFolder\MyProgExe.exe
How can I achieve this without using PInvoke? Also how can I setup my Compiler (SharpDevelop) to put my dlls in \Libs Folder instead of the same direcory as my executables?
Thanks...
|
|
|
|
|
Take a look at AppDomain.AppendPrivatePath() or AppDomainSetup.PrivateBinPath .
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I use this code to embed media player in my C# Solution:
here is part of the code
<OBJECT ID="MediaPlayer" WIDTH=385 HEIGHT=147
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="http://xx.xx.xx.xx:xxxx/\"/" valuetype="ref" ref>
But the visualization don't show when playing.I don't know how to set it show the visualization.Please help me.Thanks advance.
nothing
|
|
|
|
|
Hello,
I have a mdb file(ms access) that connects to an oracle database using a userID and password.
Now, I created a software to run this file and excute a query.
To be clear, the file has a query called "TRADES" that will select all trades of a day for example.
So, the C# software opens the file and the query "Select * from TRADES".
That works well because I used the OleDB connection.
The problem is that when I open the file, it asks for the password ... how can I set it automatically?
What is worse is that it used to work properly but not anymore! >_<
I hope someone will help me!
Thank you!
|
|
|
|
|
kurisutofuJP wrote: when I open the file, it asks for the password ...
Is this your Access database file?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Sorry, I was not clear.
it seems that's the ODBC driver who asks for the password.
Now,I saved the password in the registry (I didn't find another way to save it) and I'm running the system to check if it's working ... (I'll have the answer in about 10 minutes ...)
EDIT:
it worked!
I just hard coded the password in the registry under Local machine/software/odbc
|
|
|
|
|
kurisutofuJP wrote: Sorry, I was not clear.
No problem.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi Friends,
At the click of button i am fetching data from back end which takes a time..so before fetching i am making a label visible with a message saying "Please Wait"..as it can be clear from code below..
private void btnShowDetails_Click(object sender, EventArgs e)
{
lblShowMessage.visible=true;
FetchRecords();
lblShowMessage.visible=false;
}
but that label is not getting visible at all..what could be the problem..plz assist me in this regard.
Thanks,
Rahul Agarwal
|
|
|
|
|
Hi!
That's simple: Your btnShowDetails_Click method is running on the main UI thread that's responsible for repainting the form.
Between making lblShowMessage visible and hiding it again, it's busy fetching some records, so it doesn't have time to repaint the form.
Once the button click handler is through, the form can get repainted, but then the label is invisible again.
The better solution would be to put FetchRecords in a separate thread and let the UI thread handle just the UI.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
SreejithAchutan wrote: I want the source code urgently.
I don't think so. Demanding something urgently from people around here is considered rude.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
so... I have a need to display some data. What kind of data? Web Links. And I want my users to be able to customize what's there. I want them to be able to add and remove Categories (like folders) and Add/Remove/Edit the link names and where they point to. All this info would then be stored in some kind of file, like XML or something...
So the link name and where it points to, I've got that covered. No problems there. The problem lies with the categories/folders; and the file storage.
BTW, I'm not creating a set of subdirectories and storing everything in there. That won't work with some of the other things I need my app to do.
Any ideas on how I could accomplish this? I'm thinking that the best way to display the data would be in a tree view. I think. In seems like the best way in either case...
Any help/pointers would be greatly appreciated! Thanks...
|
|
|
|
|
|
What is that?
nononono...
I want to create a directory-like structure. Essentially, it is a group of links. Each link is contained within a category. Each category can hold (in theory) unlimited links and (in theory) unlimited child categories.
Just like a file structure for a computer. Except instead of files and folders, it's links and categories.
Any ideas on what would be the best waqy to store and display that information?
|
|
|
|
|
public class Link{
private string linkName = string.Empty;
private string linkURL = string.Empty;
public string LinkURL {
get { return linkURL; }
set { linkURL = value; }
}
public string LinkName {
get { return linkName; }
set { linkName = value; }
}
}
Public class Category{
private List<Link> links;
private List<Category> categories;
public List<Link> Links{
get { return links; }
set { links = value; }
}
public List<Category> Categories{
get { return categories; }
set { categories = value; }
}
}
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
|
|
|
|
|
IS there a way to sort of BringToFront graphics, because when I use them with windows controls, they appear in the background. THanks.
- "Achieving all knowledge does not mean achieving all wisdom."
- "What's THIS button do... ... ... ?"
|
|
|
|
|
The issue is that you're drawing on the form, and the controls are drawn over the top.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
maybe the ControlPaint class has something for you.
Be careful though, it will paint anywhere, not just inside a specific window.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
How do I save, for say, a number (int x ), for a label to say the number every time it loaded up after the user presses a button (button1 ) that adds one to the number each time. I know it's simplistic, but it would be a good example to learn to save. Also, any data articles could help. I'm going to search for more right now. THink high scores. Thanks.
- "Achieving all knowledge does not mean achieving all wisdom."
- "What's THIS button do... ... ... ?"
|
|
|
|
|
Use session or viewstate for asp.net. For winforms or others use a member variable or a static member depending on the need.
What should I think of high scores btw?
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Example? I don't understand. (I'm with winform)
- "Achieving all knowledge does not mean achieving all wisdom."
- "What's THIS button do... ... ... ?"
|
|
|
|
|
You don't understand what a variable means?
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
I hope he knows what a variable is.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|