דילוג לתוכן
  • דף הבית
  • קטגוריות
  • פוסטים אחרונים
  • משתמשים
  • חיפוש
  • חוקי הפורום
כיווץ
תחומים

תחומים - פורום חרדי מקצועי

💡 רוצה לזכור קריאת שמע בזמן? לחץ כאן!
מ

מנצפך 0

@מנצפך 0
אודות
פוסטים
264
נושאים
32
קבוצות
0
עוקבים
0
עוקב אחרי
0

פוסטים

פוסטים אחרונים הגבוה ביותר שנוי במחלוקת

  • אשמח להסבר: MySqlCommandBuilder
    מ מנצפך 0

    הפונקציה update היא בסה"כ עטיפה למשפט SQL שמעדכן את הטבלה.
    ה MySqlCommandBuilder הוא היוצר של משפט הSQL.
    גם אחרי שיצאת מהפונקציה של קריאת הנתונים, הוא לא נעלם. כי הוא שייך לאובייקט dataAdapter שהוא גלובלי אתלך.

    פורסם במקור בפורום CODE613 ב27/11/2017 22:25 (+02:00)


  • ירוק בוסר
    מ מנצפך 0

    @יאן גולד

    הדברים הכי בסיסיים שצריך לדעת: מסד נתונים כלומר מידע שמסודר בדרך כלל בטבלאות. מה שנפוץ זה SQL SERVER. תוריד גם את זה.
    שפת תיכנות צד שרת (שזה אומר למשל המחשב ששולח את התגובה שאני עכשיו כותב לך) כדאי C# שפה קלה ונוחה.
    צד לקוח (שזה אומר המחשב שלך שקיבל מידע מהשרת) JAVA SCRIPT HTML CSS. עם הדברים האלה אפשר לבנות הכל.
    והעיקר לא לפחד כלל ממושגים חדשים ובעיקר לא מראשי תיבות מפוצצים באנגלית.

    וואוו!! תרחמו על הבנאדם!!
    תתחיל עם C# נטו. אחרי שתעשה "שלום עולם" וכמה תוכנות פיציות (בשביל להתלהב ולהבין מי נגד מה) תמשיך כנ"ל למסדי נתונים וכו' (לא אקסס).
    הייתי ממליץ לך להשקיע הרבה ב-C#. יש להם סביבת עבודה נפלאה וברורה למשתמשי ווינדוס (visual studio). יכול דיבוג טובות וכמובן השלמה אוטומטית של מילים, צביעה של הקוד לפי ההקשר ועוד. אבל אחרי שאתה מרגיש שליטה טובה (יכול להיות כמה שנים. תלוי בקצב הלימוד) תתקדם לשפות אחרות (תשאל אז מה הולך...).
    אתר נחמד בעברית: http://webmaster.org.il/articles/csharp
    אם יש לך ידיעה בסיסית באנגלית (הכרת האותיות. קריאה- אפילו איטית), תנסה להתקדם ככה, מה שצריך תתרגם בגוגל. ולאט לאט תרכוש שליטה בשפה.
    המון הצלחה.

    פורסם במקור בפורום CODE613 ב13/06/2016 22:34 (+03:00)


  • נעילת המחשב כך שיציג רק תוכנה מסוימת
    מ מנצפך 0

    יצירת דסקטופ הוא בתחום C#.
    (איך מעלים קבצים?).
    לא צריך לבטל CTRL+ALT+DEL.
    רק לשנות ברגיסטרי שלא תהיה שם שום אפשרות של כיבוי וכו'.
    קובץ REG:

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
    "NoDriveTypeAutoRun"=dword:000000FF
    "NoLogoff"=dword:00000001
    "NoClose"=dword:00000001
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
    "DisableLockWorkstation"=dword:00000001
    "DisableTaskMgr"=dword:00000001
    "DisableChangePassword"=dword:00000001
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
    "HideFastUserSwitching"=dword:00000001
    
    [HKEY_CURRENT_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
    "NoDriveTypeAutoRun"=dword:000000FF
    

    מחלקה ליצירת דסקטופ C#: (לא שלי).

    #region License
    // Desktop 1.1
    //																																							*
    // Copyright (C) 2004  http://www.onyeyiri.co.uk
    // Coded by: Nnamdi Onyeyiri
    //
    // This code may be used in any way you desire except for commercial use.
    // The code can be freely redistributed unmodified as long as all of the authors 
    // copyright notices remain intact, as long as it is not being sold for profit.
    // Although I have tried to ensure the stability of the code, I will not take 
    // responsibility for any loss, damages, or death it may cause.
    //
    // This software is provided "as is" without any expressed or implied warranty.
    //
    // -------------------------
    // Change Log
    //
    // Version 1.0:  -First Release
    //
    // Version 1.1:  -Added Window and WindowCollection classes
    // 6/6/2004      -Added another GetWindows overload, that used WindowCollection
    //               -Added GetInputProcesses method to retrieve processes on Input desktop
    //               -Changed GetWindows and GetDesktops to return arrays, instead of them being passed by ref
    //
    // Version 1.2   -Implemented IDisposable
    // 8/7/2004      -Implemented ICloneable
    //               -Overrided ToString to return desktop name
    #endregion
    
    using System;
    using System.Threading;
    using System.Collections;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    using System.Collections.Specialized;
    
    namespace Onyeyiri
    {
    	/// <summary>
    	/// Encapsulates the Desktop API.
    	/// </summary>
    	public class Desktop : IDisposable, ICloneable
    	{
    		#region Imports
    		[DllImport("kernel32.dll")]
    		private static extern int GetThreadId(IntPtr thread);
    
    		[DllImport("kernel32.dll")]
    		private static extern int GetProcessId(IntPtr process);
    
    		//
    		// Imported winAPI functions.
    		//
    		[DllImport("user32.dll")]
    		private static extern IntPtr CreateDesktop(string lpszDesktop, IntPtr lpszDevice, IntPtr pDevmode, int dwFlags, long dwDesiredAccess, IntPtr lpsa); 
    
    		[DllImport("user32.dll")]
    		private static extern bool CloseDesktop(IntPtr hDesktop);
    
    		[DllImport("user32.dll")]
    		private static extern IntPtr OpenDesktop(string lpszDesktop, int dwFlags, bool fInherit, long dwDesiredAccess);
    
    		[DllImport("user32.dll")]
    		private static extern IntPtr OpenInputDesktop(int dwFlags, bool fInherit, long dwDesiredAccess);
    
    		[DllImport("user32.dll")]
    		private static extern bool SwitchDesktop(IntPtr hDesktop);
    
    		[DllImport("user32.dll")]
    		private static extern bool EnumDesktops(IntPtr hwinsta, EnumDesktopProc lpEnumFunc, IntPtr lParam);
    
    		[DllImport("user32.dll")]
    		private static extern IntPtr GetProcessWindowStation();
    
    		[DllImport("user32.dll")]
    		private static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc lpfn, IntPtr lParam);
    
    		[DllImport("user32.dll")]
    		private static extern bool SetThreadDesktop(IntPtr hDesktop);
    
    		[DllImport("user32.dll")]
    		private static extern IntPtr GetThreadDesktop(int dwThreadId);
    
    		[DllImport("user32.dll")]
    		private static extern bool GetUserObjectInformation(IntPtr hObj, int nIndex, IntPtr pvInfo, int nLength, ref int lpnLengthNeeded);
    
    		[DllImport("kernel32.dll")]
    		private static extern bool CreateProcess(
    			string lpApplicationName,
    			string lpCommandLine,
    			IntPtr lpProcessAttributes,
    			IntPtr lpThreadAttributes,
    			bool bInheritHandles,
    			int dwCreationFlags,
    			IntPtr lpEnvironment,
    			string lpCurrentDirectory,
    			ref STARTUPINFO lpStartupInfo,
    			ref PROCESS_INFORMATION lpProcessInformation
    			);
    
    		[DllImport("user32.dll")]
    		private static extern int GetWindowText(IntPtr hWnd, IntPtr lpString, int nMaxCount);
    
    		private delegate bool EnumDesktopProc(string lpszDesktop, IntPtr lParam);
    		private delegate bool EnumDesktopWindowsProc(IntPtr desktopHandle, IntPtr lParam);
    
    		[StructLayout(LayoutKind.Sequential)]
    		private struct PROCESS_INFORMATION 
    		{
    			public IntPtr hProcess;
    			public IntPtr hThread;
    			public int dwProcessId;
    			public int dwThreadId;
    		}
    
    		[StructLayout(LayoutKind.Sequential)]
    		private struct STARTUPINFO 
    		{
    			public int cb;
    			public string lpReserved;
    			public string lpDesktop;
    			public string lpTitle;
    			public int dwX;
    			public int dwY;
    			public int dwXSize;
    			public int dwYSize;
    			public int dwXCountChars;
    			public int dwYCountChars;
    			public int dwFillAttribute;
    			public int dwFlags;
    			public short wShowWindow;
    			public short cbReserved2;
    			public IntPtr lpReserved2;
    			public IntPtr hStdInput;
    			public IntPtr hStdOutput;
    			public IntPtr hStdError;
    		}
    		#endregion
    
    		#region Constants
    		/// <summary>
    		/// Size of buffer used when retrieving window names.
    		/// </summary>
    		public const int MaxWindowNameLength = 100;
    
    		//
    		// winAPI constants.
    		//
    		private const short SW_HIDE = 0;
    		private const short SW_NORMAL = 1;
    		private const int STARTF_USESTDHANDLES = 0x00000100;
    		private const int STARTF_USESHOWWINDOW = 0x00000001;
    		private const int UOI_NAME = 2;
    		private const int STARTF_USEPOSITION = 0x00000004;
    		private const int NORMAL_PRIORITY_CLASS = 0x00000020;
    		private const long DESKTOP_CREATEWINDOW = 0x0002L;
    		private const long DESKTOP_ENUMERATE = 0x0040L;
    		private const long DESKTOP_WRITEOBJECTS = 0x0080L;
    		private const long DESKTOP_SWITCHDESKTOP = 0x0100L;
    		private const long DESKTOP_CREATEMENU = 0x0004L;
    		private const long DESKTOP_HOOKCONTROL = 0x0008L;
    		private const long DESKTOP_READOBJECTS = 0x0001L;
    		private const long DESKTOP_JOURNALRECORD = 0x0010L;
    		private const long DESKTOP_JOURNALPLAYBACK = 0x0020L;
    		private const long AccessRights = DESKTOP_JOURNALRECORD | DESKTOP_JOURNALPLAYBACK | DESKTOP_CREATEWINDOW | DESKTOP_ENUMERATE | DESKTOP_WRITEOBJECTS | DESKTOP_SWITCHDESKTOP | DESKTOP_CREATEMENU | DESKTOP_HOOKCONTROL | DESKTOP_READOBJECTS;
    		#endregion
    
    		#region Structures
    		/// <summary>
    		/// Stores window handles and titles.
    		/// </summary>
    		public struct Window
    		{
    			#region Private Variables
    			private IntPtr m_handle;
    			private string m_text;
    			#endregion
    
    			#region Public Properties
    			/// <summary>
    			/// Gets the window handle.
    			/// </summary>
    			public IntPtr Handle
    			{
    				get
    				{
    					return m_handle;
    				}
    			}
    
    			/// <summary>
    			/// Gets teh window title.
    			/// </summary>
    			public string Text
    			{
    				get
    				{
    					return m_text;
    				}
    			}
    			#endregion
    
    			#region Construction
    			/// <summary>
    			/// Creates a new window object.
    			/// </summary>
    			/// <param name="handle">Window handle.</param>
    			/// <param name="text">Window title.</param>
    			public Window(IntPtr handle, string text)
    			{
    				m_handle = handle;
    				m_text = text;
    			}
    			#endregion
    		}
    
    		/// <summary>
    		/// A collection for Window objects.
    		/// </summary>
    		public class WindowCollection : CollectionBase
    		{
    			#region Public Properties
    			/// <summary>
    			/// Gets a window from teh collection.
    			/// </summary>
    			public Window this[int index]
    			{
    				get
    				{
    					return (Window)List[index];
    				}
    			}
    			#endregion
    
    			#region Methods
    			/// <summary>
    			/// Adds a window to the collection.
    			/// </summary>
    			/// <param name="wnd">Window to add.</param>
    			public void Add(Window wnd)
    			{
    				// adds a widow to the collection.
    				List.Add(wnd);
    			}
    			#endregion
    		}
    		#endregion
    
    		#region Private Variables
    		private IntPtr m_desktop;
    		private string m_desktopName;
    		private static StringCollection m_sc;
    		private ArrayList m_windows;
    		private bool m_disposed;
    		#endregion
    
    		#region Public Properties
    		/// <summary>
    		/// Gets if a desktop is open.
    		/// </summary>
    		public bool IsOpen
    		{
    			get
    			{
    				return (m_desktop != IntPtr.Zero);
    			}
    		}
    
    		/// <summary>
    		/// Gets the name of the desktop, returns null if no desktop is open.
    		/// </summary>
    		public string DesktopName
    		{
    			get
    			{
    				return m_desktopName;
    			}
    		}
    
    		/// <summary>
    		/// Gets a handle to the desktop, IntPtr.Zero if no desktop open.
    		/// </summary>
    		public IntPtr DesktopHandle
    		{
    			get
    			{
    				return m_desktop;
    			}
    		}
    
    		/// <summary>
    		/// Opens the default desktop.
    		/// </summary>
    		public static readonly Desktop Default = Desktop.OpenDefaultDesktop();
    
    		/// <summary>
    		/// Opens the desktop the user if viewing.
    		/// </summary>
    		public static readonly Desktop Input = Desktop.OpenInputDesktop();
    		#endregion
    
    		#region Construction/Destruction
    		/// <summary>
    		/// Creates a new Desktop object.
    		/// </summary>
    		public Desktop()
    		{
    			// init variables.
    			m_desktop = IntPtr.Zero;
    			m_desktopName = String.Empty;
    			m_windows = new ArrayList();
    			m_disposed = false;
    		}
    
    		// constructor is private to prevent invalid handles being passed to it.
    		private Desktop(IntPtr desktop)
    		{
    			// init variables.
    			m_desktop = desktop;
    			m_desktopName = Desktop.GetDesktopName(desktop);
    			m_windows = new ArrayList();
    			m_disposed = false;
    		}
    
    		~Desktop()
    		{
    			// clean up, close the desktop.
    			Close();
    		}
    		#endregion
    
    		#region Methods
    		/// <summary>
    		/// Creates a new desktop.  If a handle is open, it will be closed.
    		/// </summary>
    		/// <param name="name">The name of the new desktop.  Must be unique, and is case sensitive.</param>
    		/// <returns>True if desktop was successfully created, otherwise false.</returns>
    		public bool Create(string name)
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			// close the open desktop.
    			if (m_desktop != IntPtr.Zero)
    			{
    				// attempt to close the desktop.
    				if (!Close()) return false;
    			}
    	
    			// make sure desktop doesnt already exist.
    			if (Desktop.Exists(name))
    			{
    				// it exists, so open it.
    				return Open(name);
    			}
    
    			// attempt to create desktop.
    			m_desktop = CreateDesktop(name, IntPtr.Zero, IntPtr.Zero, 0, AccessRights, IntPtr.Zero);
    
    			m_desktopName = name;
    
    			// something went wrong.
    			if (m_desktop == IntPtr.Zero) return false;
    
    			return true;
    		}
    		
    		/// <summary>
    		/// Closes the handle to a desktop.
    		/// </summary>
    		/// <returns>True if an open handle was successfully closed.</returns>
    		public bool Close()
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			// check there is a desktop open.
    			if (m_desktop != IntPtr.Zero)
    			{
    				// close the desktop.
    				bool result = CloseDesktop(m_desktop);
    
    				if (result)
    				{
    					m_desktop = IntPtr.Zero;
    
    					m_desktopName = String.Empty;
    				}
    
    				return result;
    			}
    
    			// no desktop was open, so desktop is closed.
    			return true;
    		}
    
    		/// <summary>
    		/// Opens a desktop.
    		/// </summary>
    		/// <param name="name">The name of the desktop to open.</param>
    		/// <returns>True if the desktop was successfully opened.</returns>
    		public bool Open(string name)
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			// close the open desktop.
    			if (m_desktop != IntPtr.Zero)
    			{
    				// attempt to close the desktop.
    				if (!Close()) return false;
    			}
    
    			// open the desktop.
    			m_desktop = OpenDesktop(name, 0, true, AccessRights);
    
    			// something went wrong.
    			if (m_desktop == IntPtr.Zero) return false;
    
    			m_desktopName = name;
    
    			return true;
    		}
    
    		/// <summary>
    		/// Opens the current input desktop.
    		/// </summary>
    		/// <returns>True if the desktop was succesfully opened.</returns>
    		public bool OpenInput()
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			// close the open desktop.
    			if (m_desktop != IntPtr.Zero)
    			{
    				// attempt to close the desktop.
    				if (!Close()) return false;
    			}
    
    			// open the desktop.
    			m_desktop = OpenInputDesktop(0, true, AccessRights);
    
    			// something went wrong.
    			if (m_desktop == IntPtr.Zero) return false;
    
    			// get the desktop name.
    			m_desktopName = Desktop.GetDesktopName(m_desktop);
    
    			return true;
    		}
    
    		/// <summary>
    		/// Switches input to the currently opened desktop.
    		/// </summary>
    		/// <returns>True if desktops were successfully switched.</returns>
    		public bool Show()
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			// make sure there is a desktop to open.
    			if (m_desktop == IntPtr.Zero) return false;
    
    			// attempt to switch desktops.
    			bool result = SwitchDesktop(m_desktop);
    
    			return result;
    		}
    
    		/// <summary>
    		/// Enumerates the windows on a desktop.
    		/// </summary>
    		/// <param name="windows">Array of Desktop.Window objects to recieve windows.</param>
    		/// <returns>A window colleciton if successful, otherwise null.</returns>
    		public WindowCollection GetWindows()
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			// make sure a desktop is open.
    			if (!IsOpen) return null;
    
    			// init the arraylist.
    			m_windows.Clear();
    			WindowCollection windows = new WindowCollection();
    
    			// get windows.
    			bool result = EnumDesktopWindows(m_desktop, new EnumDesktopWindowsProc(DesktopWindowsProc), IntPtr.Zero);
    
    			// check for error.
    			if (!result) return null;
    
    			// get window names.
    			windows = new WindowCollection();
    
    			IntPtr ptr = Marshal.AllocHGlobal(MaxWindowNameLength);
    
    			foreach(IntPtr wnd in m_windows)
    			{
    				GetWindowText(wnd, ptr, MaxWindowNameLength);
    				windows.Add(new Window(wnd, Marshal.PtrToStringAnsi(ptr)));
    			}
    
    			Marshal.FreeHGlobal(ptr);
    
    			return windows;
    		}
    
    		private bool DesktopWindowsProc(IntPtr wndHandle, IntPtr lParam)
    		{
    			// add window handle to colleciton.
    			m_windows.Add(wndHandle);
    
    			return true;
    		}
    
    		/// <summary>
    		/// Creates a new process in a desktop.
    		/// </summary>
    		/// <param name="path">Path to application.</param>
    		/// <returns>The process object for the newly created process.</returns>
    		public Process CreateProcess(string path)
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			// make sure a desktop is open.
    			if (!IsOpen) return null;
    
    			// set startup parameters.
    			STARTUPINFO si = new STARTUPINFO();
    			si.cb = Marshal.SizeOf(si);
    			si.lpDesktop = m_desktopName;
    
    			PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
    
    			// start the process.
    			bool result = CreateProcess(null,path , IntPtr.Zero, IntPtr.Zero, true, NORMAL_PRIORITY_CLASS, IntPtr.Zero, null, ref si, ref pi);
    
    			// error?
    			if (!result) return null;
                
    			// Get the process.
    			return Process.GetProcessById(pi.dwProcessId);
    		}
            /// <summary>
            /// Creates a new process in a desktop.
            /// </summary>
            /// <param name="path">Path to application.</param>
            /// <returns>The process object for the newly created process.</returns>
            public Process CreateProcess2(string path, string commandLine, string currentDirectory)
            {
                // make sure object isnt disposed.
                CheckDisposed();
    
                // make sure a desktop is open.
                if (!IsOpen) return null;
    
                // set startup parameters.
                STARTUPINFO si = new STARTUPINFO();
                si.cb = Marshal.SizeOf(si);
                si.lpDesktop = m_desktopName;
    
                PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
    
                // start the process.
                bool result = CreateProcess(path, commandLine, IntPtr.Zero, IntPtr.Zero, true, NORMAL_PRIORITY_CLASS, IntPtr.Zero, currentDirectory, ref si, ref pi);
    
                // error?
                if (!result) return null;
    
                // Get the process.
                return Process.GetProcessById(pi.dwProcessId);
            }
    		/// <summary>
    		/// Prepares a desktop for use.  For use only on newly created desktops, call straight after CreateDesktop.
    		/// </summary>
    		public void Prepare()
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			// make sure a desktop is open.
    			if (IsOpen)
    			{
    				// load explorer.
    				CreateProcess("explorer.exe");
    			}
    		}
    		#endregion
    
    		#region Static Methods
    		/// <summary>
    		/// Enumerates all of the desktops.
    		/// </summary>
    		/// <param name="desktops">String array to recieve desktop names.</param>
    		/// <returns>True if desktop names were successfully enumerated.</returns>
    		public static string[] GetDesktops()
    		{
    			// attempt to enum desktops.
    			IntPtr windowStation = GetProcessWindowStation();
    
    			// check we got a valid handle.
    			if (windowStation == IntPtr.Zero) return new string[0];
    
    			string[] desktops;
    
    			// lock the object. thread safety and all.
    			lock(m_sc = new StringCollection())
    			{
    				bool result = EnumDesktops(windowStation, new EnumDesktopProc(DesktopProc), IntPtr.Zero);
    
    				// something went wrong.
    				if (!result) return new string[0];
    
    				//	// turn the collection into an array.
    				desktops = new string[m_sc.Count];
    				for(int i = 0; i < desktops.Length; i++) desktops[i] = m_sc[i];
    			}
    
    			return desktops;
    		}
    
    		private static bool DesktopProc(string lpszDesktop, IntPtr lParam)
    		{
    			// add the desktop to the collection.
    			m_sc.Add(lpszDesktop);
    
    			return true;
    		}
    
    		/// <summary>
    		/// Switches to the specified desktop.
    		/// </summary>
    		/// <param name="name">Name of desktop to switch input to.</param>
    		/// <returns>True if desktops were successfully switched.</returns>
    		public static bool Show(string name)
    		{
    			// attmempt to open desktop.
    			bool result = false;
    
    			using (Desktop d = new Desktop())
    			{
    				result = d.Open(name);
    
    				// something went wrong.
    				if (!result) return false;
    
    				// attempt to switch desktops.
    				result = d.Show();
    			}
    
    			return result;
    		}
    
    		/// <summary>
    		/// Gets the desktop of the calling thread.
    		/// </summary>
    		/// <returns>Returns a Desktop object for the valling thread.</returns>
    		public static Desktop GetCurrent()
    		{
    			// get the desktop.
    			return new Desktop(GetThreadDesktop(AppDomain.GetCurrentThreadId()));
    		}
    
    		/// <summary>
    		/// Sets the desktop of the calling thread.
    		/// NOTE: Function will fail if thread has hooks or windows in the current desktop.
    		/// </summary>
    		/// <param name="desktop">Desktop to put the thread in.</param>
    		/// <returns>True if the threads desktop was successfully changed.</returns>
    		public static bool SetCurrent(Desktop desktop)
    		{
    			// set threads desktop.
    			if (!desktop.IsOpen) return false;
    
    			return SetThreadDesktop(desktop.DesktopHandle);
    		}
    
    		/// <summary>
    		/// Opens a desktop.
    		/// </summary>
    		/// <param name="name">The name of the desktop to open.</param>
    		/// <returns>If successful, a Desktop object, otherwise, null.</returns>
    		public static Desktop OpenDesktop(string name)
    		{
    			// open the desktop.
    			Desktop desktop = new Desktop();
    			bool result = desktop.Open(name);
    
    			// somethng went wrong.
    			if (!result) return null;
    
    			return desktop;
    		}
    
    		/// <summary>
    		/// Opens the current input desktop.
    		/// </summary>
    		/// <returns>If successful, a Desktop object, otherwise, null.</returns>
    		public static Desktop OpenInputDesktop()
    		{
    			// open the desktop.
    			Desktop desktop = new Desktop();
    			bool result = desktop.OpenInput();
    
    			// somethng went wrong.
    			if (!result) return null;
    
    			return desktop;
    		}
    
    		/// <summary>
    		/// Opens the default desktop.
    		/// </summary>
    		/// <returns>If successful, a Desktop object, otherwise, null.</returns>
    		public static Desktop OpenDefaultDesktop()
    		{
    			// opens the default desktop.
    			return Desktop.OpenDesktop("Default");
    		}
    
    		/// <summary>
    		/// Creates a new desktop.
    		/// </summary>
    		/// <param name="name">The name of the desktop to create.  Names are case sensitive.</param>
    		/// <returns>If successful, a Desktop object, otherwise, null.</returns>
    		public static Desktop CreateDesktop(string name)
    		{
    			// open the desktop.
    			Desktop desktop = new Desktop();
    			bool result = desktop.Create(name);
    
    			// somethng went wrong.
    			if (!result) return null;
    
    			return desktop;
    		}
    
    		/// <summary>
    		/// Gets the name of a given desktop.
    		/// </summary>
    		/// <param name="desktop">Desktop object whos name is to be found.</param>
    		/// <returns>If successful, the desktop name, otherwise, null.</returns>
    		public static string GetDesktopName(Desktop desktop)
    		{
    			// get name.
    			if (desktop.IsOpen) return null;
    
    			return GetDesktopName(desktop.DesktopHandle);
    		}
    
    		/// <summary>
    		/// Gets the name of a desktop from a desktop handle.
    		/// </summary>
    		/// <param name="desktopHandle"></param>
    		/// <returns>If successful, the desktop name, otherwise, null.</returns>
    		public static string GetDesktopName(IntPtr desktopHandle)
    		{
    			// check its not a null pointer.
    			// null pointers wont work.
    			if (desktopHandle == IntPtr.Zero) return null;
    
    			// get the length of the name.
    			int needed = 0;
    			string name = String.Empty;
    			GetUserObjectInformation(desktopHandle, UOI_NAME, IntPtr.Zero, 0, ref needed);
    
    			// get the name.
    			IntPtr ptr = Marshal.AllocHGlobal(needed);
    			bool result = GetUserObjectInformation(desktopHandle, UOI_NAME, ptr, needed, ref needed);
    			name = Marshal.PtrToStringAnsi(ptr);
    			Marshal.FreeHGlobal(ptr);
    
    			// something went wrong.
    			if (!result) return null;
    
    			return name;
    		}
    
    		/// <summary>
    		/// Checks if the specified desktop exists (using a case sensitive search).
    		/// </summary>
    		/// <param name="name">The name of the desktop.</param>
    		/// <returns>True if the desktop exists, otherwise false.</returns>
    		public static bool Exists(string name)
    		{
    			return Desktop.Exists(name, false);
    		}
    
    		/// <summary>
    		/// Checks if the specified desktop exists.
    		/// </summary>
    		/// <param name="name">The name of the desktop.</param>
    		/// <param name="caseInsensitive">If the search is case INsensitive.</param>
    		/// <returns>True if the desktop exists, otherwise false.</returns>
    		public static bool Exists(string name, bool caseInsensitive)
    		{
    			// enumerate desktops.
    			string[] desktops = Desktop.GetDesktops();
    
    			// return true if desktop exists.
    			foreach(string desktop in desktops)
    			{
    				if (caseInsensitive)
    				{
    					// case insensitive, compare all in lower case.
    					if (desktop.ToLower() == name.ToLower()) return true;
    				}
    				else
    				{
    					if (desktop == name) return true;
    				}
    			}
    
    			return false;
    		}
    
    		/// <summary>
    		/// Creates a new process on the specified desktop.
    		/// </summary>
    		/// <param name="path">Path to application.</param>
    		/// <param name="desktop">Desktop name.</param>
    		/// <returns>A Process object for the newly created process, otherwise, null.</returns>
    		public static Process CreateProcess(string path, string desktop)
    		{
    			if (!Desktop.Exists(desktop)) return null;
    
    			// create the process.
    			Desktop d = Desktop.OpenDesktop(desktop);
    			return d.CreateProcess(path);
    		}
    
    		/// <summary>
    		/// Gets an array of all the processes running on the Input desktop.
    		/// </summary>
    		/// <returns>An array of the processes.</returns>
    		public static Process[] GetInputProcesses()
    		{
    			// get all processes.
    			Process[] processes = Process.GetProcesses();
    
    			ArrayList m_procs = new ArrayList();
    
    			// get the current desktop name.
    			string currentDesktop = GetDesktopName(Desktop.Input.DesktopHandle);
    
    			// cycle through the processes.
    			foreach(Process process in processes)
    			{
    				// check the threads of the process - are they in this one?
    				foreach(ProcessThread pt in process.Threads)
    				{
    					// check for a desktop name match.
    					if (GetDesktopName(GetThreadDesktop(pt.Id)) == currentDesktop)
    					{
    						// found a match, add to list, and bail.
    						m_procs.Add(process);
    						break;
    					}
    				}
    			}
    
    			// put ArrayList into array.
    			Process[] procs = new Process[m_procs.Count];
    
    			for(int i = 0; i < procs.Length; i++) procs[i] = (Process)m_procs[i];
    
    			return procs;
    		}
    		#endregion
    
    		#region IDisposable
    		/// <summary>
    		/// Dispose Object.
    		/// </summary>
    		public void Dispose()
    		{
    			// dispose
    			Dispose(true);
    
    			// suppress finalisation
    			GC.SuppressFinalize(this);
    		}
    
    		/// <summary>
    		/// Dispose Object.
    		/// </summary>
    		/// <param name="disposing">True to dispose managed resources.</param>
    		public virtual void Dispose(bool disposing)
    		{
    			if (!m_disposed)
    			{
    				// dispose of managed resources,
    				// close handles
    				Close();
    			}
    
    			m_disposed = true;
    		}
    
    		private void CheckDisposed()
    		{
    			// check if disposed
    			if (m_disposed)
    			{
    				// object disposed, throw exception
    				throw new ObjectDisposedException("");
    			}
    		}
    		#endregion
    
    		#region ICloneable
    		/// <summary>
    		/// Creates a new Desktop object with the same desktop open.
    		/// </summary>
    		/// <returns>Cloned desktop object.</returns>
    		public object Clone()
    		{
    			// make sure object isnt disposed.
    			CheckDisposed();
    
    			Desktop desktop = new Desktop();
    
    			// if a desktop is open, make the clone open it.
    			if (IsOpen) desktop.Open(m_desktopName);
    
    			return desktop;
    		}
    		#endregion
    
    		#region Overrides
    		/// <summary>
    		/// Gets the desktop name.
    		/// </summary>
    		/// <returns>The desktop name, or a blank string if no desktop open.</returns>
    		public override string ToString()
    		{
    			// return the desktop name.
    			return m_desktopName;
    		}
    		#endregion
    	}
    }
    

    פורסם במקור בפורום CODE613 ב13/02/2016 23:30 (+02:00)


  • התייעצות בתכנון נכון של טבלת אלפון ב SQL
    מ מנצפך 0

    דבר ראשון: לא להתנצל!
    לבעיה הראשונה:
    לדעתי עדיף INT. להוספת 0 בתחילה תשתמש אח"כ בפונקציות עיצוב בשאילתת ה- SQL (במקרה הרע) או בשכבה שאחריה (במקרה הטוב מאוד).

    הבעיה השניה אמורה להיפתר כך:
    אתה בונה 2 טבלאות.
    אחת לאנשים. שמכילה מזהה ייחודי לכל אחד.
    שניה למספרי טלפונים. שמכילה מספר טלפון ואת המזהה של האדם אליו היא שייכת.
    זה נקרא מפתח מרוחק
    "FOREIGN KEY"
    תלמד על זה קצת.
    אשלח לך קישור להורדת הדרכה בפרטי.

    פורסם במקור בפורום CODE613 ב07/11/2017 16:48 (+02:00)


  • לימוד אנגלית (לא בכאילו)
    מ מנצפך 0

    לגבי uedmy .
    לצערי, אחרי ששילמתי (48 ש"ח במקום 800....) סגרו את האתר uedmy בנטפרי.
    לפני זה זה היה פתוח. חוץ מהוידאו. והייתי יכול לבקש ממישהו אחר שיוריד. עכשיו גם זה לא אפשרי. (הם כתבו לי שלא רוצים שישלמו סתם).
    יש שם בעיה בסינון הוידאו. כי הוא פותח את זה לזמן מסוים ואח"כ סוגר. כך לפי הניסויים שלי.
    אולי פנייה מכאן תעזור לקידום העניין.

    לגבי עצם הנידון:
    אני מכיר מערכת WEB מאוד גדולה שעובדת על VB.NET ו SqlServer. בלבד.
    וכל הצד לקוח בנוי מHTML CSS והרבה JS. בלי כל מיני פריימוורקים (אנגולר וכדו).
    לדעתי כדאי לך לנסות להתחיל מזה.
    תבנה אתר קטן. אפילו בלי מסד נתונים. בא נאמר ניהול כתובות וכדו'.
    וכמו שכתבו לך JS חשוב ביותר לWEB.
    בהצלחה. ותעדכן...

    פורסם במקור בפורום CODE613 ב31/10/2017 19:30 (+02:00)


  • Access: פונט מוחלף בפונט ברירת מחדל
    מ מנצפך 0

    מדובר בפונטים מותקנים. בתצוגת "עיצוב" (Design) הוא מציג אותם כראוי. רק בשאר התצוגות יש בעיה.
    מה שעשיתי זה:

    Private Sub Report_Load()
        Dim ctrl As Control
        For Each ctrl In Me
            If ctrl.ControlType = acTextBox Then ctrl.FontName = ctrl.FontName
        Next
    End Sub
    

    וזה עובד.
    (מי היה מאמין שעוד אתעסק עם Ms-Access...)

    פורסם במקור בפורום CODE613 ב22/06/2017 13:41 (+03:00)


  • סינון לפי תאריך בשאילתה באקסס
    מ מנצפך 0

    @CHAGOLD

    כי אין תאריך 31/7.
    תכתוב 30/7

    אצלי יש את התאריך הזה...
    אבל נראה שהבעיה אחרת, יש שמסדרים dd/mm/yyyy
    ויש mm/dd/yyyy.
    צריך לדעת איך המחשב מסדר. תנסה לשנות את הסדר.

    פורסם במקור בפורום CODE613 ב25/07/2016 12:17 (+03:00)


  • אופיס לא נכתבה בדוטנט?
    מ מנצפך 0

    @zvinisim

    טריק נוסף לחזור דף אחורה אפשר ללחוץ על back space

    זה לא העצלות להזיז את היד. זה הזמן המיותר!
    אגב- Shift BackSpace-לעבור קדימה!
    (לפחות בכרום).

    פורסם במקור בפורום CODE613 ב17/07/2016 20:44 (+03:00)


  • ספרי לימוד במדעי המחשב - מהדורה דיגיטלית של האוניברסיטה הפתו
    מ מנצפך 0

    יש אייקון קטן של ספר דיגיטלי מתחת לתמונה של הספר.

    פורסם במקור בפורום CODE613 ב23/07/2016 23:42 (+03:00)


  • WinForms שיהיה תמיד למעלה
    מ מנצפך 0

    ניסית TopMost? (הגדרה בטופס עצמו).

    פורסם במקור בפורום CODE613 ב06/06/2016 00:09 (+03:00)


  • עזרה - הצגת נתונים עדכניים באקסס
    מ מנצפך 0

    מה זה נוטיפיקצייה?

    בעברית "הודעה".
    השרת מודיע לקליינט (ע"י סוקט פתוח או בקשה כל שהיא מצד הקליינט) שיש שינויים בDATA.

    פורסם במקור בפורום CODE613 ב03/01/2018 23:02 (+02:00)


  • פקודת MkDir
    מ מנצפך 0

    התוצאה הראשונה בגוגל:

    If Len(Dir("c:\TOTN\Examples", vbDirectory)) = 0 Then
       MkDir "c:\TOTN\Examples"
    End If
    

    לא בדקתי

    פורסם במקור בפורום CODE613 ב02/01/2018 19:24 (+02:00)


  • Electron עם דוט נט
    מ מנצפך 0

    @דוד ל.ט.
    כמדומני שהכל בJS. המריץ בפועל זה נוד.

    סתם לידיעה, node ממיר את js לC++. כך הבנתי.
    לגבי ההצעה של הנ"ל להשתמש בתוסף, צריך לשים לב שבאנדרואיד אין תוספים.
    עריכה: מקור ציטוט שגוי

    פורסם במקור בפורום CODE613 ב03/01/2018 14:49 (+02:00)


  • Electron עם דוט נט
    מ מנצפך 0

    זה טוב מאוד לפרוייקטים של קוד פתוח.
    כי הקוד שם נשאר פתוח...

    פורסם במקור בפורום CODE613 ב02/01/2018 23:16 (+02:00)


  • בלמיק כלי מצוין לעשיית מוקאפים
    מ מנצפך 0

    "Life's too short for bad software!".
    קצת מלחיץ. לא?

    פורסם במקור בפורום CODE613 ב21/12/2017 09:45 (+02:00)


  • מבנה מסד נתונים
    מ מנצפך 0

    יש לי מערכת מנויים.
    יש מנויים שמשלמים מראש ויש שמשלמים בסוף. יש שמשלמים במזומן ויש באשראי.
    כרגע יש לי:
    טבלת משתמשים.
    טבלת שימוש, כלומר חיוב.
    טבלת תשלומים, כלומר זיכוי.

    אני רוצה לשלב כעת תשלום באשראי.
    השאלה איך לעשות את זה.
    הרי כל עיסקה שנשלחת לחברת אשראי מחזירה ערכים כמו, סטטוס, מס' אישור ועוד.
    האם לשלב את זה בטבלת התשלומים הרגילה. ותשלום באשראי יהיה בו את כל הפרטים ובמזומן יהיה רק סכום.
    או לעשות טבלת טרנזקשיין. דהיינו כל העסקאות שנעשו. וכל עיסקה שהצליחה להוסיף אותה גם בטבלת התשלומים.
    כי אני חושב שהגיוני לשמור את כל ה Transactions.
    מקווה שיצאתי ברור +-.

    פורסם במקור בפורום CODE613 ב14/12/2017 18:40 (+02:00)


  • סליקת אשראי-טרנזילה
    מ מנצפך 0

    שלא להוציא לעז...
    בינתיים עובדים עם טרנזילה...
    הם נותנים שירות מהיר ומעולה. לפחות עד 21:30 בערב...
    וגם המחיר שהלקוח קיבל מהם מעולה.
    הבהרה: אין לי שום קשר עיסקי עימם.

    פורסם במקור בפורום CODE613 ב10/12/2017 21:36 (+02:00)


  • google hangouts widget
    מ מנצפך 0

    לא נראה לי כ"כ מסובך לפתח אחת כזו.
    עיין כאן:

    יצא לי פעם לעשות משהו בסיסי עם node.js.

    פורסם במקור בפורום CODE613 ב07/12/2017 11:51 (+02:00)


  • עבודה בתהליך משני (Thread / Task) ובכל זאת ה-UI תקוע
    מ מנצפך 0

    האם הAPI לגוגל קריטי לך? כמה זה חשוב לך? כמה משתמשים נוספים לך? אולי תעשה עדכון ידני פעם בחודש?
    אני יודע שזמנך יקר. לכן אני ממליץ כך.

    פורסם במקור בפורום CODE613 ב07/12/2017 11:48 (+02:00)


  • לימוד שפת VBA לאקסס.
    מ מנצפך 0

    אם כבר תשקע בביצה של Dot.Net ( 😉 ) אז C#
    מדריך בעברית:
    http://webmaster.org.il/articles/csharp

    פורסם במקור בפורום CODE613 ב27/11/2017 13:19 (+02:00)

  • 1
  • 2
  • 3
  • 1 / 3
  • התחברות

  • אין לך חשבון עדיין? הרשמה

  • התחברו או הירשמו כדי לחפש.
  • פוסט ראשון
    פוסט אחרון
0
  • דף הבית
  • קטגוריות
  • פוסטים אחרונים
  • משתמשים
  • חיפוש
  • חוקי הפורום