Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
GeneralHelp needed regarding MSI Pin
robustm5-Mar-08 9:34
robustm5-Mar-08 9:34 
GeneralRe: Help needed regarding MSI Pin
Christian Graus5-Mar-08 10:13
protectorChristian Graus5-Mar-08 10:13 
QuestionRun with the windows Pin
Knowledgestudent5-Mar-08 9:09
Knowledgestudent5-Mar-08 9:09 
GeneralRe: Run with the windows Pin
Pete O'Hanlon5-Mar-08 9:40
mvePete O'Hanlon5-Mar-08 9:40 
QuestionRe: Run with the windows Pin
Knowledgestudent5-Mar-08 11:19
Knowledgestudent5-Mar-08 11:19 
GeneralRe: Run with the windows Pin
Ravi Bhavnani5-Mar-08 18:47
professionalRavi Bhavnani5-Mar-08 18:47 
QuestionRe: Run with the windows Pin
Knowledgestudent9-Mar-08 11:13
Knowledgestudent9-Mar-08 11:13 
QuestionSystemParametersInfo SPI_SETWORKAREA Pin
chrsarly045-Mar-08 8:48
chrsarly045-Mar-08 8:48 
Is anyone able to help me get this to work? Im not that familiar with the Windows API and have been fiddling around with this for days D'Oh! | :doh:

<br />
using System;<br />
using System.Runtime.InteropServices;<br />
<br />
namespace System<br />
{<br />
	public class WorkingArea<br />
	{<br />
		[DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]<br />
        [return:MarshalAs(UnmanagedType.Bool)]<br />
        public static extern bool SendMessageTimeout(IntPtr hWnd,int Msg,string lParam,int uTimeout,int lpdwResult);<br />
<br />
		public struct RECT<br />
		{<br />
			public int Left;<br />
			public int Top;<br />
			public int Right;<br />
			public int Bottom;<br />
		}<br />
		[DllImport("User32.dll", EntryPoint = "SystemParametersInfoA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]<br />
		private static extern short SystemParametersInfo(short uAction, short uparam, ref RECT lpvParam, short fuWinIni);<br />
		[DllImport("user32", EntryPoint = "PostMessageA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]<br />
		private static extern int PostMessage(int hwnd, int wMsg, int wParam, ref int lParam);<br />
<br />
	<br />
        public const int HWND_BROADCAST = 0xffff;<br />
        public const int WM_SETTINGCHANGE = 0x001A;<br />
        public const int SMTO_NORMAL = 0x0000;<br />
        public const int SMTO_BLOCK = 0x0001;<br />
        public const int SMTO_ABORTIFHUNG = 0x0002;<br />
        public const int SMTO_NOTIMEOUTIFNOTHUNG = 0x0008;<br />
	public const int SPIF_SENDCHANGE = 0x02;<br />
	public const short SPI_SETWORKAREA = 47;<br />
	<br />
		public void SetWorkArea(RECT rect)<br />
		{<br />
			SystemParametersInfo(SPI_SETWORKAREA, 0,ref rect, SPIF_SENDCHANGE);<br />
			//SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETWORKAREA, "", SMTO_ABORTIFHUNG, 100000, null);<br />
		}<br />
	}<br />
}


ie.

WorkingArea WorkSpace = new WorkingArea();<br />
RECT Area = new WorkingArea.RECT();<br />
Area.Left=25;<br />
Area.Top=25;<br />
Area.Bottom=25;<br />
Area.Right=25;<br />
WorkSpace.SetWorkArea(Area);


------------------------

GeneralApplication Issue with Access and ReportViewer Pin
rwinte5-Mar-08 8:40
rwinte5-Mar-08 8:40 
GeneralMVP Pattern Pin
Quang Tran Minh5-Mar-08 6:29
Quang Tran Minh5-Mar-08 6:29 
GeneralRe: MVP Pattern Pin
led mike5-Mar-08 6:38
led mike5-Mar-08 6:38 
GeneralRe: MVP Pattern [modified] Pin
papadimitriou5-Mar-08 8:47
papadimitriou5-Mar-08 8:47 
GeneralRe: MVP Pattern Pin
led mike5-Mar-08 8:56
led mike5-Mar-08 8:56 
GeneralRe: MVP Pattern Pin
Quang Tran Minh5-Mar-08 11:11
Quang Tran Minh5-Mar-08 11:11 
GeneralRe: MVP Pattern Pin
led mike5-Mar-08 11:18
led mike5-Mar-08 11:18 
QuestionAvoid duplicates in adding records in MySQL db Pin
baranils5-Mar-08 5:56
baranils5-Mar-08 5:56 
GeneralRe: Avoid duplicates in adding records in MySQL db Pin
led mike5-Mar-08 6:02
led mike5-Mar-08 6:02 
GeneralRe: Avoid duplicates in adding records in MySQL db Pin
baranils5-Mar-08 6:31
baranils5-Mar-08 6:31 
GeneralRe: Avoid duplicates in adding records in MySQL db Pin
led mike5-Mar-08 6:42
led mike5-Mar-08 6:42 
GeneralRe: Avoid duplicates in adding records in MySQL db Pin
#realJSOP6-Mar-08 6:11
mve#realJSOP6-Mar-08 6:11 
QuestionHow to read a file from Ftp Pin
kibromg5-Mar-08 5:14
kibromg5-Mar-08 5:14 
AnswerRe: How to read a file from Ftp Pin
Anthony Mushrow5-Mar-08 5:59
professionalAnthony Mushrow5-Mar-08 5:59 
GeneralRe: How to read a file from Ftp Pin
kibromg6-Mar-08 1:49
kibromg6-Mar-08 1:49 
GeneralRe: How to read a file from Ftp Pin
Anthony Mushrow6-Mar-08 6:59
professionalAnthony Mushrow6-Mar-08 6:59 
QuestionHow to make control reflect changes was maded on his datasource Pin
El'Cachubrey5-Mar-08 4:54
El'Cachubrey5-Mar-08 4:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.