|
I am reading data of a socket. I recently learned that the data I received is actually meant to be easily displayed in a vt100 terminal. So I was wondering if I can get the transformed output as a string itself...are there any libraries that does specifically this...?
If the above transformation is too complicated I am prepared to accept a transformation which removes all the escape sequences...
|
|
|
|
|
Don't know if Terminal Control Project (C# VT100 SSH Telnet)[^] might help?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Removing all the escape sequences is a fairly simple regex (and would make the output probably useless), but implementing them for a VT100 is not a massive task in it's own right - there aren't a lot! VT100[^]
I remember implementing a full VT220 in a weekend in assembler many years ago, so VT100 as a console app would be pretty simple to do.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
They're not all the same length so you would have to parse them.
Do you have any examples you can show?
|
|
|
|
|
Hi all,
I am working on a windows application. I am renaming the application short cut in start menu and desktop folders. it is working in XP, but when I run this application in Vista, it gives an error of file/folder not find. The file/folder path for start menu and desktop folder are different in XP and Vista. Can anyone help to find it out, so that it can work in all the windows like XP,Vista,Windows-7. First priority is VISTA...
Thanx in advance...
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
[edit]
Environment.SpecialFolder.Desktop for Desktop.
[/edit]
Greetings
Covean
|
|
|
|
|
Hello Covean.
Thanx for the reply.
I am using exact code and it works in XP. But not in Vista.
Thanx again...
|
|
|
|
|
I'm using Vista and this code works fine.
The path may not look valid but Vista maps it right.
Environment.GetFolderPath(Environment.SpecialFolder.Desktop) returns "C:\\Users\\[username]\\Desktop" whats right.
|
|
|
|
|
i can Explain..
In XP, it searches in "C:\ Document and setting\currentuser\start menu\programs\\my application folder\my application short cut name".
But..
When I try to retrieve the start menu folder in VISTA, it searches in "c:\users\currentuser\appdata\roaming\microsoft\windows\start menu\programs\my application folder\my application short cut name".
I hope I am not asking a lame question... .
thanx............
modified on Friday, October 30, 2009 7:28 AM
|
|
|
|
|
And whats wrong with
"c:\users\currentuser\appdata\roaming\microsoft\windows\start menu\programs\" ?
If I enter this path, I'm exactly there where expected.
Maybe I don't understand your problem. Can you explain it a little bit more?
Are you sure, that you can't find these files or maybe you only don't have the rights
to access this folder?
Greetings
Covean
|
|
|
|
|
OK, here I explain.
The thing is like this when I install my application in XP, it works fine. but When I try to install it in Vista, it shows me "c:\users\currentuser\appdata\roaming\microsoft\windows\start menu\programs\" this path including my application folder containing my application short cut link and says didn't find the file.
I am using "string startMenuDir = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);" for retrieving start menu folder.
and "string DesktopDir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);" for desktop folder.
as I said it works in XP but in Vista it gives error with the path specified above with file name not found.
I hope its clear now....
|
|
|
|
|
deftsoft wrote: c:\users\currentuser\appdata\roaming\microsoft\windows\start menu\programs\
Shouldn't that be local?
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi d@nish
Thanx for coordination..
I have XP installed but my client has Vista installed. So I am not sure about ROAMING OR LOCAL.
|
|
|
|
|
I think you have got a problem with the rights.
What kind of application are you installing? Service, console app , normal windows-app?
I would try to run this application by using the Vista menu item "run as adminstrator" and test if
you could access these folders there.
Greetings
Covean
|
|
|
|
|
It's a simple windows application for creating invoices. actually I have XP installed but my client has Vista. So I am not sure about the rights.
|
|
|
|
|
"So I am not sure about the rights."
And whats so hard to test it? Run your app "as adminstrator" and see if this works.
Greetings
Covean
|
|
|
|
|
Why are you doing anything with those folders anyway?? Under Vista and above, you must be more aware of what default permissions users have to the various folders. If you're trying to store data in folders that are not normally used for this purpose, you'll run into permission issues.
|
|
|
|
|
Hello friends,
I had a question.actually I have a web page in which there are multiple buttons.
Whenever I click on a button the contents get displayed in the bellow panel and the color of the button changes.
Then when I click on another button its color changes but the first button color persists.
protected void Button_headers_Click(object sender, EventArgs e)
{
this.Button_headers.BackColor = Color.Blue;
}
So what I want is the color of the button on which I click should change and when I click on second button the first one color should get restored.
I would be very much thankful to you if you help me in this matter.
Regards
Swapnil
|
|
|
|
|
Hi,
write a method to which you pass the button clicked. Call this method from each eventhandler (for a button click).
The method should look like this:
private void SetButtonColor(object sender) {
this.Button_headers.BackColor = (sender.Equals(this.Button_headers) ? Color.Blue : Color.White);
this.MySecondButton.BackColor = (sender.Equals(this.MySecondButton) ? Color.Blue : Color.White);
...
}
Let me know if this helps you.
Regards
Sebastian
|
|
|
|
|
Thanx Sebastian..
Thank you very much..It really worked well..
Really I knew it was not a bug..but Its a great feuture..
thank you very much..
|
|
|
|
|
hi if you don't know the count of buttons you will use write it dynamic
private object lastButton;
private void SetButtonColor(object sender) {
if(lastButton != null && lastButton != sender)
{
lastButton.BackColor = Color.White;
}
sender.BackColor = Color.Blue;
lastButton = sender;
...
}
|
|
|
|
|
Okay, I see from here[^] that there are 3 desktops that come standard with Windows: default, screen-saver, and Winlogon.
The screen-saver and Winlogon desktops are called "secured desktops", meaning they prevent regular programs on the default desktop from being messed with.
Conceptually I get that.
Additionally, it says the "unsecured screen-savers" run on that default desktop, thereby negating your security. Whoopsie. I would hate to create an "unsecured" screen-saver.
From a C# perspective, I've been looking at all the articles on creating screen savers I can find, and not a single dang one of them creates secure mode screen savers. Grah!
So, dear reader, where are the articles I cannot seem to find? I know somebody has done this, but my Google Fu is very weak. Please help.
Narf.
|
|
|
|
|
The screensaver-executable is loaded onto that desktop by default:
Quoted from the sample:
"Before a screensaver appears, Windows creates a new virtual desktop for it. The screensaver process is created on this second desktop, which is never locked. Any other processes that the screensaver creates will inherit this virtual desktop, [...]"
Take a look at the example here[^]. You'd have to scroll down until you find the heading "Secure a Locked Workstation"
I are Troll
|
|
|
|
|
Thank you!
Now I just have to figure it all out for my own stupid screen saver idea.
Narf.
|
|
|
|
|
Uh oh. I followed that whole example, but still couldn't get the interactive "Default" desktop to go away.
After a lot of testing, I had the silly idea to check the "Password protect" check box on the screen saver dialog. Et voila!
The documentation never says that part. It constantly implies that screen savers automatically launch in secure mode unless... they don't. Which is confusing as heck.
At least now I know how the secure mode is created, even if I have no control over the process. It's Windows that decides which context to run it in.
IF it's in secure mode, it does exactly what I want: create a blank desktop showing the current wallpaper and nothing else (save my screen saver form, which I made transparent). That's wonderful.
But I want that to happen whether it's in secure mode or interactive mode.
So I'm going to have to do some more testing on the desktop creation and switching API, which is a headache for a noob, but I suppose it's good learning experience.
Narf.
|
|
|
|