|
You cannot accomplish this task entirely from your code. This requires configuring Windows policies to handle most of this stuff. All of this is covered in the "Windows Resource Kit", under running Windows in a Kiosk mode. Get a copy from Amazon.com.
|
|
|
|
|
CG comment lead me to this article [^]it may be useful
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes and No
For the average user placing your application topmost will be enough, for the more advanced user there is NOTHING you can do (at least not legally). There is always a way to get the task manager at least if this is a app controlled with the keyboard (touchscreen is different).
|
|
|
|
|
what if i want to hide the task bar so as to create a game ,you know, like fifa etc
what do they do
TheMrProgrammer
|
|
|
|
|
As far as I know they don't do what you are trying to do, yes the task bar is 'hidden' but you can still access it (pres windows button or ctrl-escape). The reason its hidden is because the game is played full screen (maximized + topmost).
I don't play many games but I'v never played one where the game prevented me from accessing my start menu (or anything else on my pc) if I had that game would have been uninstalled faster than I can type this message .
I didn't say you can't hide the taskbar, I said you can't make it so that the user can't access it.
Out of curiosity will the user have a keyboard or will it be touchscreen?
(I ask because when its touchscreen you can do this (for the most part) since then you control what the user can press)
|
|
|
|
|
Those games don't use Windows the same way you do in your app. They pretty much take over the video card using DirectX and render everything themselves. You can still get to the Task Manager and Start bar though, with a simple Alt-Tab.
|
|
|
|
|
If you set the window state to topmost then yes, it will stay on top of the taskbar.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
|
<Dr. Evil voice>Riiiiiiiiiiiiiiiiiiiight.</Dr. Evil voice>
modified on Monday, May 4, 2009 11:20 PM
|
|
|
|
|
thanks but how to kill explore.exe?
-----------------------------
I am a beginner
|
|
|
|
|
Don't listen to him. You do NOT want to kill Explorer.exe.
|
|
|
|
|
It's a situation that, if you have to ask, you shouldn't be told. Because the way to replace explorer can also make a system nearly unusable. Which means by the time you know how to deal with not having explorer, you'll also find out how to replace it.
Until then, start reading up on the windows resource kits. They'll let you enable security policies that can do what you're looking for in a safe manner.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
I would like to have the functionality to: on click, edit a subitem in a Listview.
I am building an MP3 file ID3 Tag editor and am loading a listview with all the tracks found in a folder. I would like the ability to select a particular entries subitem, then edit it. I know the first column can be edited, but have been unable to work out how to do this for subitems. I know I can get the text from the subitem, or even replace the text in a subitem, but I'd rather have it behave just like it does when the first item in the row is selected for editing. (This makes sense?)
The CodeProject site has something like this, and I think it places a textbox over the selected cell for editing purposes - however it is coded in C# and as a noob, I do not know how to convert this to VB code. D'oh!
Any advice would be gratefully accepted.
I am using Visual Studio 2008 if that helps.
All the best,
Ross
|
|
|
|
|
There are plenty of C# to VB translation programs out on the InterWeb. Have a Google and play with one or two.
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.”
|
|
|
|
|
Hi all,
I want to select a folder from FolderBrowserDialog and write into a textbox and append all the files within the folder shown in the textbox as one file in the same folder...
Code sofar:
Private Sub BtnFolder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnFolder.Click
Dim MyFolderBrowser As New System.Windows.Forms.FolderBrowserDialog
MyFolderBrowser.Description = "Select the Folder"
MyFolderBrowser.ShowNewFolderButton = False
Dim dlgResult As DialogResult = MyFolderBrowser.ShowDialog()
If dlgResult = Windows.Forms.DialogResult.OK Then
Textbox1.Text = MyFolderBrowser.SelectedPath
End If
End Sub
The above code opens a FolderBrowserDialog and allows to select a folder and the selected path is copied to the textbox.
Now, i want to know how to append all the files within the selected folder and write as one new textfile by clicking a button.
Thanks
Vijay
|
|
|
|
|
File.ReadAllText will read any file, you can concatenate strings.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
|
Three things.
1 The Button1_Click should be
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AppendFiles()
End Sub
You need to tell it that Button1_Click_1 handles the Click event.
2 This is a hodge-podge of VB.Net and VBScript. You don't need all that FSO stuff. Have a look at reading and writing textfiles on MSDN or help system.
3 Be careful with the folder path. It needs to end with '\' before you join the filename, but that's not what is in the textbox.
Having said that the basic idea seems sound, it just won't work. It's relying on e.g. MainFile being a variant which does not exist in VB.NET. (Look at the two assignments: ones a string the other a file object.)
It won't even compile if you have Option Explicit and Option Strict set (as they ought to be).
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
The line AppendFiles(TextBox1.Text, "c:\DB\append\Append.txt") just passes the folder into the sub not the files in the folder.
You also need to loop through the files in the folder. Something like this:
Dim theDir As DirectoryInfo = new DirectoryInfo(iFile);
Dim datFiles As FileInfo() = theDir.GetFiles("*.txt");
Using sw As StreamWriter = New StreamWriter(oFile, True, System.Text.Encoding.Default)
For Each (fi As FileInfo In datFiles)
Using sa As StreamReader = New StreamReader(fi.FullName, System.Text.Encoding.Default)
'read and write text
End Using
Next
End Using
Syntax might not be quite right - copied and edited from C# code - but the general idea is ok.
This is what your friend's Do...Loop was trying to do.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Im getting 2 errors in this line
For Each ( fi As FileInfo In datFiles)
1)fi not declared
2)')' expected
I declared fi as string but still there is an error.
|
|
|
|
|
Should be For Each fi As FileInfo in datFiles i.e. no ( or ).
That's what happens when you copy and paste from C# which requires ( and )
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Thanks a lot I have written the code for Read and write and its working fine now.
I need to write the file creation date for the appended files.
Code I wrote:
GetCreationTime(iFile)
The creation time for each time is different, but its writing the same date for all the files...
Is there anyother method that could help to write the file creation date and time???
|
|
|
|
|
This would get creation time for file
For Each fi As FileInfo In datFiles
Dim created As DateTime = fi.CreationTime
Using sa As StreamReader = New StreamReader(fi.FullName, System.Text.Encoding.Default)
'read and write text
End Using
Next
I don't know where you're calling GetCreationTime() but it looks like you are passing in the folder and not the files.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Thanks a lot, that works fine.
Im using CreationTime() while writing the file.
|
|
|
|