|
Hi All,
I am using Vb.Net 3.5
I want to Hide the windows taskbar when I am starting my windows application, and show the task bar again when I am exit from my application.
Please, tell me how can I do that from Vb.net.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
You can set your window position so it obscures the taskbar. You can't stop the user from using the task bar, nor should you want to.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I am just want to use Auto Hide Taskbar feature of the taskbar.
Rather, my form Size is sufficiant to show the full screen mode.
If my taskbar is hide then my application shows full screen but If my taskbar is shows then my application is not in fool screen mode.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
So basically, would you and make the form size = screen.workingarea?
This will work:
With Me
.TopMost = True
.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
.WindowState = FormWindowState.Maximized
End With
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I already do this job.
By this, The taskbar is not disabled.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
You cannot, and should not, disable the TaskBar.
|
|
|
|
|
If u want disable the task manager or hide u can use registry and u can make disable and enable.
|
|
|
|
|
Its not Task Manager, I wanted to hide the Task Bar
And How using registry.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
The only way to hide the Task Bar is to kill the Explorer process, but that's not acceptable to the user either.
|
|
|
|
|
simple test on google gives me over 100000 hits.
Public Const SWP_HIDEWINDOW As Integer = &H80
Public Const SWP_SHOWWINDOW As Integer = &H40
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer
Private Sub bHide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bHide.Click
Dim hSystray As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(hSystray, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub
Private Sub bShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bShow.Click
Dim hSystray As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(hSystray, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Sub
|
|
|
|
|
That doesn't disable the TaskBar, it just hides the window temporarily. It's still not a good idea to do.
|
|
|
|
|
I guess I don't truly understand the purpose of the request.
1. If pdnet has the app in Kiosk mode, why are you worrying about the taskbar - you can't see it anyways?
2. Don't know about you, but I'd be pissed if I ran an app and it started changing my theme/settings in Windows without me allowing it to do so.
All around bad idea to it.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Sometimes project specifications is to run it full screen so that the taskbar isnt visible. From what I gathered in his post, he doesn't want to disable it, just wants the same functionality as 'Autohide the taskbar' option.
I'm kind of curious as to this myself.
|
|
|
|
|
EliottA wrote: Sometimes project specifications is to run it full screen so that the taskbar isnt visible.
The code I posted earlier in this thread accomplishes that. The form covers the task bar, just like VS if you run it in full screen mode without changing the settings or killing the task bar itself.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I've got a legacy DB from which I need to extract a file. But when I do so, the file ends up approximately double the original size (and obviously also unopenable).
Does anybody know a way around this?
Thanks!
|
|
|
|
|
If you're able to connect to the DB at all, then there's no reason why the file should not come out OK. Hard to say more without seeing code, and knowing what sort of DB you're talking about. I'd assume the issue is in your code tho, b/c if you get a database connection at all, then it should return the right data to you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi. Thanks for the reply.
It's a SQL Server database. And yes, I am able to connect to it without any problems.
Here's the code I'm using to retrieve the file(s). This code works successfully with files that were saved by my .Net application.
<pre>Private Sub File_Read(ByVal FileName as String, ByVal strConn As String)
Try
Dim ConnRead As New SqlClient.SqlConnection
ConnRead.ConnectionString = strConn
ConnRead.Open()
Dim AdptRead As New SqlClient.SqlDataAdapter(" SELECT FData " & _
" FROM Misc " & _
" WHERE FName = 'filename.exe' ", ConnRead)
Dim CmdBldRead As SqlClient.SqlCommandBuilder = New SqlClient.SqlCommandBuilder(AdptRead)
Dim dsRead As New DataSet
AdptRead.Fill(dsRead)
Dim myRow As DataRow
myRow = dsRead.Tables(0).Rows(0)
Dim byteRead() As Byte = myRow("FData")
Dim sFilePath As String = Application.StartupPath & "\" & FileName
Dim fStream As IO.FileStream
fStream = New IO.FileStream(sFilePath, IO.FileMode.Create)
fStream.Write(byteRead, 0, byteRead.Length)
fStream.Flush()
fStream.Close()
fStream.Dispose()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub</pre>
The file I'm retrieving is 48kb big, but when I retrieve it, it's size is 96kb.
Thank you for your help. Please let me know if you require any more info.
|
|
|
|
|
What is the data type for FData in the database?
If it's varchar, you most likely use different collation now than what was used with VB6.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
How to connect Report with out wizard
Pl give me sample code
VB.Net2005 front laver and Sql Server2005 is back laver
Franics K Antony
|
|
|
|
|
Hey u can connect the database and assign the field to the text or label in report. sorry in my system no backend software. It works I tried previous. Before doing formatting system.
|
|
|
|
|
hi, I,m trying to create a hierarchical view of the data in my database using a gridview but the problem is every time I load the data to the gridview, they will just file in single line. Can you help me to arrange my data in a hierarchical form?
thank a lot.
|
|
|
|
|
You'll need a third party grid to do this. The DataGridView in the .NET Framework does not support this. I suggest looking into DevExpress' control sets.
|
|
|
|
|
actually if I understand what he means with hierarchical gridview it is possible although not easy.
have a look at this
http://blogs.msdn.com/markrideout/archive/2006/01/08/510700.aspx
I never understood why the old datagrid control supported this and the new datagridview doesn't, but I guess that's microsoft.
But as you suggested the DevExpress controls are easyer to use and have alot more options.
|
|
|
|
|
Tom deketelaere wrote: I never understood why the old datagrid control supported this and the new datagridview doesn't, but I guess that's microsoft.
Yeah, I couldn't figure that one out either, and here we are, on the cusp of .NET 4.0 and we still can't do it easily.
Tom deketelaere wrote: But as you suggested the DevExpress controls are easyer to use and have alot more options.
It's much easier to do it with a control that was designed for it from the start than to hack it together.
|
|
|
|
|
Dave Kreskowiak wrote: It's much easier to do it with a control that was designed for it from the start than to hack it together.
True. I actually started to make my own custom grid control (based on the standerd gridview ofcourse), I didn't get far.
I'v been using the devexpress controls for olmost a year now and I have to say there very easy to use (once you understand how they work) and very extended, I fear I'v only scratched the surfice.
|
|
|
|