1
Answer

using graphics in windows forms

greg.dearment

greg.dearment

20y
1.8k
1
I am new to GDI+ and the graphics class. I read the tutorial on the C# corner site. In it, you declear the graphics class instance as: Graphics g = e.Graphics; (e being the EventArgs variable passed into the paint function) if i want to draw something when the form is resized, i like the resize event to "resize_draw" but the eventsarg no longer contains Graphics. How would i use the graphics class in this function? or is it not possible? Hope that made sence.
Answers (1)
0
Vikram
NA 319 262.4k 14y
Hi yashwant,
  
    Just Define variable in the Markup it consider as Global.

e.g
  
   <script type='text/javascript>
       var Navigateurl="~/block/abc.aspx";
         function pageLoad()
         {
                 //do something
         }

         function otherFunction()
        {
            var newurl = Navigateurl;
        }

</script>
This way you can declare the global variable in the markup.

Hope this will help you.

Regards,
 Vikram