Click here to Skip to main content
16,004,991 members
Home / Discussions / C#
   

C#

 
GeneralBinding a DropDownList control Pin
brian553-Apr-05 17:05
brian553-Apr-05 17:05 
Generalplease help with an sql filter in c# Pin
otss533-Apr-05 15:22
otss533-Apr-05 15:22 
GeneralRe: please help with an sql filter in c# Pin
Christian Graus3-Apr-05 15:55
protectorChristian Graus3-Apr-05 15:55 
GeneralTooltip position in c# Pin
Milan20073-Apr-05 15:14
Milan20073-Apr-05 15:14 
GeneralRe: Tooltip position in c# Pin
Milan20073-Apr-05 16:59
Milan20073-Apr-05 16:59 
GeneralRead names of application pools in IIS Pin
Johny Ng3-Apr-05 13:47
Johny Ng3-Apr-05 13:47 
GeneralRe: Read names of application pools in IIS Pin
Heath Stewart3-Apr-05 19:45
protectorHeath Stewart3-Apr-05 19:45 
GeneralCustom Component Issue Pin
dbetting3-Apr-05 11:22
dbetting3-Apr-05 11:22 
I have built a custom component that I use rather extensively but it has a "feature" that is not correct but I haven't been able to determine why. I converted one my Delphi components and merged it with features from several contributors here. I would like to thank all of you.

The basis of the component is as follows:
using System;<br />
using System.Collections;<br />
using System.Windows.Forms;<br />
using System.ComponentModel;<br />
using System.Text.RegularExpressions;<br />
<br />
namespace MyComponents<br />
{<br />
  public class myMaskedEdit : TextBox<br />
  {<br />
    public enum InputMaskType<br />
    { None, Dollars, Number, Integer, Percent, Phone, SSN, Zip, Custom }<br />
<br />
    public myMaskedEdit()<br />
    { ... }<br />
<br />
    ... Other Methods ...<br />
<br />
  }<br />
}


I drag the component onto my UserControl and it looks something like:

using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Drawing;<br />
using System.Data;<br />
using System.Windows.Forms;<br />
<br />
namespace PARTS<br />
{<br />
  public class ucRMAHeader : System.Windows.Forms.UserControl<br />
  {<br />
    public ucRMAHeader()<br />
    {<br />
      InitializeComponent();<br />
      SetupForm();<br />
    }<br />
<br />
    ... Other Methods ...<br />
  <br />
    #region Component Designer generated code<br />
    private void InitializeComponent()<br />
    {<br />
     ...<br />
      this.myMaskedEdit1.ErrorInvalid = false;<br />
      this.myMaskedEdit1.FormatText = true;<br />
      this.myMaskedEdit1.Location = new System.Drawing.Point(8, 48);<br />
      this.myMaskedEdit1.MaxLength = 0;<br />
      this.myMaskedEdit1.Name = "myMaskedEdit1";<br />
      this.myMaskedEdit1.Size = new System.Drawing.Size(108, 20);<br />
      this.myMaskedEdit1.StdInputMask = MyComponents.myMaskedEdit.InputMaskType.Integer;<br />
      this.myMaskedEdit1.TabIndex = 214;<br />
     ...<br />
    }<br />
    #endregion<br />
  }<br />
}


I can set all the properties correctly and the program will compile and run as intended. The above code is how it is seen in the program.

I then close the window for maintaining the form. I reopen it and the StdInputMask property is now blank in the property editor. If I look at the code itself, the property is shown as it is above. But when I recompile, the property is saved as a blank and the line is removed.

While viewing the code the error message The variable 'InputMaskType' is either undeclared or was never assigned. is shown in the task list.

What I don't understand is that the enumerated type has the public attribute and it does execute as expected up until the time you reopen the form.

Can anyone identify what I missed?

Thanks.
GeneralRe: Custom Component Issue Pin
dbetting4-Apr-05 17:36
dbetting4-Apr-05 17:36 
GeneralGDI drawing Pin
xiaowenjie3-Apr-05 9:46
xiaowenjie3-Apr-05 9:46 
GeneralRe: GDI drawing Pin
Christian Graus3-Apr-05 15:56
protectorChristian Graus3-Apr-05 15:56 
General3D model veiwer, help!! Pin
Member 15841393-Apr-05 6:17
Member 15841393-Apr-05 6:17 
GeneralRe: 3D model veiwer, help!! Pin
Stanciu Vlad3-Apr-05 7:00
Stanciu Vlad3-Apr-05 7:00 
General&quot;using&quot; keyword on methods Pin
udir3-Apr-05 5:05
udir3-Apr-05 5:05 
GeneralRe: &quot;using&quot; keyword on methods Pin
leppie3-Apr-05 7:28
leppie3-Apr-05 7:28 
GeneralStupid problem Pin
Static(x)3-Apr-05 4:21
Static(x)3-Apr-05 4:21 
GeneralRe: Stupid problem Pin
udir3-Apr-05 4:55
udir3-Apr-05 4:55 
GeneralRe: Stupid problem Pin
ddmcr3-Apr-05 5:26
ddmcr3-Apr-05 5:26 
Questionuninstall program in C# ???? Pin
Anonymous3-Apr-05 2:38
Anonymous3-Apr-05 2:38 
AnswerRe: uninstall program in C# ???? Pin
Mike Dimmick3-Apr-05 8:49
Mike Dimmick3-Apr-05 8:49 
Generalviewing local shell/system folders Pin
nds53-Apr-05 0:27
nds53-Apr-05 0:27 
GeneralRe: viewing local shell/system folders Pin
Milan20073-Apr-05 15:07
Milan20073-Apr-05 15:07 
GeneralRe: viewing local shell/system folders Pin
nds57-Apr-05 1:28
nds57-Apr-05 1:28 
Questionhow to get primary in variable Pin
Member 17583712-Apr-05 16:58
Member 17583712-Apr-05 16:58 
AnswerRe: how to get primary in variable Pin
theoutlander2-Apr-05 17:33
theoutlander2-Apr-05 17:33 

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.