keyongtech


  keyongtech > dotnet.framework.* > dotnet.framework.windowsforms.controls > 09/2004

 #1  
09-08-04, 08:30 AM
TusharP
Hi Friends,
I inherited .NET window control to draw custom look.
I override Windproof function to draw custom look. But default paint
operation perform first & then custom drawing called.
I want to avoid this. Is there any way to block default painting...

Your help is most Valuable for me

Thank You
Tushar P.




 #2  
09-08-04, 01:45 PM
Herfried K. Wagner [MVP]
* "TusharP" <tushar.patil> scripsit:
> I inherited .NET window control to draw custom look.
> I override Windproof function to draw custom look. But default paint
> operation perform first & then custom drawing called.
> I want to avoid this. Is there any way to block default painting...


Post your code.
 #3  
09-08-04, 03:06 PM
TusharP
Hi Herfried,
I saw you site, but it is not English, can get info about how to post my
code. Please give your mail ID.

Thanking you for your help.

Tushar P. (India)



"Herfried K. Wagner [MVP]" <hirf-spam-me-here> wrote in message
news:e6u4
> * "TusharP" <tushar.patil> scripsit:
> > I inherited .NET window control to draw custom look.
> > I override Windproof function to draw custom look. But default paint
> > operation perform first & then custom drawing called.
> > I want to avoid this. Is there any way to block default painting...

>
> Post your code.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


 #4  
09-08-04, 04:13 PM
Sijin Joseph
Hi Tushar, just post the relevant code in the newsgroup itself.

Sijin Joseph
http://www.indiangeek.net
[url down]



TusharP wrote:
[..]
 #5  
09-08-04, 05:02 PM
Herfried K. Wagner [MVP]
* Sijin Joseph <sijinNOSPAMdotnet> scripsit:
> Hi Tushar, just post the relevant code in the newsgroup itself.


That's exactly what I thought... :-).
 #6  
09-09-04, 06:14 AM
TusharP
Hi Friend,

One more doubt.
I also designing Image Button using PicutreBox control.
When user using this control in design time, Control ask for Images for
OnFocus, OnClick, OnEnter, OnLeave etc. When user given path of Images for
thses event, How to store these Images in Resource file of Image Button
control (At Design time).

"Herfried K. Wagner [MVP]" <hirf-spam-me-here> wrote in message
news:f8u5
> * Sijin Joseph <sijinNOSPAMdotnet> scripsit:
> > Hi Tushar, just post the relevant code in the newsgroup itself.

>
> That's exactly what I thought... :-).
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


 #7  
09-09-04, 12:42 PM
Herfried K. Wagner [MVP]
* "TusharP" <tushar.patil> scripsit:
> I also designing Image Button using PicutreBox control.
> When user using this control in design time, Control ask for Images for
> OnFocus, OnClick, OnEnter, OnLeave etc. When user given path of Images for
> thses event, How to store these Images in Resource file of Image Button
> control (At Design time).


\\\
Private m_ClickedImage As Image

Public Property ClickedImage() As Image
Get
Return m_ClickedImage
End Get
Set(ByVal Value As Image)
m_ClickedImage = Value
End Set
End Property
///
 #8  
09-09-04, 01:08 PM
TusharP
Thanx for Reply...

Hi I under stand your answer,
But one clarification is need. Will this code persist image even if
Application closed, or I need to store it in Resource file for future use.
Will this code make File path independent application.. If code is in C# ,
it better for me.... to understand....

Thanking You
Tushar P.


"Herfried K. Wagner [MVP]" <hirf-spam-me-here> wrote in message
news:3816
> * "TusharP" <tushar.patil> scripsit:
> > I also designing Image Button using PicutreBox control.
> > When user using this control in design time, Control ask for Images for
> > OnFocus, OnClick, OnEnter, OnLeave etc. When user given path of Images

for
>
> \\
> Private m_ClickedImage As Image
>
> Public Property ClickedImage() As Image
> Get
> Return m_ClickedImage
> End Get
> Set(ByVal Value As Image)
> m_ClickedImage = Value
> End Set
> End Property
> ///
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


 #9  
09-09-04, 02:12 PM
Herfried K. Wagner [MVP]
* "TusharP" <tushar.patil> scripsit:
> But one clarification is need. Will this code persist image even if
> Application closed, or I need to store it in Resource file for future use.
> Will this code make File path independent application.. If code is in C# ,
> it better for me.... to understand....


Simply take a look at the chapter about properties in your
documentation. The image assigned to this property will be made
persistend when it's changed at designtime.
 #10  
09-09-04, 02:42 PM
TusharP
I not getting what you are saying,
During Design time, user will supply only path of Image from Open File
Dialog Box. Now that image need to be store in resource file so that I can
make my dll independent of file path......

I hope you get my problem.....

Reply me ,
Thank You
Tushar P.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here> wrote in message
news:a952
> * "TusharP" <tushar.patil> scripsit:
> > But one clarification is need. Will this code persist image even if
> > Application closed, or I need to store it in Resource file for future

use.
> > Will this code make File path independent application.. If code is in

C# ,
> > it better for me.... to understand....

>
> Simply take a look at the chapter about properties in your
> documentation. The image assigned to this property will be made
> persistend when it's changed at designtime.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


 #11  
09-09-04, 03:49 PM
Herfried K. Wagner [MVP]
* "TusharP" <tushar.patil> scripsit:
> I not getting what you are saying,
> During Design time, user will supply only path of Image from Open File
> Dialog Box. Now that image need to be store in resource file so that I can
> make my dll independent of file path......


If the type of your property is 'Image', then the image selected by the
user will be stored, and not the path of the file the user selected.
 #12  
09-10-04, 02:41 PM
TusharP
Yes Yes,
It is working....
Thanx a Lot for this valuable help....
Now my main problem is how to avoid default paint function. I think there
is flag that avoid default drawing painting operation .. like (WM.....)
Not know properly.....

Than you once again....
Tushar P.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here> wrote in message
news:3612
> * "TusharP" <tushar.patil> scripsit:
> > I not getting what you are saying,
> > During Design time, user will supply only path of Image from Open File
> > Dialog Box. Now that image need to be store in resource file so that I

can
> > make my dll independent of file path......

>
> If the type of your property is 'Image', then the image selected by the
> user will be stored, and not the path of the file the user selected.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Similar Threads
Frustration in 'not able' to draw or paint?

Greetings :) I'm an Art Teacher in Singapore. I've been teaching Art for 7 years. Before this job, I was a Graphic Designer. However, since I was trained as a teacher, I...

How to use Paint-method on Custom DatagridViewCell to draw an image?

Hi How to use Paint-method on Custom DatagridViewCell to draw an image? This method gets graphics As System.Drawing.Graphics -> Not sure. clipBounds and cellBounds As...

Draw a Rectangle like Paint using Ink

Hi, I'd like to be able to draw a rectangle (like the Paint program) using C# in a tablet PC application. I can draw various shapes using Microsoft.Ink, I guess I need to...

Paint/Draw

I'm running XP home and Office 97 Pro. Until MyPC blew up in Nov. I had PAINT in accessories, now I can find it, I've re installed Offoce but it doesn't appear to be there...

Draw/Paint capabilities

Is there a way of using a Wacom or other tablet to be able to draw or paint in PPT. I have the latest version.


All times are GMT. The time now is 12:03 PM. | Privacy Policy