Postagens

Mostrando postagens de julho, 2012

C# - Como carregar uma dll

[DllImport(@"C:\Users\CPD-01\Desktop\Dll\DllSample.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode)] private static extern int funcao(int valor);

Asp.Net - Carregar os dados de um GridView com TextBox

            ed = new TESTEEntities();             for (int i = 0; i < GridDados.Rows.Count; i++)             {                   TABELA objFreq = new TABELA()                 {                     ANO = dropAno.SelectedValue,                     MES = dropMes.SelectedValue,                     ID = GridDados.Rows[GridDados.Rows[i].DataItemIndex].Cells[0].Text.ToString(),                     NOME = GridDados.Rows[GridDados.Rows[i].DataItemIndex].Cells[1].Text.ToString(),                     DATA_NASCIMENTO = DateTime.Parse(GridDados.Rows[GridDados.Rows[...

Asp.Net - Obter valor usando o request.Form

 protected void Button1_Click(object sender, EventArgs e)  {          string str = Request.Form["ctl00$ContentPlaceHolder1$TextBox1"];  }

Delphi - Drag and Drop usando o Treeview com Richedit

procedure TForm1.RichEdit1DragDrop(Sender, Source: TObject; X, Y: Integer); var ponteiro : Tpoint;     index: integer; begin   ponteiro:= Point( X, Y );   Richedit1 := sender as TRichedit;   index := Richedit1.perform(Messages.EM_CHARFROMPOS, 0,integer(@ponteiro));   if index >= 0 Then     begin       Richedit1.selstart := index;       RichEdit1.SelText := TreeView1.Selected.Text;     end; end; procedure TForm1.TreeView1DragOver(Sender, Source: TObject; X, Y: Integer;   State: TDragState; var Accept: Boolean); begin  Accept := (Source is TTreeView); end;

Delphi - Alterar cor da fonte do groupBox no Delphi XE

unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls, themes; type    TGroupBox = class(StdCtrls.TGroupBox) //declare this before of your form definition     public     procedure Paint; override;   end; type   TForm1 = class(TForm)     GroupBox1: TGroupBox;   private     { Private declarations }   public     { Public declarations }   end; var   Form1: TForm1; implementation {$R *.dfm} procedure TGroupBox.Paint; var   H: Integer;   R: TRect;   Flags: Longint;   CaptionRect,   OuterRect: TRect;   Size: TSize;   Box: TThemedButton;   Details: TThemedElementDetails; begin   with Canvas do   begin     Font := Self.Font;     if ThemeControl(Self) then     begin       if Text <>...