Click here to Skip to main content
15,888,816 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: managed c++ app refuses to run Pin
Jason Henderson17-Dec-09 4:59
Jason Henderson17-Dec-09 4:59 
GeneralRe: managed c++ app refuses to run Pin
YoavStein7-Feb-10 2:57
YoavStein7-Feb-10 2:57 
QuestionHow to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Nilesh Hamane14-Dec-09 0:48
Nilesh Hamane14-Dec-09 0:48 
AnswerRe: How to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Andreoli Carlo14-Dec-09 3:16
professionalAndreoli Carlo14-Dec-09 3:16 
AnswerRe: How to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Richard MacCutchan16-Dec-09 9:08
mveRichard MacCutchan16-Dec-09 9:08 
GeneralRe: How to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Nilesh Hamane16-Dec-09 22:07
Nilesh Hamane16-Dec-09 22:07 
GeneralRe: How to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Richard MacCutchan16-Dec-09 22:22
mveRichard MacCutchan16-Dec-09 22:22 
QuestionDataGridView multiline selection without ctrl key Pin
Andreoli Carlo10-Dec-09 23:39
professionalAndreoli Carlo10-Dec-09 23:39 
Actually what i'm trying to do is to get a multiline rows selection without the problem of holding the ctrl key (i'm developing a touchscrenn app).

By now i quite get it with a list of selected lines, but if i try to click fast on the rows it give me some painting error. Can someone give me a hint. (Maybe i should fire the ctrl command? i don't know how to simulate the pressdown command Frown | :( )

#ifndef _CSTDGV_
#define _CSTDGV_

namespace primoAlpha {

	using namespace System;
	using namespace System::Drawing;
	using namespace System::Windows::Forms;
	using namespace System::Security::Permissions;
	
	/**
	 * Classe per la gestione di un DataGridView personalizzato
	 * per una gestione tramite delegate del riordinamento delle colonne
	 * e per permettere di selezionare multiline senza il tasto control premuto
	 * 
	 * @author      Carlo Andreoli
	 * @version     0.1.0, 24/07/09 -- Prima versione (beta)
	 */
	public ref class personalDataGridView : DataGridView
	{	
	public:

		/**
		 * Costruttore dove inizializzo le variabili che estendono la classe base
		 * 
		 * @author      Carlo Andreoli
		 * @version     0.1.0, 24/07/09 -- Prima versione (beta)
		*/
		personalDataGridView()
		{
			this->selectedRowIndexes=gcnew Collections::ArrayList();
			this->MultiSelectForced=false;
		}
		
		/**
		* variabile per gestire i selected senza il control selezionato
		*/
		property bool MultiSelectForced
		{
			bool get() {
				return _MultiSelectForced;
			} 
			void set(bool value) {
				this->_MultiSelectForced = value;
				this->selectedRowIndexes->Clear();
				processSelectedRowIndexes();
			}
		}
	protected:
		/**
		 * override sulla funzione che gestisce CurrentCellChanged 
		 * per gestire il multiselect senza il tasto del ctr schiacciato
		 * @param		e
		 * 
		 * @author      Carlo Andreoli
		 * @version     0.1.0, 24/07/09 -- Prima versione (beta)
		*/
		virtual void OnCurrentCellChanged (EventArgs^ e) override
		{
			if (this->CurrentRow!=nullptr && _MultiSelectForced) {
				int act_row=this->CurrentRow->Index;
			
				if (selectedRowIndexes->Contains(act_row)) {
					selectedRowIndexes->Remove(act_row);
				}
				else selectedRowIndexes->Add(act_row);

				//ora vado ad indicare i selezionati e quelli no
				processSelectedRowIndexes();
			}
			DataGridView::OnCurrentCellChanged(e);
		}
	private:
		/**
		* lista di interi per tenere tracci dei valori selezionati
		*/
		Collections::ArrayList ^selectedRowIndexes;
		/**
		* variabile per gestire i selected senza il control selezionato
		*/
		bool _MultiSelectForced;
		
		/**
		 * funzione che processa la lista personalizzata dei delezionati
		 * 
		 * @author      Carlo Andreoli
		 * @version     0.1.0, 24/07/09 -- Prima versione (beta)
		*/
		void processSelectedRowIndexes() {
			this->SuspendLayout();
			this->ClearSelection();
			for (int i=0;i<selectedRowIndexes->Count;i++) {
				if (selectedRowIndexes[i]!="0") {
					this->Rows[Convert::ToInt32(selectedRowIndexes[i]->ToString())]->Selected=true;
				}
			}
			this->ResumeLayout();
		}
	};

}

#endif

AnswerRe: DataGridView multiline selection without ctrl key Pin
Andreoli Carlo13-Dec-09 22:18
professionalAndreoli Carlo13-Dec-09 22:18 
QuestionCenterParent in Windows 7? [modified] Pin
Xpnctoc9-Dec-09 3:56
Xpnctoc9-Dec-09 3:56 
QuestionRe: CenterParent in Windows 7? Pin
Mark Salsbery9-Dec-09 6:42
Mark Salsbery9-Dec-09 6:42 
AnswerRe: CenterParent in Windows 7? Pin
Xpnctoc9-Dec-09 9:42
Xpnctoc9-Dec-09 9:42 
GeneralRe: CenterParent in Windows 7? Pin
Mark Salsbery9-Dec-09 10:17
Mark Salsbery9-Dec-09 10:17 
GeneralRe: CenterParent in Windows 7? Pin
Xpnctoc9-Dec-09 10:38
Xpnctoc9-Dec-09 10:38 
GeneralRe: CenterParent in Windows 7? Pin
Mark Salsbery9-Dec-09 10:41
Mark Salsbery9-Dec-09 10:41 
GeneralRe: CenterParent in Windows 7? Pin
Xpnctoc9-Dec-09 11:53
Xpnctoc9-Dec-09 11:53 
GeneralRe: CenterParent in Windows 7? Pin
Mark Salsbery9-Dec-09 12:24
Mark Salsbery9-Dec-09 12:24 
GeneralRe: CenterParent in Windows 7? Pin
Xpnctoc9-Dec-09 14:06
Xpnctoc9-Dec-09 14:06 
GeneralRe: CenterParent in Windows 7? Pin
Mark Salsbery9-Dec-09 18:29
Mark Salsbery9-Dec-09 18:29 
Questionsuresh Pin
Game-point6-Dec-09 21:49
Game-point6-Dec-09 21:49 
AnswerRe: suresh Pin
Richard MacCutchan7-Dec-09 5:32
mveRichard MacCutchan7-Dec-09 5:32 
QuestionChecking for presence of System::IO::Ports::SerialPort Pin
BubbaGeeNH2-Dec-09 5:42
BubbaGeeNH2-Dec-09 5:42 
AnswerRe: Checking for presence of System::IO::Ports::SerialPort Pin
zhushaolin20052-Dec-09 18:44
zhushaolin20052-Dec-09 18:44 
QuestionCamera-Control (firewire) Pin
LoKi.aK2-Dec-09 1:25
LoKi.aK2-Dec-09 1:25 
AnswerRe: Camera-Control (firewire) Pin
Jonathan Davies11-Dec-09 5:54
Jonathan Davies11-Dec-09 5: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.