Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
AnswerRe: Copying a file from one system to another Pin
Vikram A Punathambekar15-Feb-09 23:33
Vikram A Punathambekar15-Feb-09 23:33 
QuestionRe: Copying a file from one system to another Pin
arun_pk15-Feb-09 23:48
arun_pk15-Feb-09 23:48 
AnswerRe: Copying a file from one system to another Pin
Vikram A Punathambekar16-Feb-09 0:47
Vikram A Punathambekar16-Feb-09 0:47 
QuestionC# :: Updating SQL Table Form DataGridView :: Repost Pin
WinSolution15-Feb-09 23:08
WinSolution15-Feb-09 23:08 
Questionstring question Pin
bar300015-Feb-09 23:05
bar300015-Feb-09 23:05 
AnswerRe: string question Pin
WinSolution15-Feb-09 23:16
WinSolution15-Feb-09 23:16 
AnswerRe: string question Pin
arun_pk15-Feb-09 23:16
arun_pk15-Feb-09 23:16 
AnswerRe: string question Pin
Pete O'Hanlon15-Feb-09 23:55
mvePete O'Hanlon15-Feb-09 23:55 
If I understand your question, what you are asking, is if you can associate picbox with another control, the only reference you have being the string. Off the top of my head, I'd use something like the code below:
private Control FindControl(Controls controls, string controlName)
{
  if (controls == null)
    return null;
  foreach (Control ctrl in controls)
  {
    if (ctrl.Name == controlName)
    {
      return ctrl;
    }
    else
    {
      Control c == FindControl(ctrl.Controls, controlName);
      if (c != null)
      {
        return c;
      }
    }
  }
}
Then, you can call this using
picbox = FindControl(MyForm.Controls, nameToSearchFor) as PictureBox;


"WPF has many lovers. It's a veritable porn star!" - Josh Smith

My blog | My articles | MoXAML PowerToys



AnswerRe: string question Pin
Vikram A Punathambekar16-Feb-09 0:03
Vikram A Punathambekar16-Feb-09 0:03 
QuestionHow to set restriction on a created group Pin
rune_norway15-Feb-09 22:31
rune_norway15-Feb-09 22:31 
QuestionClosing a User Control from itself Pin
caksabre215-Feb-09 22:29
caksabre215-Feb-09 22:29 
AnswerRe: Closing a User Control from itself Pin
Calin Tatar15-Feb-09 22:40
Calin Tatar15-Feb-09 22:40 
AnswerRe: Closing a User Control from itself Pin
ABitSmart15-Feb-09 22:42
ABitSmart15-Feb-09 22:42 
GeneralRe: Closing a User Control from itself Pin
caksabre215-Feb-09 23:14
caksabre215-Feb-09 23:14 
AnswerRe: Closing a User Control from itself Pin
kbalias15-Feb-09 22:51
kbalias15-Feb-09 22:51 
AnswerRe: Closing a User Control from itself Pin
Deresen15-Feb-09 22:54
Deresen15-Feb-09 22:54 
QuestionProblem with editing data via databound Textbox Pin
kbalias15-Feb-09 22:02
kbalias15-Feb-09 22:02 
QuestionThread Stop with Excel Object Pin
MumbleB15-Feb-09 21:54
MumbleB15-Feb-09 21:54 
AnswerRe: Thread Stop with Excel Object Pin
ABitSmart15-Feb-09 22:33
ABitSmart15-Feb-09 22:33 
QuestionGet location of Open With dialog result Pin
pedersen-roxen15-Feb-09 21:52
pedersen-roxen15-Feb-09 21:52 
QuestionMonitoring a database Pin
hadad15-Feb-09 21:16
hadad15-Feb-09 21:16 
AnswerRe: Monitoring a database Pin
Expert Coming15-Feb-09 21:55
Expert Coming15-Feb-09 21:55 
Questioncan not run OPENGL Program Pin
chandrapal15-Feb-09 21:02
chandrapal15-Feb-09 21:02 
AnswerRe: can not run OPENGL Program Pin
Expert Coming15-Feb-09 21:08
Expert Coming15-Feb-09 21:08 
AnswerRe: can not run OPENGL Program Pin
Nuri Ismail15-Feb-09 21:50
Nuri Ismail15-Feb-09 21:50 

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.