|
Hi,
I`ve run into an interesting situation here.I created an AppBar
(as per the tuto :http://www.codeproject.com/csharp/csdoesshell3.asp) and am now trying to extend it by preventing any window from being anywhere within the Appbar`s reserved space.
The current implementation always keeps the AppBar as topmost on the z-order, but is it possible to stop a window drag operation from entering the AppBar area itself, or in general for any form`s area ?
One technique i tried was to use the ShellAPI function of SystemParametersInfo for GETWORKINGAREA & SETWORKINGAREA , but the trouble with this is that the "boundary" keeps varying i.e all the other windows are supposed to be confined to the reduced desktop working area but if u try to drag these windows they get progressively closer to my appbar(which is docked to the left edge of the screen). The code snippets are as below :
<br />
private const int SPIF_SENDWININICHANGE = 2;<br />
<br />
private const int SPIF_UPDATEINIFILE = 1;<br />
<br />
private const int SPIF_change = SPIF_SENDWININICHANGE;<br />
<br />
private const Int32 SPI_SETWORKAREA = 47;<br />
<br />
public static int SetWorkspace(RECT workspaceRect)<br />
{<br />
<br />
IntPtr ptr = IntPtr.Zero;<br />
ptr = Marshal.AllocHGlobal(Marshal.SizeOf(workspaceRect));<br />
Marshal.StructureToPtr(workspaceRect, ptr, true);<br />
return UnmanagedMethods.SystemParametersInfo( SPI_SETWORKAREA, <br />
Marshal.SizeOf(workspaceRect), <br />
ptr, SPIF_change);<br />
}<br />
1. Is there any setting via control panel that enables me to reduce the desktop area manually(coz that way , i can do registry changes at startup and let the system handle all the behind-the-scenes manipulation )
or
2.Is there any other alternative approach ?
thanks in advance
|
|
|
|
|
Hi
I'm using a custom UserControl in my project.
Whe I created the control, debugging it went fine.
Because we are using a Team Foundation Server
with Sourc Control I have to check in this project
daily.
Now my problem. After an check out VS2005 won't debug
this control any more. I says that I can't debug
class libraries. Of course it can't. But I don't know
why my control is now recongized as an class library.
And debuging it through a little win form won't work
either, the control isn't shown in the toolbox.
Inserting the control directly by .dll into toolbox makes no sense,
because debugging doesn't work.
And the "UserControlTestContainer" is useless, too.
thanks in advance
regards pdluke
|
|
|
|
|
How to upload image in Windows application.Like in Web application ,there is File upload control.In windows app How can we upload a file or image.
|
|
|
|
|
Do you wanna upload the image to a directory of Web Server?
Then, you can use "WebClient" for uploading the image..
Do you wanna upload the image to database?
then, convert the image to bytes and send it to database...
Dim prmPersonImage As New SqlParameter("@pPersonImage", SqlDbType.Image)<br />
prmPersonImage.Value = ImageContent<br />
myCommand.Parameters.Add(prmPersonImage)
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I want a whole functionality of how a user select a image or u can say which control should i use to select a image in Windows Application.
after selecting images (In this case i m giving functionality of user to select upto 3 images),There should be made a folder in my project and images should be saved there.
Kindly tell me How can i make this functionality.
Kartik
|
|
|
|
|
Place one textbox, one button and one FileOpenDialog control on the form.. Show the FileOpendialog on click event of button...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hello Guys,
I have a file (e.g test.txt) with the content:
123456
456789
abcdef
!@@#$%
Now, i want to remove one line of this file.
Anyone know? please help me
So many thanks
Thuan
|
|
|
|
|
read the whole thing, remove the line, write it out.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi,
You can use "System.IO.File.ReadAllText(path of ur txt file)" to copy the contents of the file in a "TextBox". Then remove the line u want to remove and save the file using "System.IO.File.WriteAllText(path of ur txt file, TextBox1.Text)".
Regards
Paramhans Dubey.
|
|
|
|
|
how to set a tooltip for a cbutton in c++ using only one method ?
dghdfghdfghdfghdgh
|
|
|
|
|
ellllllllie wrote: using only one method
Why only one method? If it takes two, then why not two?
|
|
|
|
|
ok lets go give me the solution.
My goal is to not extend my code.
any way any help is good
dghdfghdfghdfghdgh
|
|
|
|
|
how to retrieve the value of a variable without its adddress memory?
a=00x12b "E";
i want to get only "E"
regards
dghdfghdfghdfghdgh
|
|
|
|
|
What does this or your other question have to do with Windows Forms ( C#/VB.NET/C++/CLI ) ? Unless you're using the .NET framework, you're in the wrong place.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi All
How do I change the apperiance of a windows form Skin it as such. This is if I want to create a theme form my Windows forms Project.
Thanks in advance
P
|
|
|
|
|
This is something you need to write for yourself.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
givens:
I have a resource file
it contains controls with their properties
I have read the properties of each control
and their values
the resx file contains controls with their properties and values
such as
button1 that has :
button1.Text
button1.Location
button1.Size
but the Type of button1 doesn't exist//type of each control doesn't exist
and so on
the problem that i want to create controls that existed in resx file after choosing it from OpeningFileDialog
at run time
how can I do that
Note that the resx file doesn't contain Type of each controls
if you have another way to get controls from resx file and create them at runtime plz tell me
thanks
|
|
|
|
|
I need to add a custom menu inside the file menu's export to option in Infopath 2003 forms. Can anyone help me out on how to do it?
Thanks in advance,
Lavanya.
|
|
|
|
|
Hi,
If I am looking at developing a new windows forms Application VB.Net 2005 Some Things to look at is why not develope it in a alone standing exe why all these DLLS, What would be the best Architeture using Plain windows forms application to connect to a central data source with massive data being transfered to the client or using dot net remoting ??
Well I am new to the windows applications arena any help would be appreciated.
Best regards P
|
|
|
|
|
Just like a web app, if you've got serious database work going on, it's best to build a data layer, which will be in a dll. The business rules I'd be less likely to put in a dll, if I was writing a windows app, but I would use namespaces to create that seperation still.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If you must favour a single application, then you should still follow Christian's advice below, and keep your data access and business logic in separate classes, used by your forms. Basically, all your forms should do is respond to UI events, and populate controls.
|
|
|
|
|
Have you tried one of Microsoft's own best practices such as Enterprise Library 3.1 that combined with Composite UI Application Block (CAB)? This will provide you the best practices, application blocks and hence, good architecture (which is already used and tested by others) to start.
This is the link:
http://msdn2.microsoft.com/en-us/practices/default.aspx[^]
best regards,
Eriawan K.
|
|
|
|
|
is it possible to make a floating panel in vb.net
what can be drag and place any where with the form
himanshu p.taunk
|
|
|
|
|
Yes, just handle the mouse events and move the control as the mouse moves.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Can any one plz help me how to remove the icon shown at the top-left corner of my windows form....
thanks in advance
Regards,
Sreenivas
|
|
|
|